code formatting

This commit is contained in:
Hervé Boutemy 2014-06-14 00:08:07 +02:00
parent e112cd89c7
commit 6683e8681f
4 changed files with 19 additions and 13 deletions

View File

@ -205,7 +205,8 @@ public class DefaultArtifactVersion
private static Integer getNextIntegerToken( StringTokenizer tok ) private static Integer getNextIntegerToken( StringTokenizer tok )
{ {
try { try
{
String s = tok.nextToken(); String s = tok.nextToken();
if ( ( s.length() > 1 ) && s.startsWith( "0" ) ) if ( ( s.length() > 1 ) && s.startsWith( "0" ) )
{ {

View File

@ -23,9 +23,12 @@ import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.DefaultArtifactRepository; import org.apache.maven.artifact.repository.DefaultArtifactRepository;
import org.codehaus.plexus.PlexusTestCase; import org.codehaus.plexus.PlexusTestCase;
public class DefaultMirrorSelectorTest extends PlexusTestCase { public class DefaultMirrorSelectorTest
extends PlexusTestCase
{
public void testMirrorWithMirroOfPatternContainingANegationIsNotSelected() { public void testMirrorWithMirroOfPatternContainingANegationIsNotSelected()
{
ArtifactRepository repository = new DefaultArtifactRepository( "snapshots.repo", "http://whatever", null ); ArtifactRepository repository = new DefaultArtifactRepository( "snapshots.repo", "http://whatever", null );
String pattern = "external:*, !snapshots.repo"; String pattern = "external:*, !snapshots.repo";
boolean matches = DefaultMirrorSelector.matchPattern( repository, pattern ); boolean matches = DefaultMirrorSelector.matchPattern( repository, pattern );

View File

@ -105,8 +105,10 @@ public class DefaultProfileSelector
private boolean isActive( Profile profile, ProfileActivationContext context, ModelProblemCollector problems ) private boolean isActive( Profile profile, ProfileActivationContext context, ModelProblemCollector problems )
{ {
boolean isActive = false; boolean isActive = false;
for ( ProfileActivator activator : activators ) { for ( ProfileActivator activator : activators )
if ( activator.presentInConfig( profile, context, problems ) ) { {
if ( activator.presentInConfig( profile, context, problems ) )
{
isActive = true; isActive = true;
} }
} }