From bf6b8b7c621d3ad6461fee30e0e9f7a663b5050e Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 31 Dec 2012 09:29:29 +0000 Subject: [PATCH] simplify some boolean expressions git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1427059 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/archiva/checksum/ChecksummedFile.java | 2 +- .../archiva/configuration/DefaultArchivaConfiguration.java | 2 +- .../archiva/repository/scanner/RepositoryContentConsumers.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java b/archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java index 029e45fd2..fb7628d0f 100644 --- a/archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java +++ b/archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java @@ -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; } diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java index 8a83cc848..000386126 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java index 381ca77e9..31bb11eb3 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java @@ -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 clone = new ArrayList(); clone.addAll( selectedKnownConsumers );