pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1603517 - in /pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos: TestCOSFloat.java TestCOSInteger.java TestCOSString.java
Date Wed, 18 Jun 2014 16:47:05 GMT
Author: tilman
Date: Wed Jun 18 16:47:04 2014
New Revision: 1603517

URL: http://svn.apache.org/r1603517
Log:
PDFBOX-2147: don't use .equals(null)

Modified:
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSFloat.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSString.java

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSFloat.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSFloat.java?rev=1603517&r1=1603516&r2=1603517&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSFloat.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSFloat.java Wed Jun 18 16:47:04
2014
@@ -73,9 +73,9 @@ public class TestCOSFloat extends TestCO
             assertTrue(test2.equals(test3));
             assertTrue(test1.equals(test3));
             // Non-nullity
-            assertFalse(test1.equals(null));
-            assertFalse(test2.equals(null));
-            assertFalse(test3.equals(null));
+            assertFalse(test1 == null);
+            assertFalse(test2 == null);
+            assertFalse(test3 == null);
             
             float nf = Float.intBitsToFloat(Float.floatToIntBits(num)+1);
             COSFloat test4 = new COSFloat(nf);

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java?rev=1603517&r1=1603516&r2=1603517&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java Wed Jun 18
16:47:04 2014
@@ -67,9 +67,9 @@ public class TestCOSInteger extends Test
             assertTrue(test2.equals(test3));
             assertTrue(test1.equals(test3));
             // Non-nullity
-            assertFalse(test1.equals(null));
-            assertFalse(test2.equals(null));
-            assertFalse(test3.equals(null));
+            assertFalse(test1 == null);
+            assertFalse(test2 == null);
+            assertFalse(test3 == null);
             
             COSInteger test4 = COSInteger.get(i + 1);
             assertFalse(test4.equals(test1));

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSString.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSString.java?rev=1603517&r1=1603516&r2=1603517&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSString.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSString.java Wed Jun 18
16:47:04 2014
@@ -384,10 +384,10 @@ public class TestCOSString extends TestC
             assertFalse(x1.equals(x2));
 
             // Non-nullity
-            assertFalse(x1.equals(null));
-            assertFalse(y1.equals(null));
-            assertFalse(z1.equals(null));
-            assertFalse(x2.equals(null));
+            assertFalse(x1 == null);
+            assertFalse(y1 == null);
+            assertFalse(z1 == null);
+            assertFalse(x2 == null);
 
             // Also check other state
             COSString y2 = new COSString("Test");



Mime
View raw message