simplify scan result check
authorOliver Lietz <olli@apache.org>
Sat, 26 Jan 2019 11:17:36 +0000 (12:17 +0100)
committerOliver Lietz <olli@apache.org>
Sat, 26 Jan 2019 11:17:36 +0000 (12:17 +0100)
src/main/java/org/apache/sling/clam/result/internal/EventPublishingScanResultHandler.java
src/main/java/org/apache/sling/clam/result/internal/ResourcePersistingScanResultHandler.java

index cdcf3e7..55843d6 100644 (file)
@@ -101,7 +101,7 @@ public class EventPublishingScanResultHandler implements JcrPropertyScanResultHa
     }
 
     private boolean checkPublish(final ScanResult scanResult) {
-        return !scanResult.isOk() || scanResult.isOk() && configuration.result_status_ok_publish();
+        return !scanResult.isOk() || configuration.result_status_ok_publish();
     }
 
 }
index edc2823..f09d4f9 100644 (file)
@@ -130,7 +130,7 @@ public class ResourcePersistingScanResultHandler implements JcrPropertyScanResul
     }
 
     private boolean checkPersist(final ScanResult scanResult) {
-        return !scanResult.isOk() || scanResult.isOk() && configuration.result_status_ok_persist();
+        return !scanResult.isOk() || configuration.result_status_ok_persist();
     }
 
     private void persistResult(@NotNull ScanResult scanResult, @NotNull String path, Integer index, int propertyType, @Nullable String userId) {