use indexOf(char)

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1427127 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-12-31 14:14:24 +00:00
parent 7afb00d1c8
commit ee548d9fb5
3 changed files with 3 additions and 3 deletions

View File

@ -72,7 +72,7 @@ public class RepositoryURL
} }
// attempt to find the start of the 'path' // attempt to find the start of the 'path'
pos = url.indexOf( "/", postProtocolPos ); pos = url.indexOf( '/', postProtocolPos );
// no path specified - ex "http://localhost" // no path specified - ex "http://localhost"
if ( pos == ( -1 ) ) if ( pos == ( -1 ) )

View File

@ -334,7 +334,7 @@ public class MetadataTools
{ {
StringBuilder ret = new StringBuilder(); StringBuilder ret = new StringBuilder();
int idx = path.lastIndexOf( "/" ); int idx = path.lastIndexOf( '/' );
if ( idx > 0 ) if ( idx > 0 )
{ {
ret.append( path.substring( 0, idx + 1 ) ); ret.append( path.substring( 0, idx + 1 ) );

View File

@ -196,7 +196,7 @@ public class DuplicateArtifactsConsumer
for ( ArtifactMetadata dupArtifact : results ) 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( if ( dupArtifact.getId().equals( id ) && dupArtifact.getNamespace().equals(
originalArtifact.getNamespace() ) && dupArtifact.getProject().equals( originalArtifact.getNamespace() ) && dupArtifact.getProject().equals(
originalArtifact.getProject() ) && dupArtifact.getVersion().equals( originalArtifact.getProject() ) && dupArtifact.getVersion().equals(