From ee548d9fb5b750604b73b26385757ad547b0bcfb Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 31 Dec 2012 14:14:24 +0000 Subject: [PATCH] use indexOf(char) git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1427127 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/archiva/model/RepositoryURL.java | 2 +- .../org/apache/archiva/repository/metadata/MetadataTools.java | 2 +- .../archiva/reports/consumers/DuplicateArtifactsConsumer.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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( -- 2.39.5