82 Commits

Author SHA1 Message Date
Lana Steuck
657b9db1ba 8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
Updated files with 2011, 2012 and 2013 years according to the file's last updated date

Reviewed-by: tbell, lancea, chegar
2013-12-26 12:04:16 -08:00
Daniel Fuchs
2f7d6e1157 8029876: Add a test to verify that Logger.getLogger & LogManager.getLogManager don't throw NPE when System.out == null
Adds a new test that verifies that the suspected root cause of JDK-8025512 does not cause NPE to be thrown.

Reviewed-by: mchung
2014-02-11 12:23:28 +01:00
Daniel Fuchs
11c56780a4 8033542: test/java/util/logging/SimpleLogManager might let Loggers be gc'ed too early
Fix another case of potentially premature Logger garbage collection in tests.

Reviewed-by: mchung
2014-02-05 17:56:04 +01:00
Vladimir Kozlov
57b7b831ae Merge 2014-01-28 14:57:41 -08:00
Vladimir Kozlov
9c83896027 Merge 2014-01-22 14:17:32 -08:00
Daniel Fuchs
3f1dd83c32 8031980: Add new j.u.l deadlock test for JDK-8027670 and JDK-8029281
Adds a new test for the deadlock found in JDK-8027670 and fixed in JDK-8029281.

Reviewed-by: mchung
2014-01-21 14:28:13 +01:00
Volker Simonis
70041ae4e4 8028537: PPC64: Updated the JDK regression tests to run on AIX
Co-authored-by: Jonathan Lu <luchsh@linux.vnet.ibm.com>
Co-authored-by: Steve Poole <spoole@linux.vnet.ibm.com>
Reviewed-by: alanb
2014-01-17 21:54:30 +01:00
Daniel Fuchs
078338ed6a 8031068: java/util/logging/ParentLoggersTest.java: checkLoggers: getLoggerNames() returned unexpected loggers
The test was not keeping any strong reference on the loggers it created allowing for them to be garbage collected too early.

Reviewed-by: mchung, chegar
2014-01-10 15:51:24 +01:00
Peter Levart
1403c7fe08 8030801: SocketHandler(host, port) requires permission ("java.util.logging.LoggingPermission" "control")
8029781: Theoretical data race on java.util.logging.Handler.sealed

Use privileged actions instead of racy boolean field to elevate privilege when constructing logging handlers

Reviewed-by: mchung, dfuchs
2014-01-07 09:54:16 +01:00
Daniel Fuchs
39db63b1df 8030850: Setting .level=FINEST in logging configuration file doesn't work
SetLevel(INFO) was called too early on root logger, causing the value found in configuration file to be later ignored.

Reviewed-by: mchung
2013-12-22 11:20:07 +01:00
Daniel Fuchs
2be7f4fdda 8030187: TEST_BUG: java/util/logging/Logger/setResourceBundle/TestSetResourceBundle.java failing again
Yet another issue with Loggers being gc'ed too early.

Reviewed-by: mchung
2013-12-20 14:53:38 +01:00
Daniel Fuchs
c090f3f331 8030192: TESTFAIL: java/util/logging/TestLoggerBundleSync.java failed with NPE
This is a test bug - loggers held in local variables can be arbitrarily gc'ed if that variable is no longer used. The fix makes sure that the loggers won't be arbitrarily gc'ed before the test is complete.

Reviewed-by: mchung
2013-12-19 14:53:10 +01:00
Alan Bateman
00b823a27a 8029805: Remove LogManager addPropertyChangeListener and removePropertyChangeListener methods
8029806: Remove Packer/Unpacker addPropertyChangeLister and removePropertyListener methods

Reviewed-by: dfuchs, tbell, mchung, ihse
2013-12-15 08:11:41 +00:00
Daniel Fuchs
2c97b5c5cb 8029281: Synchronization issues in Logger and LogManager
Fixes several race conditions in logging which have been at the root cause of intermittent test failures.

Reviewed-by: mchung, plevart
2013-12-04 01:58:37 +01:00
Daniel Fuchs
c430720e0a 8005202: java/util/logging/CheckLockLocationTest.java fail on solars_10
This test has been seen failing on Solaris 10, presumably because it was run as root. The fix will skip the non-writable case if it can't make a non-writable dir.

