From ffff00e9087729360e2e2cd6f56a36c182c91a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Boutemy?= Date: Mon, 16 Jun 2014 18:30:24 +0200 Subject: [PATCH] fixed errors reported by Checkstyle --- .../maven/repository/internal/DefaultModelResolver.java | 6 +++--- maven-core/src/main/java/org/apache/maven/DefaultMaven.java | 3 --- .../src/main/java/org/apache/maven/SessionModule.java | 2 +- .../main/java/org/apache/maven/cli/CLIReportingUtils.java | 6 ++++-- .../apache/maven/model/building/DefaultModelBuilder.java | 2 +- .../maven/model/profile/activation/ProfileActivator.java | 4 ++-- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java index e97ac29efc..8335e01b9c 100644 --- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java +++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java @@ -88,8 +88,8 @@ class DefaultModelResolver this.remoteRepositoryManager = remoteRepositoryManager; this.repositories = repositories; List externalRepositories = new ArrayList(); - externalRepositories.addAll(repositories); - this.externalRepositories = Collections.unmodifiableList(externalRepositories); + externalRepositories.addAll( repositories ); + this.externalRepositories = Collections.unmodifiableList( externalRepositories ); this.repositoryIds = new HashSet(); } @@ -128,7 +128,7 @@ class DefaultModelResolver { this.repositoryIds.clear(); this.repositories.clear(); - this.repositories.addAll(externalRepositories); + this.repositories.addAll( externalRepositories ); } @Override diff --git a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java index 06d61aa9e4..af0defdb0f 100644 --- a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java +++ b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java @@ -22,7 +22,6 @@ package org.apache.maven; import java.io.File; import java.io.IOException; import java.io.InputStream; -import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -35,7 +34,6 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Properties; -import java.util.TimeZone; import org.apache.maven.artifact.ArtifactUtils; 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.ModelSource; import org.apache.maven.model.building.UrlModelSource; -import org.apache.maven.model.interpolation.MavenBuildTimestamp; import org.apache.maven.plugin.LegacySupport; import org.apache.maven.project.MavenProject; import org.apache.maven.project.ProjectBuilder; diff --git a/maven-core/src/main/java/org/apache/maven/SessionModule.java b/maven-core/src/main/java/org/apache/maven/SessionModule.java index 5f6d301f97..c3438c6616 100644 --- a/maven-core/src/main/java/org/apache/maven/SessionModule.java +++ b/maven-core/src/main/java/org/apache/maven/SessionModule.java @@ -33,7 +33,7 @@ public class SessionModule extends AbstractModule { SessionScope scope = new SessionScope(); bindScope( SessionScoped.class, scope ); - bind( SessionScope.class).toInstance( scope ); + bind( SessionScope.class ).toInstance( scope ); bind( MavenSession.class ).toProvider( SessionScope. seededKeyProvider() ).in( scope ); } } diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java index 8d06cd6132..6176f243d0 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java @@ -155,8 +155,10 @@ public final class CLIReportingUtils int offset = tz.getRawOffset(); // Raw offset ignores DST, so check if we are in DST now and add the offset - if( tz.inDaylightTime( new Date( timestamp ) ) ) - offset += tz.getDSTSavings(); + if ( tz.inDaylightTime( new Date( timestamp ) ) ) + { + offset += tz.getDSTSavings(); + } long m = Math.abs( ( offset / ONE_MINUTE ) % 60 ); long h = Math.abs( ( offset / ONE_HOUR ) % 24 ); diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java index 632c932c2d..52c9fc3b1b 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java @@ -591,7 +591,7 @@ public class DefaultModelBuilder List repositories = model.getRepositories(); - if (resetRepositories) + if ( resetRepositories ) { modelResolver.resetRepositories(); } diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/ProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/ProfileActivator.java index 7094a3f863..57487d47b1 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/ProfileActivator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/ProfileActivator.java @@ -44,8 +44,8 @@ public interface ProfileActivator 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 - * activation conditions + * Determines whether specified activation method is present in configuration or not. It should help to have AND + * between activation conditions * 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 context The environmental context used to determine the activation status of the profile, must not be