git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@138013 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2005-01-17 01:59:52 +00:00
parent e3f46b722e
commit 73c601bed5
1 changed files with 12 additions and 1 deletions

View File

@ -29,7 +29,7 @@ import junit.textui.TestRunner;
* @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
* @author Maarten Coene
* @version $Id: EqualsBuilderTest.java,v 1.12 2005/01/16 19:34:34 ggregory Exp $
* @version $Id: EqualsBuilderTest.java,v 1.13 2005/01/17 01:59:52 ggregory Exp $
*/
public class EqualsBuilderTest extends TestCase {
@ -945,4 +945,15 @@ public class EqualsBuilderTest extends TestCase {
assertTrue(new EqualsBuilder().append(y, x).isEquals());
}
/**
* Test from http://issues.apache.org/bugzilla/show_bug.cgi?id=33067
*/
public void testNpeForNullElement() {
Object[] x1 = new Object[] { new Integer(1), null, new Integer(3) };
Object[] x2 = new Object[] { new Integer(1), new Integer(2), new Integer(3) };
// causes an NPE in 2.0 according to:
// http://issues.apache.org/bugzilla/show_bug.cgi?id=33067
new EqualsBuilder().append(x1, x2);
}
}