From: Olivier Lamy Date: Mon, 31 Dec 2012 14:14:24 +0000 (+0000) Subject: use indexOf(char) X-Git-Tag: archiva-1.4-M4~340 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ee548d9fb5b750604b73b26385757ad547b0bcfb;p=archiva.git use indexOf(char) git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1427127 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/RepositoryURL.java b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/RepositoryURL.java index 1e94ff292..0ea381b46 100644 --- a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/RepositoryURL.java +++ b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/RepositoryURL.java @@ -72,7 +72,7 @@ public class RepositoryURL } // attempt to find the start of the 'path' - pos = url.indexOf( "/", postProtocolPos ); + pos = url.indexOf( '/', postProtocolPos ); // no path specified - ex "http://localhost" if ( pos == ( -1 ) ) diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java index 3ad07b8ff..c2bcd9a06 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java @@ -334,7 +334,7 @@ public class MetadataTools { StringBuilder ret = new StringBuilder(); - int idx = path.lastIndexOf( "/" ); + int idx = path.lastIndexOf( '/' ); if ( idx > 0 ) { ret.append( path.substring( 0, idx + 1 ) ); diff --git a/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java b/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java index 220b41202..a2ceb9764 100644 --- a/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java +++ b/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java @@ -196,7 +196,7 @@ public class DuplicateArtifactsConsumer for ( ArtifactMetadata dupArtifact : results ) { - String id = path.substring( path.lastIndexOf( "/" ) + 1 ); + String id = path.substring( path.lastIndexOf( '/' ) + 1 ); if ( dupArtifact.getId().equals( id ) && dupArtifact.getNamespace().equals( originalArtifact.getNamespace() ) && dupArtifact.getProject().equals( originalArtifact.getProject() ) && dupArtifact.getVersion().equals(