mirror of https://github.com/apache/maven.git
fixed errors reported by Checkstyle
This commit is contained in:
parent
e9e8a20907
commit
ffff00e908
|
@ -88,8 +88,8 @@ class DefaultModelResolver
|
||||||
this.remoteRepositoryManager = remoteRepositoryManager;
|
this.remoteRepositoryManager = remoteRepositoryManager;
|
||||||
this.repositories = repositories;
|
this.repositories = repositories;
|
||||||
List<RemoteRepository> externalRepositories = new ArrayList<RemoteRepository>();
|
List<RemoteRepository> externalRepositories = new ArrayList<RemoteRepository>();
|
||||||
externalRepositories.addAll(repositories);
|
externalRepositories.addAll( repositories );
|
||||||
this.externalRepositories = Collections.unmodifiableList(externalRepositories);
|
this.externalRepositories = Collections.unmodifiableList( externalRepositories );
|
||||||
|
|
||||||
this.repositoryIds = new HashSet<String>();
|
this.repositoryIds = new HashSet<String>();
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ class DefaultModelResolver
|
||||||
{
|
{
|
||||||
this.repositoryIds.clear();
|
this.repositoryIds.clear();
|
||||||
this.repositories.clear();
|
this.repositories.clear();
|
||||||
this.repositories.addAll(externalRepositories);
|
this.repositories.addAll( externalRepositories );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -22,7 +22,6 @@ package org.apache.maven;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
@ -35,7 +34,6 @@ import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.TimeZone;
|
|
||||||
|
|
||||||
import org.apache.maven.artifact.ArtifactUtils;
|
import org.apache.maven.artifact.ArtifactUtils;
|
||||||
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
|
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
|
||||||
|
@ -55,7 +53,6 @@ import org.apache.maven.model.building.ModelProblem;
|
||||||
import org.apache.maven.model.building.ModelProblemUtils;
|
import org.apache.maven.model.building.ModelProblemUtils;
|
||||||
import org.apache.maven.model.building.ModelSource;
|
import org.apache.maven.model.building.ModelSource;
|
||||||
import org.apache.maven.model.building.UrlModelSource;
|
import org.apache.maven.model.building.UrlModelSource;
|
||||||
import org.apache.maven.model.interpolation.MavenBuildTimestamp;
|
|
||||||
import org.apache.maven.plugin.LegacySupport;
|
import org.apache.maven.plugin.LegacySupport;
|
||||||
import org.apache.maven.project.MavenProject;
|
import org.apache.maven.project.MavenProject;
|
||||||
import org.apache.maven.project.ProjectBuilder;
|
import org.apache.maven.project.ProjectBuilder;
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class SessionModule extends AbstractModule
|
||||||
{
|
{
|
||||||
SessionScope scope = new SessionScope();
|
SessionScope scope = new SessionScope();
|
||||||
bindScope( SessionScoped.class, scope );
|
bindScope( SessionScoped.class, scope );
|
||||||
bind( SessionScope.class).toInstance( scope );
|
bind( SessionScope.class ).toInstance( scope );
|
||||||
bind( MavenSession.class ).toProvider( SessionScope.<MavenSession> seededKeyProvider() ).in( scope );
|
bind( MavenSession.class ).toProvider( SessionScope.<MavenSession> seededKeyProvider() ).in( scope );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,8 +155,10 @@ public final class CLIReportingUtils
|
||||||
int offset = tz.getRawOffset();
|
int offset = tz.getRawOffset();
|
||||||
|
|
||||||
// Raw offset ignores DST, so check if we are in DST now and add the offset
|
// Raw offset ignores DST, so check if we are in DST now and add the offset
|
||||||
if( tz.inDaylightTime( new Date( timestamp ) ) )
|
if ( tz.inDaylightTime( new Date( timestamp ) ) )
|
||||||
offset += tz.getDSTSavings();
|
{
|
||||||
|
offset += tz.getDSTSavings();
|
||||||
|
}
|
||||||
|
|
||||||
long m = Math.abs( ( offset / ONE_MINUTE ) % 60 );
|
long m = Math.abs( ( offset / ONE_MINUTE ) % 60 );
|
||||||
long h = Math.abs( ( offset / ONE_HOUR ) % 24 );
|
long h = Math.abs( ( offset / ONE_HOUR ) % 24 );
|
||||||
|
|
|
@ -591,7 +591,7 @@ public class DefaultModelBuilder
|
||||||
|
|
||||||
List<Repository> repositories = model.getRepositories();
|
List<Repository> repositories = model.getRepositories();
|
||||||
|
|
||||||
if (resetRepositories)
|
if ( resetRepositories )
|
||||||
{
|
{
|
||||||
modelResolver.resetRepositories();
|
modelResolver.resetRepositories();
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,8 +44,8 @@ public interface ProfileActivator
|
||||||
boolean isActive( Profile profile, ProfileActivationContext context, ModelProblemCollector problems );
|
boolean isActive( Profile profile, ProfileActivationContext context, ModelProblemCollector problems );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines whether specified activation method is present in configuration or not. It should help to have AND between
|
* Determines whether specified activation method is present in configuration or not. It should help to have AND
|
||||||
* activation conditions
|
* between activation conditions
|
||||||
* Need for solving http://jira.codehaus.org/browse/MNG-4565
|
* Need for solving http://jira.codehaus.org/browse/MNG-4565
|
||||||
* @param profile The profile whose activation status should be determined, must not be {@code null}.
|
* @param profile The profile whose activation status should be determined, must not be {@code null}.
|
||||||
* @param context The environmental context used to determine the activation status of the profile, must not be
|
* @param context The environmental context used to determine the activation status of the profile, must not be
|
||||||
|
|
Loading…
Reference in New Issue