aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2011-08-29 18:33:40 +0000
committerManolo Carrasco <manolo@apache.org>2011-08-29 18:33:40 +0000
commit15ae17b35ba87164d46e48e351783035b9eecbf2 (patch)
tree25d61578670cab560ec075d7127687f2e66d7cac
parent9b9a0a54a21cbb79fc2729bf2a34442ff44122f6 (diff)
downloadgwtquery-15ae17b35ba87164d46e48e351783035b9eecbf2.tar.gz
gwtquery-15ae17b35ba87164d46e48e351783035b9eecbf2.zip
Check nulls when creating properties
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java
index 167298c5..906b5b03 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java
@@ -28,13 +28,15 @@ public class Properties extends JavaScriptObject {
}
public static Properties create(String properties) {
- String p = camelizePropertiesKeys(wrapPropertiesString(properties));
- try {
- return (Properties) createImpl(p);
- } catch (Exception e) {
- System.err.println("Error creating Properties: \n> " + properties + "\n< " + p + "\n" + e.getMessage());
- return create();
+ if (properties != null && !properties.isEmpty()) {
+ String p = camelizePropertiesKeys(wrapPropertiesString(properties));
+ try {
+ return (Properties) createImpl(p);
+ } catch (Exception e) {
+ System.err.println("Error creating Properties: \n> " + properties + "\n< " + p + "\n" + e.getMessage());
+ }
}
+ return create();
}
public static final native JavaScriptObject createImpl(String properties) /*-{