Revision: 7346
Author: [email protected]
Date: Tue Dec 22 09:01:01 2009
Log: Use log(...) instead of log(..., (Throwable) null) for GWT.log and
servlet logs.

Review by: jat


http://code.google.com/p/google-web-toolkit/source/detail?r=7346

Modified:
  /trunk/user/javadoc/com/google/gwt/examples/DateTimeFormatExample.java
  /trunk/user/javadoc/com/google/gwt/examples/NumberFormatExample.java
  /trunk/user/src/com/google/gwt/core/client/GWT.java
  /trunk/user/src/com/google/gwt/user/client/History.java
  /trunk/user/src/com/google/gwt/user/server/rpc/RemoteServiceServlet.java
  /trunk/user/test/com/google/gwt/dev/shell/test/MultiModuleTest.java

=======================================
--- /trunk/user/javadoc/com/google/gwt/examples/DateTimeFormatExample.java      
 
Fri Apr  4 09:22:37 2008
+++ /trunk/user/javadoc/com/google/gwt/examples/DateTimeFormatExample.java      
 
Tue Dec 22 09:01:01 2009
@@ -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));
    }
  }
=======================================
--- /trunk/user/javadoc/com/google/gwt/examples/NumberFormatExample.java        
 
Mon May 18 14:33:46 2009
+++ /trunk/user/javadoc/com/google/gwt/examples/NumberFormatExample.java        
 
Tue Dec 22 09:01:01 2009
@@ -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);
    }
  }
=======================================
--- /trunk/user/src/com/google/gwt/core/client/GWT.java Thu Dec 17 11:25:09  
2009
+++ /trunk/user/src/com/google/gwt/core/client/GWT.java Tue Dec 22 09:01:01  
2009
@@ -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);
=======================================
--- /trunk/user/src/com/google/gwt/user/client/History.java     Thu Jan 22  
08:32:30 2009
+++ /trunk/user/src/com/google/gwt/user/client/History.java     Tue Dec 22  
09:01:01 2009
@@ -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>");
      }
    }

=======================================
---  
/trunk/user/src/com/google/gwt/user/server/rpc/RemoteServiceServlet.java        
 
Fri Dec 18 10:10:29 2009
+++  
/trunk/user/src/com/google/gwt/user/server/rpc/RemoteServiceServlet.java        
 
Tue Dec 22 09:01:01 2009
@@ -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) {
=======================================
--- /trunk/user/test/com/google/gwt/dev/shell/test/MultiModuleTest.java Mon  
Feb 11 11:02:09 2008
+++ /trunk/user/test/com/google/gwt/dev/shell/test/MultiModuleTest.java Tue  
Dec 22 09:01:01 2009
@@ -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);
      }
    }

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to