8029347: sun/rmi/runtime/Log/checkLogging/CheckLogging.java fails in nightly intermittently
authorcoffeys
Wed, 04 Dec 2013 17:03:13 +0000
changeset 21972 c2c358652884
parent 21971 284411f25f79
child 21973 1c152053cba6
child 21974 e6e82424e6ef
8029347: sun/rmi/runtime/Log/checkLogging/CheckLogging.java fails in nightly intermittently Reviewed-by: alanb
jdk/test/sun/rmi/runtime/Log/checkLogging/CheckLogging.java
--- a/jdk/test/sun/rmi/runtime/Log/checkLogging/CheckLogging.java	Wed Dec 04 08:12:11 2013 -0800
+++ b/jdk/test/sun/rmi/runtime/Log/checkLogging/CheckLogging.java	Wed Dec 04 17:03:13 2013 +0000
@@ -76,6 +76,7 @@
 public class CheckLogging {
     private static int REGISTRY_PORT = -1;
     private static String LOCATION;
+    private static Logger logger;
 
     private static final ByteArrayOutputStream clientCallOut =
         new ByteArrayOutputStream();
@@ -89,8 +90,8 @@
             System.err.println("set default stream");
             LogStream.setDefaultStream(new PrintStream(clientCallOut));
         } else {
-            Logger.getLogger("sun.rmi.client.call").
-                addHandler(new InternalStreamHandler(clientCallOut));
+            logger = Logger.getLogger("sun.rmi.client.call");
+            logger.addHandler(new InternalStreamHandler(clientCallOut));
         }
     }