mirror of https://github.com/apache/archiva.git
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:
parent
7afb00d1c8
commit
ee548d9fb5
|
@ -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 ) )
|
||||||
|
|
|
@ -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 ) );
|
||||||
|
|
|
@ -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(
|
||||||
|
|
Loading…
Reference in New Issue