aboutsummaryrefslogtreecommitdiffstats
path: root/gwtquery-core/src
diff options
context:
space:
mode:
authorManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>2013-03-15 16:14:23 +0100
committerManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>2013-03-15 16:14:23 +0100
commit7915a9a2d25a38b9ec45529d4bf82bd95bb2658a (patch)
tree52e44935062e809b6c1636cf313215f8f73b90d0 /gwtquery-core/src
parentdb5fcdaa7c4e326ed99476922ac4de1fc8fc33cf (diff)
downloadgwtquery-7915a9a2d25a38b9ec45529d4bf82bd95bb2658a.tar.gz
gwtquery-7915a9a2d25a38b9ec45529d4bf82bd95bb2658a.zip
Enclose println used warn the user in dev mode in a block so as it does not generates any code in production
Diffstat (limited to 'gwtquery-core/src')
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java6
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsUtils.java5
3 files changed, 10 insertions, 5 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
index 0fad3d5c..d2d0e486 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
@@ -274,7 +274,9 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
if (o instanceof IsWidget) {
return $(Arrays.asList(o));
}
- System.err.println("GQuery.$(Object o) could not wrap the type : " + o.getClass());
+ if (!GWT.isProdMode()) {
+ System.err.println("GQuery.$(Object o) could not wrap the type : " + o.getClass());
+ }
}
return $();
}
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 87840ec7..7999e10d 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
@@ -17,6 +17,7 @@ package com.google.gwt.query.client;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArrayMixed;
+import com.google.gwt.core.shared.GWT;
import com.google.gwt.query.client.js.JsCache;
import com.google.gwt.query.client.js.JsUtils;
@@ -35,8 +36,9 @@ public class Properties extends JavaScriptObject {
try {
return JsUtils.parseJSON(p);
} catch (Exception e) {
- String msg = e.getMessage();
- System.err.println("Error creating Properties: \n> " + properties + "\n< " + p + "\n" + msg);
+ if (!GWT.isProdMode()) {
+ System.err.println("Error creating Properties: \n> " + properties + "\n< " + p + "\n" + e.getMessage());
+ }
}
}
return create();
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsUtils.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsUtils.java
index 645ccd15..2d9ba9dd 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsUtils.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsUtils.java
@@ -404,8 +404,9 @@ public class JsUtils {
try {
return utilsImpl.parseJSON(json);
} catch (Exception e) {
- System.err.println("Error while parsing json: " + e.getMessage() + ".\n"
- + json);
+ if (!GWT.isProdMode()) {
+ System.err.println("Error while parsing json: " + e.getMessage() + ".\n" + json);
+ }
return Properties.create();
}
}