Reviewed-by: mchung
2013-11-19 22:28:12 +01:00
Daniel Fuchs
f1917fec5d 8028185: XMLFormatter.format emits incorrect year
Fixes a regression where the year in the date was increased by 1900.

Reviewed-by: alanb, mchung
2013-11-19 20:10:58 +01:00
Mandy Chung
d26c11b9d7 8028234: Remove unused methods in sun.misc.JavaAWTAccess
Reviewed-by: art, dfuchs, lancea
2013-11-13 07:49:42 -08:00
Daniel Fuchs
e0c1c25d70 8026952: Test java/util/logging/LogManager/RootLogger/setLevel/TestRootLoggerLevel.java has wrong @bug id
Trivial: change @bug 8023163 into @bug 8026499

Reviewed-by: mchung, alanb
2013-11-13 10:50:30 +01:00
Daniel Fuchs
482f3cc1b9 8026863: regression in anonymous Logger.setParent method
Restore behaviour of setParent in anonymous logger and clarifies the spec with respect to security permissions.

Reviewed-by: mchung, prr
2013-10-28 10:52:07 +01:00
Daniel Fuchs
2f8b3bf80a 8026499: Root Logger level can be reset unexpectedly
This fix prevents the logger's level to be re-initialized if it has already been initialized.

Reviewed-by: mchung
2013-10-21 12:00:58 +02:00
Daniel Fuchs
9ef30e9ae7 8013839: Enhance Logger API for handling of resource bundles
4814565: (rb) add method to get basename from a ResourceBundle

Adds Logger.setResourceBundle(ResourceBundle) and ResourceBundle.getBaseBundleName()

Reviewed-by: mchung, naoto
2013-10-16 20:47:30 +02:00
Daniel Fuchs
c630cf1e68 8026404: Logging in Applet can trigger ACE: access denied ("java.lang.RuntimePermission" "modifyThreadGroup")
The test 'threadGroup.getParent() == null' can sometimes throw ACE and needs to be wrapped in doPrivileged.

Reviewed-by: alanb, mchung, dholmes
2013-10-15 13:01:28 +02:00
Mandy Chung
18f83d0a7c 8026027: Level.parse should return the custom Level instance instead of the mirrored Level
Reviewed-by: dfuchs, chegar
2013-10-09 06:24:42 -07:00
Daniel Fuchs
ddddd1d31f 8025140: TEST_BUG: java/util/logging/Logger/getGlobal tests fail due to timeout
Arbitrary timeouts in the tests @run lines where too agressive for some configurations. The tests will now run with default timeout.

Reviewed-by: alanb, mchung
2013-09-25 09:47:24 +02:00
Daniel Fuchs
f0317e41c1 8024525: Make Logger log methods call isLoggable()
This changeset makes the various Logger logging method call isLoggable() instead of inlining the level checks.

Reviewed-by: mchung, alanb
2013-09-12 17:01:39 +02:00
Daniel Fuchs
33dbc2d51c 8023168: Cleanup LogManager class initialization and LogManager/LoggerContext relationship
8021003: java/util/logging/Logger/getGlobal/TestGetGlobalConcurrent.java fails intermittently
8019945: test/java/util/logging/LogManagerInstanceTest.java failing intermittently

This fix untangles the class initialization of Logger and LogManager, and also cleans up the relationship between LogManager, LoggerContext, and Logger, which were at the root cause of some intermittent test failures.

Reviewed-by: mchung, martin, plevart
2013-09-09 13:59:51 +02:00
Daniel Fuchs
a0c3d88fba 8019853: Break logging and AWT circular dependency
Break logging and AWT circular dependency, which was at the root cause for 8023258 - Logger.getLogger() after ImageIO.read() returns different logger instance

Reviewed-by: mchung, art
2013-09-04 16:22:22 +02:00
Daniel Fuchs
b81e7785d1 8016127: NLS: logging.properties translatability recommendation
8024131: Issues with cached localizedLevelName in java.util.logging.Level

This fix updates logging.properties resource bundles to follow internationalization guidelines. It also fixes a caching issue with localizedLevelName. The regression test that was added needs both fixes to pass.

