Hi, Kevin and Alexey I've committed this patch here[1] with a work around to NullPointerException.
[1] http://svn.apache.org/viewvc?view=rev&revision=728589 On Fri, Dec 19, 2008 at 11:42 AM, Kevin Zhou <[email protected]> wrote: > Given a test scenario: > > public void test_Equals_Scenario7() { > UnresolvedPermission up1 = new UnresolvedPermission(type, name, > action, > new java.security.cert.Certificate[] {cert1, cert2}); > UnresolvedPermission up2 = new UnresolvedPermission(type, name, > action, > new java.security.cert.Certificate[] {cert1, null, null, > null, cert2}); > assertFalse(up1.equals(up2)); > } > > up1 has a 2-elements Certificate array, and up2 has a 5-elements Certificate > array. > > If conducting it on the previous UnresolvedPermission, it returns true. > Because the previous implementation ignores null-certificate variable in the > array, then decide the equality between new Certificate[] {cert1, cert2} and > new Certificate[] {cert1, cert2}. > RI behave differently here, it will not take the null value in > considerations. > > I agree to make a defensive copy fix in the 1st patch. Will attach it on the > issue soon. > Tony, would you please help to review this later? > -- Tony Wu China Software Development Lab, IBM
