pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1824024 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/TilingPaintFactory.java
Date Mon, 12 Feb 2018 16:53:01 GMT
Author: tilman
Date: Mon Feb 12 16:53:01 2018
New Revision: 1824024

URL: http://svn.apache.org/viewvc?rev=1824024&view=rev
Log:
PDFBOX-4071: simplify code (Effective Java 2018, p46)

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/TilingPaintFactory.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/TilingPaintFactory.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/TilingPaintFactory.java?rev=1824024&r1=1824023&r2=1824024&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/TilingPaintFactory.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/TilingPaintFactory.java
Mon Feb 12 16:53:01 2018
@@ -91,11 +91,7 @@ class TilingPaintFactory
             {
                 return true;
             }
-            if (obj == null)
-            {
-                return false;
-            }
-            if (getClass() != obj.getClass())
+            if (!(obj instanceof TilingPaintParameter))
             {
                 return false;
             }



Mime
View raw message