summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2011-03-16 17:27:48 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-03-16 17:27:48 -0700
commitd50349de17784f924f8cca6ef2fb2708b9fd2ecd (patch)
tree0706262b3fc8cb0337bd37ffd73ac327a5e8df52 /graphics
parent9ca34f68139139e61c999a50d0ab066acd08036b (diff)
parent84a97cae1e53400676a4dfd6c7bf75f9ac230fce (diff)
downloadframeworks_base-d50349de17784f924f8cca6ef2fb2708b9fd2ecd.zip
frameworks_base-d50349de17784f924f8cca6ef2fb2708b9fd2ecd.tar.gz
frameworks_base-d50349de17784f924f8cca6ef2fb2708b9fd2ecd.tar.bz2
Merge "Check setName() for null string + typo fixes."
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/renderscript/BaseObj.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/graphics/java/android/renderscript/BaseObj.java b/graphics/java/android/renderscript/BaseObj.java
index 669beac..8ce1d9a 100644
--- a/graphics/java/android/renderscript/BaseObj.java
+++ b/graphics/java/android/renderscript/BaseObj.java
@@ -75,11 +75,17 @@ class BaseObj {
* @param name The name to assign to the object.
*/
public void setName(String name) {
+ if (name == null) {
+ throw new RSIllegalArgumentException(
+ "setName requires a string of non-zero length.");
+ }
if(name.length() < 1) {
- throw new RSIllegalArgumentException("setName does not accept a zero length string.");
+ throw new RSIllegalArgumentException(
+ "setName does not accept a zero length string.");
}
if(mName != null) {
- throw new RSIllegalArgumentException("setName object already has a name.");
+ throw new RSIllegalArgumentException(
+ "setName object already has a name.");
}
try {
@@ -106,9 +112,9 @@ class BaseObj {
}
/**
- * destroy disconnects the object from the native object effectivly
+ * destroy disconnects the object from the native object effectively
* rendering this java object dead. The primary use is to force immediate
- * cleanup of resources when its believed the GC will not respond quickly
+ * cleanup of resources when it is believed the GC will not respond quickly
* enough.
*/
synchronized public void destroy() {