You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2006/07/10 22:54:30 UTC
[jira] Resolved: (HARMONY-777) [classlib][logging] unexpected IAE
for java.util.logging.FileHandler.Ctor's if "limit < 1 || count < 0"
[ http://issues.apache.org/jira/browse/HARMONY-777?page=all ]
Tim Ellison resolved HARMONY-777:
---------------------------------
Resolution: Fixed
Thanks Vladimir.
Patch applied to LOGGING module at repo revision r420630.
Please check that the patch was applied as you expected.
> [classlib][logging] unexpected IAE for java.util.logging.FileHandler.Ctor's if "limit < 1 || count < 0"
> -------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-777
> URL: http://issues.apache.org/jira/browse/HARMONY-777
> Project: Harmony
> Type: Bug
> Reporter: Vladimir Ivanov
> Assignee: Tim Ellison
> Attachments: FileHandler.patch, FileHandlerTest.patch
>
> The Harmony throws unexpected IAE for methods java.util.logging.FileHandler.FileHandler(String pattern, int limit, int count) and java.util.logging.FileHandler.FileHandler(String pattern, int limit, int count, boolean append) when "limit < 1 || count < 0" while RI throws IAE when 'if limit < 0, or count < 1'
> ================ test.java =====================
> import java.util.logging.FileHandler;
> public class test {
> public static void main (String[] args) {
> try {
> try {
> new FileHandler("a",0,1);
> System.out.println("OK");
> } catch (IllegalArgumentException e) {
> e.printStackTrace();
> }
> try {
> new FileHandler("a",0,1,false);
> System.out.println("OK");
> } catch (IllegalArgumentException e) {
> e.printStackTrace();
> }
> } catch (Exception e) {
> System.out.println("unexpected exception");
> }
> }
> }
> ============================================
> Output:
> C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -showversion test
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
> OK
> OK
> C:\tmp\tmp17>C:\harmony\trunk_0427\deploy\jdk\jre\bin\java.exe -showversion test
> java version 1.5 (subset)
> (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java.lang.IllegalArgumentException: The limit and count property must larger than 0 and 1, respctively
> at java.util.logging.FileHandler.<init>(FileHandler.java:454)
> at test.main(test.java:8)
> java.lang.IllegalArgumentException: The limit and count property must larger than 0 and 1, respectively
> at java.util.logging.FileHandler.<init>(FileHandler.java:498)
> at test.main(test.java:14)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira