harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r769234 - in /harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging: Formatter.java Handler.java LogManager.java LogRecord.java XMLFormatter.java
Date Tue, 28 Apr 2009 04:06:23 GMT
Author: ndbeyer
Date: Tue Apr 28 04:06:21 2009
New Revision: 769234

URL: http://svn.apache.org/viewvc?rev=769234&view=rev
Log:
Remove some unnecessary code and tidy up

Modified:
    harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Formatter.java
    harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Handler.java
    harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java
    harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogRecord.java
    harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/XMLFormatter.java

Modified: harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Formatter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Formatter.java?rev=769234&r1=769233&r2=769234&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Formatter.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Formatter.java
Tue Apr 28 04:06:21 2009
@@ -99,7 +99,6 @@
      * @return the head string used to wrap a set of log records, empty in this
      *         implementation.
      */
-    @SuppressWarnings("unused")
     public String getHead(Handler h) {
         return ""; //$NON-NLS-1$
     }
@@ -113,7 +112,6 @@
      * @return the tail string used to wrap a set of log records, empty in this
      *         implementation.
      */
-    @SuppressWarnings("unused")
     public String getTail(Handler h) {
         return ""; //$NON-NLS-1$
     }

Modified: harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Handler.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Handler.java?rev=769234&r1=769233&r2=769234&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Handler.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Handler.java
Tue Apr 28 04:06:21 2009
@@ -106,11 +106,10 @@
         errorMan.error(msg, e, ErrorManager.GENERIC_FAILURE);
     }
 
-    /*
+    /**
      * init the common properties, including filter, level, formatter, and
      * encoding
      */
-    @SuppressWarnings("unused")
     void initProperties(String defaultLevel, String defaultFilter,
             String defaultFormatter, String defaultEncoding) {
         LogManager manager = LogManager.getLogManager();

Modified: harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java?rev=769234&r1=769233&r2=769234&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java
Tue Apr 28 04:06:21 2009
@@ -159,7 +159,7 @@
             ObjectName loggingMXBeanName = new ObjectName(LOGGING_MXBEAN_NAME);
             MBeanServer platformBeanServer = ManagementFactory
                     .getPlatformMBeanServer();
-            Set loggingMXBeanSet = platformBeanServer.queryMBeans(
+            Set<?> loggingMXBeanSet = platformBeanServer.queryMBeans(
                     loggingMXBeanName, null);
 
             if (loggingMXBeanSet.size() != 1) {
@@ -167,10 +167,10 @@
                 throw new AssertionError(Messages.getString("logging.21")); //$NON-NLS-1$
             }
 
-            Iterator i = loggingMXBeanSet.iterator();
+            Iterator<?> i = loggingMXBeanSet.iterator();
             ObjectInstance loggingMXBeanOI = (ObjectInstance) i.next();
             String lmxbcn = loggingMXBeanOI.getClassName();
-            Class lmxbc = Class.forName(lmxbcn);
+            Class<?> lmxbc = Class.forName(lmxbcn);
             Method giMethod = lmxbc.getDeclaredMethod("getInstance"); //$NON-NLS-1$
             giMethod.setAccessible(true);
             LoggingMXBean lmxb = (LoggingMXBean) giMethod.invoke(null,

Modified: harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogRecord.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogRecord.java?rev=769234&r1=769233&r2=769234&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogRecord.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogRecord.java
Tue Apr 28 04:06:21 2009
@@ -491,7 +491,8 @@
         // only check MAJOR version
         if (major != MAJOR) {
             // logging.5=Different version - {0}.{1}
-            throw new IOException(Messages.getString("logging.5", major, minor)); //$NON-NLS-1$

+            throw new IOException(Messages.getString("logging.5", //$NON-NLS-1$
+                    Byte.valueOf(major), Byte.valueOf(minor)));
         }
 
         int length = in.readInt();

Modified: harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/XMLFormatter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/XMLFormatter.java?rev=769234&r1=769233&r2=769234&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/XMLFormatter.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/XMLFormatter.java
Tue Apr 28 04:06:21 2009
@@ -198,7 +198,6 @@
      * @return the tail string for log records formatted as XML strings.
      */
     @Override
-    @SuppressWarnings("unused")
     public String getTail(Handler h) {
         return "</log>"; //$NON-NLS-1$
     }



Mime
View raw message