Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 76894 invoked from network); 10 Aug 2009 01:56:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Aug 2009 01:56:40 -0000 Received: (qmail 21886 invoked by uid 500); 10 Aug 2009 01:56:47 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 21826 invoked by uid 500); 10 Aug 2009 01:56:47 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 21817 invoked by uid 99); 10 Aug 2009 01:56:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Aug 2009 01:56:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Aug 2009 01:56:43 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9BF3123888CF; Mon, 10 Aug 2009 01:56:22 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r802638 - in /harmony/enhanced/classlib/trunk/modules/logging/src: main/java/java/util/logging/LogManager.java test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java Date: Mon, 10 Aug 2009 01:56:22 -0000 To: commits@harmony.apache.org From: qiuxx@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090810015622.9BF3123888CF@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: qiuxx Date: Mon Aug 10 01:56:22 2009 New Revision: 802638 URL: http://svn.apache.org/viewvc?rev=802638&view=rev Log: Apply for HARMONY-6289, LogManager breaks on subclassing Modified: harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java Modified: harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java?rev=802638&r1=802637&r2=802638&view=diff ============================================================================== --- harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java (original) +++ harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java Mon Aug 10 01:56:22 2009 @@ -404,7 +404,6 @@ * not have the required permissions to perform this action. */ public void readConfiguration() throws IOException { - checkAccess(); // check config class String configClassName = System .getProperty("java.util.logging.config.class"); //$NON-NLS-1$ @@ -425,7 +424,7 @@ InputStream input = null; try { input = new BufferedInputStream(new FileInputStream(configFile)); - readConfigurationImpl(input); + readConfiguration(input); } finally { if (input != null) { try { Modified: harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java?rev=802638&r1=802637&r2=802638&view=diff ============================================================================== --- harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java (original) +++ harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java Mon Aug 10 01:56:22 2009 @@ -455,6 +455,16 @@ } + public void testReadConfiguration() throws SecurityException, + IOException { + + MockConfigLogManager lm = new MockConfigLogManager(); + assertFalse(lm.isCalled); + + lm.readConfiguration(); + assertTrue(lm.isCalled); + } + private static void checkPropertyNull(LogManager m) { // assertNull(m.getProperty(".level")); assertNull(m.getProperty("java.util.logging.FileHandler.limit")); @@ -933,6 +943,15 @@ public static class MockLogManager extends LogManager { } + public static class MockConfigLogManager extends LogManager { + public boolean isCalled = false; + + public void readConfiguration(InputStream ins) throws IOException { + isCalled = true; + super.readConfiguration(ins); + } + } + public static class MockHandler extends Handler { static int number = 0;