Use log(...) instead of log(..., (Throwable) null) for GWT.log and
servlet logs.

Review by: jat



git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@7346 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/javadoc/com/google/gwt/examples/DateTimeFormatExample.java b/user/javadoc/com/google/gwt/examples/DateTimeFormatExample.java
index a4d1104..f0fd365 100644
--- a/user/javadoc/com/google/gwt/examples/DateTimeFormatExample.java
+++ b/user/javadoc/com/google/gwt/examples/DateTimeFormatExample.java
@@ -11,26 +11,26 @@
     Date today = new Date();
 
     // prints Tue Dec 18 12:01:26 GMT-500 2007 in the default locale.
-    GWT.log(today.toString(), null);
+    GWT.log(today.toString());
 
     // prints 12/18/07 in the default locale
-    GWT.log(DateTimeFormat.getShortDateFormat().format(today), null);
+    GWT.log(DateTimeFormat.getShortDateFormat().format(today));
 
     // prints December 18, 2007 in the default locale
-    GWT.log(DateTimeFormat.getLongDateFormat().format(today), null);
+    GWT.log(DateTimeFormat.getLongDateFormat().format(today));
 
     // prints 12:01 PM in the default locale
-    GWT.log(DateTimeFormat.getShortTimeFormat().format(today), null);
+    GWT.log(DateTimeFormat.getShortTimeFormat().format(today));
 
     // prints 12:01:26 PM GMT-05:00 in the default locale
-    GWT.log(DateTimeFormat.getLongTimeFormat().format(today), null);
+    GWT.log(DateTimeFormat.getLongTimeFormat().format(today));
 
     // prints Dec 18, 2007 12:01:26 PM in the default locale
-    GWT.log(DateTimeFormat.getMediumDateTimeFormat().format(today), null);
+    GWT.log(DateTimeFormat.getMediumDateTimeFormat().format(today));
     
     // A custom date format
     DateTimeFormat fmt = DateTimeFormat.getFormat("EEEE, MMMM dd, yyyy");
     // prints Monday, December 17, 2007 in the default locale
-    GWT.log(fmt.format(today), null);
+    GWT.log(fmt.format(today));
   }
 }
diff --git a/user/javadoc/com/google/gwt/examples/NumberFormatExample.java b/user/javadoc/com/google/gwt/examples/NumberFormatExample.java
index 96c29ba..e383e90 100644
--- a/user/javadoc/com/google/gwt/examples/NumberFormatExample.java
+++ b/user/javadoc/com/google/gwt/examples/NumberFormatExample.java
@@ -11,29 +11,29 @@
     double value = 12345.6789;
     String formatted = fmt.format(value);
     // Prints 1,2345.6789 in the default locale
-    GWT.log("Formatted string is" + formatted, null);
+    GWT.log("Formatted string is" + formatted);
 
     // Turn a string back into a double
     value = NumberFormat.getDecimalFormat().parse("12345.6789");
-    GWT.log("Parsed value is" + value, null);
+    GWT.log("Parsed value is" + value);
 
     // Scientific notation
     value = 12345.6789;
     formatted = NumberFormat.getScientificFormat().format(value);
     // prints 1.2345E4 in the default locale
-    GWT.log("Formatted string is" + formatted, null);
+    GWT.log("Formatted string is" + formatted);
 
     // Currency
     fmt = NumberFormat.getCurrencyFormat();
     formatted = fmt.format(123456.7899);
     // prints US$123,456.79 in the default locale or $123,456.79 in the en_US
     // locale
-    GWT.log("Formatted currency is" + formatted, null);
+    GWT.log("Formatted currency is" + formatted);
     
     // Custom format
     value = 12345.6789;
     formatted = NumberFormat.getFormat("000000.000000").format(value);
     // prints 012345.678900 in the default locale
-    GWT.log("Formatted string is" + formatted, null);
+    GWT.log("Formatted string is" + formatted);
   }
 }
diff --git a/user/src/com/google/gwt/core/client/GWT.java b/user/src/com/google/gwt/core/client/GWT.java
index 732e4fd..215e4c4 100644
--- a/user/src/com/google/gwt/core/client/GWT.java
+++ b/user/src/com/google/gwt/core/client/GWT.java
@@ -196,18 +196,14 @@
    * Logs a message to the development shell logger in hosted mode. Calls are
    * optimized out in web mode.
    */
-  @SuppressWarnings("unused")
   public static void log(String message) {
-    if (sGWTBridge != null) {
-      sGWTBridge.log(message, null);
-    }
+    log(message, null);
   }
 
   /**
    * Logs a message to the development shell logger in hosted mode. Calls are
    * optimized out in web mode.
    */
-  @SuppressWarnings("unused")
   public static void log(String message, Throwable e) {
     if (sGWTBridge != null) {
       sGWTBridge.log(message, e);
diff --git a/user/src/com/google/gwt/user/client/History.java b/user/src/com/google/gwt/user/client/History.java
index e62bf8c..5224840 100644
--- a/user/src/com/google/gwt/user/client/History.java
+++ b/user/src/com/google/gwt/user/client/History.java
@@ -69,7 +69,7 @@
           + "include the history frame in your host page? Try "
           + "<iframe src=\"javascript:''\" id='__gwt_historyFrame' "
           + "style='position:absolute;width:0;height:0;border:0'>"
-          + "</iframe>", null);
+          + "</iframe>");
     }
   }
 
diff --git a/user/src/com/google/gwt/user/server/rpc/RemoteServiceServlet.java b/user/src/com/google/gwt/user/server/rpc/RemoteServiceServlet.java
index 6cc520e..86c39b5 100644
--- a/user/src/com/google/gwt/user/server/rpc/RemoteServiceServlet.java
+++ b/user/src/com/google/gwt/user/server/rpc/RemoteServiceServlet.java
@@ -99,7 +99,7 @@
           String message = "ERROR: The serialization policy file '"
               + serializationPolicyFilePath
               + "' was not found; did you forget to include it in this deployment?";
-          servlet.log(message, null);
+          servlet.log(message);
         }
       } finally {
         if (is != null) {
diff --git a/user/test/com/google/gwt/dev/shell/test/MultiModuleTest.java b/user/test/com/google/gwt/dev/shell/test/MultiModuleTest.java
index fabbe9f..ff3a48c 100644
--- a/user/test/com/google/gwt/dev/shell/test/MultiModuleTest.java
+++ b/user/test/com/google/gwt/dev/shell/test/MultiModuleTest.java
@@ -158,7 +158,7 @@
       panel.add(new Label("Frame 2b inner"));
       markLoaded(2);
     } else {
-      GWT.log("Unexpected frame name " + frameName, null);
+      GWT.log("Unexpected frame name " + frameName);
     }
   }