]> source.dussan.org Git - archiva.git/commitdiff
simplify some boolean expressions
authorOlivier Lamy <olamy@apache.org>
Mon, 31 Dec 2012 09:29:29 +0000 (09:29 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 31 Dec 2012 09:29:29 +0000 (09:29 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1427059 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java
archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java
archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java

index 029e45fd2340bbbf2f1d3856289ea9c224c43659..fb7628d0f889ce7b6c194c04c277a275dd819a8d 100644 (file)
@@ -192,7 +192,7 @@ public class ChecksummedFile
                     String rawChecksum = FileUtils.readFileToString( checksumFile );
                     String expectedChecksum = parseChecksum( rawChecksum, checksumAlgorithm, referenceFile.getName() );
 
-                    if ( StringUtils.equalsIgnoreCase( expectedChecksum, checksum.getChecksum() ) == false )
+                    if ( !StringUtils.equalsIgnoreCase( expectedChecksum, checksum.getChecksum() ) )
                     {
                         valid = false;
                     }
index 8a83cc84825f9999a1770fd92c9825ba79fcfeaf..000386126a192754d4c16ae3f515e0c0afb9207f 100644 (file)
@@ -601,7 +601,7 @@ public class DefaultArchivaConfiguration
             if ( file.getParentFile() != null )
             {
                 // Check that directory exists
-                if ( ( file.getParentFile().exists() == false ) || ( file.getParentFile().isDirectory() == false ) )
+                if ( ! file.getParentFile().isDirectory() )
                 {
                     // Directory to file must exist for file to be created
                     return false;
index 381ca77e981f428aeabaa414051aea1259f51bfb..31bb11eb3b4ec136f11ec568efad0840676f3e96 100644 (file)
@@ -261,7 +261,7 @@ public class RepositoryContentConsumers
 
             // MRM-1212/MRM-1197 
             // - do not create missing/fix invalid checksums and update metadata when deploying from webdav since these are uploaded by maven
-            if ( updateRelatedArtifacts == false )
+            if ( !updateRelatedArtifacts )
             {
                 List<KnownRepositoryContentConsumer> clone = new ArrayList<KnownRepositoryContentConsumer>();
                 clone.addAll( selectedKnownConsumers );