You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vladimir Ivanov (JIRA)" <ji...@apache.org> on 2006/07/04 11:17:31 UTC
[jira] Updated: (HARMONY-737) [classlib][security] unexpected NPE
for
java.security.cert.X509CRLSelector.setIssuerNames(user_defined_collection);
[ http://issues.apache.org/jira/browse/HARMONY-737?page=all ]
Vladimir Ivanov updated HARMONY-737:
------------------------------------
Attachment: X509CRLSelectorTest1.patch
unit test
> [classlib][security] unexpected NPE for java.security.cert.X509CRLSelector.setIssuerNames(user_defined_collection);
> -------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-737
> URL: http://issues.apache.org/jira/browse/HARMONY-737
> Project: Harmony
> Type: Bug
> Reporter: Vladimir Ivanov
> Attachments: X509CRLSelectorTest1.patch
>
> The Harmony method java.security.cert.X509CRLSelector.setIssuerNames(Collection) throws unexpected NPE while RI does not.
> ======================= test.java ==============================
> import java.security.cert.X509CRLSelector;
> import java.util.*;
> public class test {
> public static void main (String[] args) {
> try {
> new X509CRLSelector().setIssuerNames(new testSortedSet());
> System.out.println("passed: no ex");
> } catch (Exception e) {
> System.out.println("failed: " + e);
> }
> }
> }
> class testSortedSet implements SortedSet {
> public Comparator comparator() {
> return null;
> }
> public Object first() {
> return null;
> }
> public SortedSet headSet(Object p0) {
> return null;
> }
> public Object last() {
> return null;
> }
> public SortedSet subSet(Object p0, Object p1) {
> return null;
> }
> public SortedSet tailSet(Object p0) {
> return null;
> }
> public boolean add(Object p0) {
> return false;
> }
> public boolean addAll(Collection p0) {
> return false;
> }
> public void clear() {
> return;
> }
> public boolean contains(Object p0) {
> return false;
> }
> public boolean containsAll(Collection p0) {
> return false;
> }
> public boolean equals(Object p0) {
> return false;
> }
> public int hashCode() {
> return 0;
> }
> public boolean isEmpty() {
> return false;
> }
> public Iterator iterator() {
> return null;
> }
> public boolean remove(Object p0) {
> return false;
> }
> public boolean removeAll(Collection p0) {
> return false;
> }
> public boolean retainAll(Collection p0) {
> return false;
> }
> public int size() {
> return 0;
> }
> public Object[] toArray() {
> return null;
> }
> public Object[] toArray(Object[] p0) {
> return null;
> }
> }
> ====================================================
> 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))
> passed: no ex
> 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.
> failed: java.lang.NullPointerException
--
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