Reviewed-by: mchung, alanb
2013-09-02 18:28:50 +02:00
Daniel Fuchs
6d2de008d7 8005899: Logger.getLogger(name, null) should not allow to reset a non-null resource bundle
Reviewed-by: mchung, lancea
2013-08-23 20:59:34 +02:00
Daniel Fuchs
91e6f28796 8019948: java/util/logging/bundlesearch/ResourceBundleSearchTest.java is failing intermittently
Reviewed-by: mchung, dholmes
2013-08-13 16:00:44 +02:00
Daniel Fuchs
5f717a6674 7184195: java.util.logging.Logger.getGlobal().info() doesn't log without configuration
Due to subtle synchronization issues between LogManager & Logger class initialization the global logger doesn't have its 'manager' field initialized until the LogManager is initialized. This fix will ensure that the global logger has its 'manager' field set when getGlobal() is called.

Reviewed-by: mchung, plevart
2013-07-02 19:47:58 +02:00
Daniel Fuchs
677643324e 8017174: NPE when using Logger.getAnonymousLogger or LogManager.getLogManager().getLogger
This patch makes sure that LoggerContext instances created for applets have a root and global logger.

Reviewed-by: mchung
2013-07-02 11:30:31 +02:00
Mandy Chung
24edc8dc91 8010727: WLS fails to add a logger with "" in its own LogManager subclass instance
Reviewed-by: alanb, jgish
2013-05-14 08:07:08 -07:00
Jim Gish
b0c93f4d19 8013380: Removal of stack walk to find resource bundle breaks Glassfish startup
Use caller's classloader to load resource as an alternative to thread context classloader and system classloader

Reviewed-by: mchung, alanb
2013-05-16 11:19:00 -04:00
Jim Gish
8f316cc40e 8010939: Deadlock in LogManager
Re-order locks to avoid deadlock

Reviewed-by: mchung
2013-04-19 16:50:10 -07:00
Jim Gish
30e93b56e3 8012005: LogManager needs test to ensure stack trace is not being done to find bundle
Reviewed-by: mchung
2013-04-18 16:33:11 -04:00
Mandy Chung
c9e6a41b99 8006104: Improve tests to test ".useParentHandlers" property set in the logging configuration
Reviewed-by: alanb
2013-03-20 09:50:07 -07:00
Lana Steuck
4f62a2b334 Merge 2013-03-15 23:31:19 -07:00
Jim Gish
709f67b8f9 8002070: Remove the stack search for a resource bundle for Logger to use
The fragile, vulnerable, stack crawling has been eliminated from findResourceBundle(String)

Reviewed-by: mchung, alanb
2013-03-13 11:24:48 -04:00
Edvard Wendelin
2f5be3ab0d Merge 2013-02-25 08:44:00 +01:00
David Holmes
eb1726c151 Merge 2013-02-04 18:08:50 -05:00
Henry Jen
293df92991 8005632: Extend java.util.Logger to use Supplier<String> for messages
Reviewed-by: briangoetz, mduigou
2013-01-25 16:13:32 -08:00
Alan Bateman
3ca765dfbd 8004931: add/removePropertyChangeListener should not exist in subset Profiles of Java SE
Reviewed-by: dholmes, mchung, ksrini
2013-01-21 23:23:12 -05:00
Mandy Chung
3243aaf47a 8005615: Java Logger fails to load tomcat logger implementation (JULI)
Reviewed-by: alanb, ahgross
2013-01-10 19:43:36 -08:00
Lana Steuck
b7af263526 Merge 2012-12-28 18:36:41 -08:00
David Katleman
306cab1006 8004982: JDK8 source with GPL header errors
Reviewed-by: ohair
2012-12-20 16:24:50 -08:00
Alexey Utkin
c5c34df7bf 8004928: TEST_BUG: Reduce dependence of CoreLib tests from the AWT subsystem
The tests were refactored to drop AWT dependence where it was possible.

Reviewed-by: alanb, mchung
2012-12-17 14:34:37 +04:00
Jim Gish
3e23931d0c 8004651: TEST: java/util/logging/CheckLockLocationTest.java failed to delete file (win)
Failure to delete test log file should be a warning instead of test failure

Reviewed-by: mduigou, smarks
2012-12-12 15:37:27 -08:00
Jim Gish
f436d23492 8003596: TEST_BUG: java/util/logging/CheckLockLocationTest.java failing [win]
Reviewed-by: alanb
2012-12-04 20:21:19 +00:00
Jim Gish
7aed72aa11 8003380: Compiler warnings in logging test code
Use generics, suppress warnings where appropriate, remove unused imports, etc.

Reviewed-by: lancea, chegar
2012-11-29 12:28:02 +00:00