pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1646628 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriterXRefEntry.java
Date Fri, 19 Dec 2014 06:33:22 GMT
Author: tilman
Date: Fri Dec 19 06:33:22 2014
New Revision: 1646628

URL: http://svn.apache.org/r1646628
Log:
PDFBOX-2576:  instanceof COSWriterXRefEntry will always return true for all nonnull values

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriterXRefEntry.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriterXRefEntry.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriterXRefEntry.java?rev=1646628&r1=1646627&r2=1646628&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriterXRefEntry.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriterXRefEntry.java
Fri Dec 19 06:33:22 2014
@@ -39,16 +39,14 @@ public class COSWriterXRefEntry implemen
     /**
      * {@inheritDoc}
      */
+    @Override
     public int compareTo(COSWriterXRefEntry obj)
     {
-        if (obj instanceof COSWriterXRefEntry)
+        if (obj != null)
         {
             return (int)(getKey().getNumber() - obj.getKey().getNumber());
         }
-        else
-        {
-            return -1;
-        }
+        return -1;
     }
     
     /**



Mime
View raw message