You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Anton Luht (JIRA)" <ji...@apache.org> on 2006/07/12 16:57:29 UTC
[jira] Created: (HARMONY-855) Some java.uiti.Collections methods do
not throw unspecified NPE while RI does
Some java.uiti.Collections methods do not throw unspecified NPE while RI does
-----------------------------------------------------------------------------
Key: HARMONY-855
URL: http://issues.apache.org/jira/browse/HARMONY-855
Project: Harmony
Type: Bug
Components: Non-bug differences from RI
Environment: Windows XP professional
Reporter: Anton Luht
Priority: Minor
Build: classlib+VM revision 421248 msvc debug
Problem:
Some Collections.checked... methods throw NPE if one of their arguments is null in RI but don't throw in Harmony
Code to reproduce:
import java.util.*;
public class Test {
public static void main (String[] args) {
try {
Collections.checkedSortedMap(new TreeMap(), null, Short.TYPE);
System.err.println("fail 1");
} catch (NullPointerException e) {
}
try {
Collections.checkedSortedMap(new TreeMap(), Float.TYPE, null);
System.err.println("fail 1.1");
} catch (NullPointerException e) {
}
try {
Collections.checkedMap(new TreeMap(), null, Float.TYPE);
System.err.println("fail 2");
} catch (NullPointerException e) {
}
try {
Collections.checkedMap(new TreeMap(), Float.TYPE, null);
System.err.println("fail 2.2");
} catch (NullPointerException e) {
}
try {
Collections.checkedCollection(new Stack(), null);
System.err.println("fail 3");
} catch (NullPointerException e) {
}
}
}
in RI this test prints nothing, in Harmony all 'fail' messages are printed
Please see the patch attached. It contains:
- JUnit test for the problem
- patch for java.util.Collections
--
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
[jira] Closed: (HARMONY-855) [Classlib][util]Some
java.uiti.Collections methods do not throw unspecified NPE while RI does
Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-855?page=all ]
Paulex Yang closed HARMONY-855.
-------------------------------
Verified by Anton and Spark.
> [Classlib][util]Some java.uiti.Collections methods do not throw unspecified NPE while RI does
> ---------------------------------------------------------------------------------------------
>
> Key: HARMONY-855
> URL: http://issues.apache.org/jira/browse/HARMONY-855
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Windows XP professional
> Reporter: Anton Luht
> Assigned To: Paulex Yang
> Priority: Minor
> Attachments: harmony-855.diff, patch.txt
>
>
> Build: classlib+VM revision 421248 msvc debug
> Problem:
> Some Collections.checked... methods throw NPE if one of their arguments is null in RI but don't throw in Harmony
> Code to reproduce:
> import java.util.*;
> public class Test {
> public static void main (String[] args) {
> try {
> Collections.checkedSortedMap(new TreeMap(), null, Short.TYPE);
> System.err.println("fail 1");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedSortedMap(new TreeMap(), Float.TYPE, null);
> System.err.println("fail 1.1");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedMap(new TreeMap(), null, Float.TYPE);
> System.err.println("fail 2");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedMap(new TreeMap(), Float.TYPE, null);
> System.err.println("fail 2.2");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedCollection(new Stack(), null);
> System.err.println("fail 3");
> } catch (NullPointerException e) {
> }
> }
> }
> in RI this test prints nothing, in Harmony all 'fail' messages are printed
> Please see the patch attached. It contains:
> - JUnit test for the problem
> - patch for java.util.Collections
--
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
[jira] Assigned: (HARMONY-855) [Classlib][util]Some
java.uiti.Collections methods do not throw unspecified NPE while RI does
Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-855?page=all ]
Paulex Yang reassigned HARMONY-855:
-----------------------------------
Assignee: Paulex Yang
> [Classlib][util]Some java.uiti.Collections methods do not throw unspecified NPE while RI does
> ---------------------------------------------------------------------------------------------
>
> Key: HARMONY-855
> URL: http://issues.apache.org/jira/browse/HARMONY-855
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Windows XP professional
> Reporter: Anton Luht
> Assigned To: Paulex Yang
> Priority: Minor
> Attachments: harmony-855.diff, patch.txt
>
>
> Build: classlib+VM revision 421248 msvc debug
> Problem:
> Some Collections.checked... methods throw NPE if one of their arguments is null in RI but don't throw in Harmony
> Code to reproduce:
> import java.util.*;
> public class Test {
> public static void main (String[] args) {
> try {
> Collections.checkedSortedMap(new TreeMap(), null, Short.TYPE);
> System.err.println("fail 1");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedSortedMap(new TreeMap(), Float.TYPE, null);
> System.err.println("fail 1.1");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedMap(new TreeMap(), null, Float.TYPE);
> System.err.println("fail 2");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedMap(new TreeMap(), Float.TYPE, null);
> System.err.println("fail 2.2");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedCollection(new Stack(), null);
> System.err.println("fail 3");
> } catch (NullPointerException e) {
> }
> }
> }
> in RI this test prints nothing, in Harmony all 'fail' messages are printed
> Please see the patch attached. It contains:
> - JUnit test for the problem
> - patch for java.util.Collections
--
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
[jira] Updated: (HARMONY-855) Some java.uiti.Collections methods do
not throw unspecified NPE while RI does
Posted by "Anton Luht (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-855?page=all ]
Anton Luht updated HARMONY-855:
-------------------------------
Attachment: patch.txt
patch
> Some java.uiti.Collections methods do not throw unspecified NPE while RI does
> -----------------------------------------------------------------------------
>
> Key: HARMONY-855
> URL: http://issues.apache.org/jira/browse/HARMONY-855
> Project: Harmony
> Type: Bug
> Components: Non-bug differences from RI
> Environment: Windows XP professional
> Reporter: Anton Luht
> Priority: Minor
> Attachments: patch.txt
>
> Build: classlib+VM revision 421248 msvc debug
> Problem:
> Some Collections.checked... methods throw NPE if one of their arguments is null in RI but don't throw in Harmony
> Code to reproduce:
> import java.util.*;
> public class Test {
> public static void main (String[] args) {
> try {
> Collections.checkedSortedMap(new TreeMap(), null, Short.TYPE);
> System.err.println("fail 1");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedSortedMap(new TreeMap(), Float.TYPE, null);
> System.err.println("fail 1.1");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedMap(new TreeMap(), null, Float.TYPE);
> System.err.println("fail 2");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedMap(new TreeMap(), Float.TYPE, null);
> System.err.println("fail 2.2");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedCollection(new Stack(), null);
> System.err.println("fail 3");
> } catch (NullPointerException e) {
> }
> }
> }
> in RI this test prints nothing, in Harmony all 'fail' messages are printed
> Please see the patch attached. It contains:
> - JUnit test for the problem
> - patch for java.util.Collections
--
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
[jira] Commented: (HARMONY-855) [Classlib][util]Some
java.uiti.Collections methods do not throw unspecified NPE while RI does
Posted by "spark shen (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-855?page=comments#action_12435626 ]
spark shen commented on HARMONY-855:
------------------------------------
Veryfied at r447694
> [Classlib][util]Some java.uiti.Collections methods do not throw unspecified NPE while RI does
> ---------------------------------------------------------------------------------------------
>
> Key: HARMONY-855
> URL: http://issues.apache.org/jira/browse/HARMONY-855
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Windows XP professional
> Reporter: Anton Luht
> Assigned To: Paulex Yang
> Priority: Minor
> Attachments: harmony-855.diff, patch.txt
>
>
> Build: classlib+VM revision 421248 msvc debug
> Problem:
> Some Collections.checked... methods throw NPE if one of their arguments is null in RI but don't throw in Harmony
> Code to reproduce:
> import java.util.*;
> public class Test {
> public static void main (String[] args) {
> try {
> Collections.checkedSortedMap(new TreeMap(), null, Short.TYPE);
> System.err.println("fail 1");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedSortedMap(new TreeMap(), Float.TYPE, null);
> System.err.println("fail 1.1");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedMap(new TreeMap(), null, Float.TYPE);
> System.err.println("fail 2");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedMap(new TreeMap(), Float.TYPE, null);
> System.err.println("fail 2.2");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedCollection(new Stack(), null);
> System.err.println("fail 3");
> } catch (NullPointerException e) {
> }
> }
> }
> in RI this test prints nothing, in Harmony all 'fail' messages are printed
> Please see the patch attached. It contains:
> - JUnit test for the problem
> - patch for java.util.Collections
--
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
[jira] Resolved: (HARMONY-855) [Classlib][util]Some
java.uiti.Collections methods do not throw unspecified NPE while RI does
Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-855?page=all ]
Paulex Yang resolved HARMONY-855.
---------------------------------
Resolution: Fixed
Anton and Spark, updated patch applied at revision r447348, thanks a lot for this enhancement, please verify that the problem is fully fixed as you expected.
> [Classlib][util]Some java.uiti.Collections methods do not throw unspecified NPE while RI does
> ---------------------------------------------------------------------------------------------
>
> Key: HARMONY-855
> URL: http://issues.apache.org/jira/browse/HARMONY-855
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Windows XP professional
> Reporter: Anton Luht
> Assigned To: Paulex Yang
> Priority: Minor
> Attachments: harmony-855.diff, patch.txt
>
>
> Build: classlib+VM revision 421248 msvc debug
> Problem:
> Some Collections.checked... methods throw NPE if one of their arguments is null in RI but don't throw in Harmony
> Code to reproduce:
> import java.util.*;
> public class Test {
> public static void main (String[] args) {
> try {
> Collections.checkedSortedMap(new TreeMap(), null, Short.TYPE);
> System.err.println("fail 1");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedSortedMap(new TreeMap(), Float.TYPE, null);
> System.err.println("fail 1.1");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedMap(new TreeMap(), null, Float.TYPE);
> System.err.println("fail 2");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedMap(new TreeMap(), Float.TYPE, null);
> System.err.println("fail 2.2");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedCollection(new Stack(), null);
> System.err.println("fail 3");
> } catch (NullPointerException e) {
> }
> }
> }
> in RI this test prints nothing, in Harmony all 'fail' messages are printed
> Please see the patch attached. It contains:
> - JUnit test for the problem
> - patch for java.util.Collections
--
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
[jira] Updated: (HARMONY-855) Some java.uiti.Collections methods do
not throw unspecified NPE while RI does
Posted by "spark shen (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-855?page=all ]
spark shen updated HARMONY-855:
-------------------------------
Attachment: harmony-855.diff
The old patch of JIRA 855 is outdated. I update the patch
for this JIRA. Would you please try this new one?
Best regards
> Some java.uiti.Collections methods do not throw unspecified NPE while RI does
> -----------------------------------------------------------------------------
>
> Key: HARMONY-855
> URL: http://issues.apache.org/jira/browse/HARMONY-855
> Project: Harmony
> Issue Type: Bug
> Components: Non-bug differences from RI
> Environment: Windows XP professional
> Reporter: Anton Luht
> Priority: Minor
> Attachments: harmony-855.diff, patch.txt
>
>
> Build: classlib+VM revision 421248 msvc debug
> Problem:
> Some Collections.checked... methods throw NPE if one of their arguments is null in RI but don't throw in Harmony
> Code to reproduce:
> import java.util.*;
> public class Test {
> public static void main (String[] args) {
> try {
> Collections.checkedSortedMap(new TreeMap(), null, Short.TYPE);
> System.err.println("fail 1");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedSortedMap(new TreeMap(), Float.TYPE, null);
> System.err.println("fail 1.1");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedMap(new TreeMap(), null, Float.TYPE);
> System.err.println("fail 2");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedMap(new TreeMap(), Float.TYPE, null);
> System.err.println("fail 2.2");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedCollection(new Stack(), null);
> System.err.println("fail 3");
> } catch (NullPointerException e) {
> }
> }
> }
> in RI this test prints nothing, in Harmony all 'fail' messages are printed
> Please see the patch attached. It contains:
> - JUnit test for the problem
> - patch for java.util.Collections
--
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
[jira] Commented: (HARMONY-855) [Classlib][util]Some
java.uiti.Collections methods do not throw unspecified NPE while RI does
Posted by "Anton Luht (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-855?page=comments#action_12435433 ]
Anton Luht commented on HARMONY-855:
------------------------------------
the patch applied correctly to r447316 and fixed the problem
> [Classlib][util]Some java.uiti.Collections methods do not throw unspecified NPE while RI does
> ---------------------------------------------------------------------------------------------
>
> Key: HARMONY-855
> URL: http://issues.apache.org/jira/browse/HARMONY-855
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Windows XP professional
> Reporter: Anton Luht
> Assigned To: Paulex Yang
> Priority: Minor
> Attachments: harmony-855.diff, patch.txt
>
>
> Build: classlib+VM revision 421248 msvc debug
> Problem:
> Some Collections.checked... methods throw NPE if one of their arguments is null in RI but don't throw in Harmony
> Code to reproduce:
> import java.util.*;
> public class Test {
> public static void main (String[] args) {
> try {
> Collections.checkedSortedMap(new TreeMap(), null, Short.TYPE);
> System.err.println("fail 1");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedSortedMap(new TreeMap(), Float.TYPE, null);
> System.err.println("fail 1.1");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedMap(new TreeMap(), null, Float.TYPE);
> System.err.println("fail 2");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedMap(new TreeMap(), Float.TYPE, null);
> System.err.println("fail 2.2");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedCollection(new Stack(), null);
> System.err.println("fail 3");
> } catch (NullPointerException e) {
> }
> }
> }
> in RI this test prints nothing, in Harmony all 'fail' messages are printed
> Please see the patch attached. It contains:
> - JUnit test for the problem
> - patch for java.util.Collections
--
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
[jira] Commented: (HARMONY-855) Some java.uiti.Collections methods
do not throw unspecified NPE while RI does
Posted by "spark shen (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-855?page=comments#action_12435422 ]
spark shen commented on HARMONY-855:
------------------------------------
BTW, would any commiter please change the component to classlib.
> Some java.uiti.Collections methods do not throw unspecified NPE while RI does
> -----------------------------------------------------------------------------
>
> Key: HARMONY-855
> URL: http://issues.apache.org/jira/browse/HARMONY-855
> Project: Harmony
> Issue Type: Bug
> Components: Non-bug differences from RI
> Environment: Windows XP professional
> Reporter: Anton Luht
> Priority: Minor
> Attachments: harmony-855.diff, patch.txt
>
>
> Build: classlib+VM revision 421248 msvc debug
> Problem:
> Some Collections.checked... methods throw NPE if one of their arguments is null in RI but don't throw in Harmony
> Code to reproduce:
> import java.util.*;
> public class Test {
> public static void main (String[] args) {
> try {
> Collections.checkedSortedMap(new TreeMap(), null, Short.TYPE);
> System.err.println("fail 1");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedSortedMap(new TreeMap(), Float.TYPE, null);
> System.err.println("fail 1.1");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedMap(new TreeMap(), null, Float.TYPE);
> System.err.println("fail 2");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedMap(new TreeMap(), Float.TYPE, null);
> System.err.println("fail 2.2");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedCollection(new Stack(), null);
> System.err.println("fail 3");
> } catch (NullPointerException e) {
> }
> }
> }
> in RI this test prints nothing, in Harmony all 'fail' messages are printed
> Please see the patch attached. It contains:
> - JUnit test for the problem
> - patch for java.util.Collections
--
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
[jira] Updated: (HARMONY-855) [Classlib][util]Some
java.uiti.Collections methods do not throw unspecified NPE while RI does
Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-855?page=all ]
Paulex Yang updated HARMONY-855:
--------------------------------
Summary: [Classlib][util]Some java.uiti.Collections methods do not throw unspecified NPE while RI does (was: Some java.uiti.Collections methods do not throw unspecified NPE while RI does)
Component/s: Classlib
(was: Non-bug differences from RI)
> [Classlib][util]Some java.uiti.Collections methods do not throw unspecified NPE while RI does
> ---------------------------------------------------------------------------------------------
>
> Key: HARMONY-855
> URL: http://issues.apache.org/jira/browse/HARMONY-855
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Windows XP professional
> Reporter: Anton Luht
> Priority: Minor
> Attachments: harmony-855.diff, patch.txt
>
>
> Build: classlib+VM revision 421248 msvc debug
> Problem:
> Some Collections.checked... methods throw NPE if one of their arguments is null in RI but don't throw in Harmony
> Code to reproduce:
> import java.util.*;
> public class Test {
> public static void main (String[] args) {
> try {
> Collections.checkedSortedMap(new TreeMap(), null, Short.TYPE);
> System.err.println("fail 1");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedSortedMap(new TreeMap(), Float.TYPE, null);
> System.err.println("fail 1.1");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedMap(new TreeMap(), null, Float.TYPE);
> System.err.println("fail 2");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedMap(new TreeMap(), Float.TYPE, null);
> System.err.println("fail 2.2");
> } catch (NullPointerException e) {
> }
> try {
> Collections.checkedCollection(new Stack(), null);
> System.err.println("fail 3");
> } catch (NullPointerException e) {
> }
> }
> }
> in RI this test prints nothing, in Harmony all 'fail' messages are printed
> Please see the patch attached. It contains:
> - JUnit test for the problem
> - patch for java.util.Collections
--
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