]> source.dussan.org Git - archiva.git/commitdiff
use indexOf(char)
authorOlivier Lamy <olamy@apache.org>
Mon, 31 Dec 2012 14:14:24 +0000 (14:14 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 31 Dec 2012 14:14:24 +0000 (14:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1427127 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/RepositoryURL.java
archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java
archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java

index 1e94ff292ace3a1d424448687f5c6a09ff3e63d4..0ea381b468d8dafb773ad0071fc464228d10393c 100644 (file)
@@ -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 ) )
index 3ad07b8ff2279cf88f57975254bdcf393ff97f12..c2bcd9a06d4df2e17a077de882e6175f24485cef 100644 (file)
@@ -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 ) );
index 220b412028dcf0a508e2667d48d6846588272508..a2ceb97642f656a43804c7c52d2cd1857f17ba67 100644 (file)
@@ -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(