test/sun/util/logging/PlatformLoggerTest.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/test/sun/util/logging/PlatformLoggerTest.java Thu Apr 28 13:49:58 2016
--- new/test/sun/util/logging/PlatformLoggerTest.java Thu Apr 28 13:49:57 2016
*** 29,68 ****
--- 29,73 ----
* operations. othervm mode to make sure java.util.logging
* is not initialized.
*
* @modules java.base/sun.util.logging
* java.logging/sun.util.logging.internal
* @compile -XDignore.symbol.file PlatformLoggerTest.java
* @run main/othervm PlatformLoggerTest
*/
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.logging.*;
import sun.util.logging.PlatformLogger;
import static sun.util.logging.PlatformLogger.Level.*;
public class PlatformLoggerTest {
+
+ static Logger logger;
+ static PlatformLogger bar;
+ static PlatformLogger goo;
+ static PlatformLogger foo;
+
public static void main(String[] args) throws Exception {
final String FOO_PLATFORM_LOGGER = "test.platformlogger.foo";
final String BAR_PLATFORM_LOGGER = "test.platformlogger.bar";
final String GOO_PLATFORM_LOGGER = "test.platformlogger.goo";
final String BAR_LOGGER = "test.logger.bar";
- PlatformLogger goo = PlatformLogger.getLogger(GOO_PLATFORM_LOGGER);
// test the PlatformLogger methods
testLogMethods(goo);
// Create a platform logger using the default
- PlatformLogger foo = PlatformLogger.getLogger(FOO_PLATFORM_LOGGER);
checkPlatformLogger(foo, FOO_PLATFORM_LOGGER);
// create a java.util.logging.Logger
// now java.util.logging.Logger should be created for each platform logger
- Logger logger = Logger.getLogger(BAR_LOGGER);
logger.setLevel(Level.WARNING);
- PlatformLogger bar = PlatformLogger.getLogger(BAR_PLATFORM_LOGGER);
checkPlatformLogger(bar, BAR_PLATFORM_LOGGER);
// test the PlatformLogger methods
testLogMethods(goo);
testLogMethods(bar);
test/sun/util/logging/PlatformLoggerTest.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File