mirror of https://github.com/apache/maven.git
parent
ace32fdbe0
commit
e6c897efb6
|
@ -82,29 +82,29 @@ public class PluginVersionResolutionException
|
|||
|
||||
private static String format( LocalRepository localRepository, List<RemoteRepository> remoteRepositories )
|
||||
{
|
||||
String repos = "[";
|
||||
StringBuilder repos = new StringBuilder( "[" );
|
||||
|
||||
if ( localRepository != null )
|
||||
{
|
||||
repos += localRepository.getId() + " (" + localRepository.getBasedir() + ")";
|
||||
repos.append( localRepository.getId() ).append( " (" ).append( localRepository.getBasedir() ).append( ")" );
|
||||
}
|
||||
|
||||
if ( remoteRepositories != null && !remoteRepositories.isEmpty() )
|
||||
{
|
||||
for ( RemoteRepository repository : remoteRepositories )
|
||||
{
|
||||
repos += ", ";
|
||||
repos.append( ", " );
|
||||
|
||||
if ( repository != null )
|
||||
{
|
||||
repos += repository.getId() + " (" + repository.getUrl() + ")";
|
||||
repos.append( repository.getId() ).append( " (" ).append( repository.getUrl() ).append( ")" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repos += "]";
|
||||
repos.append( "]" );
|
||||
|
||||
return repos;
|
||||
return repos.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -330,11 +330,10 @@ public class ArtifactTransferEvent
|
|||
{
|
||||
return false;
|
||||
}
|
||||
else if ( !source.equals( other.source ) )
|
||||
else
|
||||
{
|
||||
return false;
|
||||
return source.equals( other.source );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -192,7 +192,7 @@ public abstract class AbstractMavenTransferListener
|
|||
public String formatProgress( long progressedSize, long size )
|
||||
{
|
||||
Validate.isTrue( progressedSize >= 0L, "progressed file size cannot be negative: %s", progressedSize );
|
||||
Validate.isTrue( size >= 0L && progressedSize <= size || size < 0L,
|
||||
Validate.isTrue( size < 0L || progressedSize <= size,
|
||||
"progressed file size cannot be greater than size: %s > %s", progressedSize, size );
|
||||
|
||||
if ( size >= 0L && progressedSize != size )
|
||||
|
|
|
@ -360,15 +360,15 @@ public class DefaultModelBuilder
|
|||
}
|
||||
else if ( !parentIds.add( parentData.getId() ) )
|
||||
{
|
||||
String message = "The parents form a cycle: ";
|
||||
StringBuilder message = new StringBuilder( "The parents form a cycle: " );
|
||||
for ( String modelId : parentIds )
|
||||
{
|
||||
message += modelId + " -> ";
|
||||
message.append( modelId ).append( " -> " );
|
||||
}
|
||||
message += parentData.getId();
|
||||
message.append( parentData.getId() );
|
||||
|
||||
problems.add( new ModelProblemCollectorRequest( ModelProblem.Severity.FATAL, ModelProblem.Version.BASE )
|
||||
.setMessage( message ) );
|
||||
.setMessage( message.toString() ) );
|
||||
|
||||
throw problems.newModelBuildingException();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue