harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r410586 - /incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java
Date Wed, 31 May 2006 16:31:40 GMT
Author: tellison
Date: Wed May 31 09:31:39 2006
New Revision: 410586

URL: http://svn.apache.org/viewvc?rev=410586&view=rev
Log:
Generic uplift for LogManager API

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java?rev=410586&r1=410585&r2=410586&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java
Wed May 31 09:31:39 2006
@@ -154,7 +154,7 @@
      * Instance variables
      * -------------------------------------------------------------------
      */
-    private Hashtable loggers;
+    private Hashtable<String, Logger> loggers;
 
     private Logger root;
 
@@ -207,11 +207,11 @@
      * can subclass the object.
      */
     protected LogManager() {
-        loggers = new Hashtable();
+        loggers = new Hashtable<String, Logger>();
         props = new Properties();
         listeners = new PropertyChangeSupport(this);
         //add shutdown hook to ensure that the associated resource will be freed when JVM
exits
-        AccessController.doPrivileged(new PrivilegedAction() {
+        AccessController.doPrivileged(new PrivilegedAction<Object>() {
             public Object run() {
                 Runtime.getRuntime().addShutdownHook(new Thread() {
                     public void run() {
@@ -327,7 +327,7 @@
      *
      * @return		enumeration of registered logger names
      */
-    public synchronized Enumeration getLoggerNames() {
+    public synchronized Enumeration<String> getLoggerNames() {
         return loggers.keys();
     }
 
@@ -369,8 +369,8 @@
 
     //use privilege code to get system property
     static String getPrivilegedSystemProperty(final String key) {
-        return (String) AccessController.doPrivileged(new PrivilegedAction() {
-            public Object run() {
+        return AccessController.doPrivileged(new PrivilegedAction<String>() {
+            public String run() {
                 return System.getProperty(key);
             }
         });



Mime
View raw message