pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1642971 - /pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/ValidationResult.java
Date Tue, 02 Dec 2014 18:03:05 GMT
Author: tilman
Date: Tue Dec  2 18:03:04 2014
New Revision: 1642971

URL: http://svn.apache.org/r1642971
Log:
PDFBOX-2529: reformat equals method

Modified:
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/ValidationResult.java

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/ValidationResult.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/ValidationResult.java?rev=1642971&r1=1642970&r2=1642971&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/ValidationResult.java
(original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/ValidationResult.java
Tue Dec  2 18:03:04 2014
@@ -417,28 +417,43 @@ public class ValidationResult
         }
 
         @Override
-        public boolean equals (Object o) {
-            if (o instanceof ValidationError) {
-                ValidationError ve = (ValidationError)o;
+        public boolean equals(Object o)
+        {
+            if (o instanceof ValidationError)
+            {
+                ValidationError ve = (ValidationError) o;
                 // check errorCode
-                if (errorCode==null && ve.errorCode!=null) {
+                if (errorCode == null && ve.errorCode != null)
+                {
                     return false;
-                } else if (!errorCode.equals(ve.errorCode)) {
+                }
+                else if (!errorCode.equals(ve.errorCode))
+                {
                     return false;
-                }  else if (!details.equals(ve.details)) {
+                }
+                else if (!details.equals(ve.details))
+                {
                     return false;
-                }  else if (pageNumber != null && ve.pageNumber == null) {
+                }
+                else if (pageNumber != null && ve.pageNumber == null)
+                {
                     return false;
-                }  else if (pageNumber == null && ve.pageNumber != null) {
+                }
+                else if (pageNumber == null && ve.pageNumber != null)
+                {
                     return false;
-                }  else if (pageNumber != null && ve.pageNumber != null 
-                        && pageNumber.compareTo(pageNumber) == 0) {
+                }
+                else if (pageNumber != null && ve.pageNumber != null
+                        && pageNumber.compareTo(pageNumber) == 0)
+                {
                     return false;
                 }
                 // check warning
-                return isWarning==ve.isWarning;
-                
-            } else {
+                return isWarning == ve.isWarning;
+
+            }
+            else
+            {
                 return false;
             }
         }



Mime
View raw message