harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r468445 - /incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Logger.java
Date Fri, 27 Oct 2006 16:30:24 GMT
Author: pyang
Date: Fri Oct 27 09:30:23 2006
New Revision: 468445

URL: http://svn.apache.org/viewvc?view=rev&rev=468445
Log:
Oops, I went too much, no need to get handlers snapshot in Logger.reset() because it has been
synchronized

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

Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Logger.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Logger.java?view=diff&rev=468445&r1=468444&r2=468445
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Logger.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Logger.java
Fri Oct 27 09:30:23 2006
@@ -1390,16 +1390,17 @@
     synchronized void reset() {
         levelObjVal = null;
         levelIntVal = Level.INFO.intValue();
-        Handler[] allHandlers = getHandlers();
-        for (Handler element : allHandlers) {
-            // close all handlers, when unknown exceptions happen,
-            // ignore them and go on
-            try {
-                element.close();
-            } catch (Exception e) {
-                // Ignored.
+        if(handlers != null){
+            for (Handler element : handlers) {
+                // close all handlers, when unknown exceptions happen,
+                // ignore them and go on
+                try {
+                    element.close();
+                } catch (Exception e) {
+                    // Ignored.
+                }
             }
-            removeHandler(element);
+            handlers.clear();
         }
         handlerInited = false;
     }



Mime
View raw message