diff --git a/test/java/util/logging/LoggingMXBeanTest.java b/test/java/util/logging/LoggingMXBeanTest.java index e6c694d37e4cac2a8e18191e7c056b4083b0ad5c..a01e57c13574817b59be422ca72305bc37233296 100644 --- a/test/java/util/logging/LoggingMXBeanTest.java +++ b/test/java/util/logging/LoggingMXBeanTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,6 +43,8 @@ public class LoggingMXBeanTest ObjectName objectName = null; static String LOGGER_NAME_1 = "com.sun.management.Logger1"; static String LOGGER_NAME_2 = "com.sun.management.Logger2"; + static Logger logger1; + static Logger logger2; public LoggingMXBeanTest() throws Exception { @@ -131,8 +133,8 @@ public class LoggingMXBeanTest System.out.println( "*********** Phase 3 ***********" ); System.out.println( "*******************************" ); System.out.println( " Create and test new Loggers" ); - Logger logger1 = Logger.getLogger( LOGGER_NAME_1 ); - Logger logger2 = Logger.getLogger( LOGGER_NAME_2 ); + logger1 = Logger.getLogger( LOGGER_NAME_1 ); + logger2 = Logger.getLogger( LOGGER_NAME_2 ); // check that Level object are returned properly try { diff --git a/test/java/util/logging/LoggingMXBeanTest2.java b/test/java/util/logging/LoggingMXBeanTest2.java index 37b6aceb0231b7009a89823c11942ba757af478f..005ed72e03a14db025bacc5b3c3474a3493c92fe 100644 --- a/test/java/util/logging/LoggingMXBeanTest2.java +++ b/test/java/util/logging/LoggingMXBeanTest2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,12 +42,14 @@ public class LoggingMXBeanTest2 static String LOGGER_NAME_1 = "com.sun.management.Logger"; static String LOGGER_NAME_2 = "com.sun.management.Logger.Logger2"; static String UNKNOWN_LOGGER_NAME = "com.sun.management.Unknown"; + static Logger logger1; + static Logger logger2; public LoggingMXBeanTest2() throws Exception { - Logger logger1 = Logger.getLogger( LOGGER_NAME_1 ); + logger1 = Logger.getLogger( LOGGER_NAME_1 ); logger1.setLevel(Level.FINE); - Logger logger2 = Logger.getLogger( LOGGER_NAME_2 ); + logger2 = Logger.getLogger( LOGGER_NAME_2 ); logger2.setLevel(null); /*