maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject [15/17] maven git commit: Code improvement.
Date Sun, 12 Mar 2017 16:32:07 GMT
Code improvement.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/809ba340
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/809ba340
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/809ba340

Branch: refs/heads/MNG-6169
Commit: 809ba34055c70eab31876aad03c577e925fa2e6e
Parents: ab2e24f
Author: Karl Heinz Marbaise <khmarbaise@apache.org>
Authored: Mon Mar 6 08:24:33 2017 +0100
Committer: Karl Heinz Marbaise <khmarbaise@apache.org>
Committed: Sat Mar 11 20:53:18 2017 +0100

----------------------------------------------------------------------
 .../resolver/DefaultArtifactResolver.java       |  4 ++--
 .../java/org/apache/maven/cli/MavenCli.java     | 21 ++++----------------
 2 files changed, 6 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/809ba340/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
index b78846b..fc154cb 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
@@ -258,7 +258,7 @@ public class DefaultArtifactResolver
                                                              throws ArtifactResolutionException,
                                                              ArtifactNotFoundException
     {
-        return resolveTransitively( artifacts, originatingArtifact, Collections.EMPTY_MAP,
localRepository,
+        return resolveTransitively( artifacts, originatingArtifact, Collections.<String,
Artifact>emptyMap(), localRepository,
                                     remoteRepositories, source, filter );
 
     }
@@ -305,7 +305,7 @@ public class DefaultArtifactResolver
                                                              throws ArtifactResolutionException,
                                                              ArtifactNotFoundException
     {
-        return resolveTransitively( artifacts, originatingArtifact, Collections.EMPTY_MAP,
localRepository,
+        return resolveTransitively( artifacts, originatingArtifact, Collections.<String,
Artifact>emptyMap(), localRepository,
                                     remoteRepositories, source, null, listeners );
     }
 

http://git-wip-us.apache.org/repos/asf/maven/blob/809ba340/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index f3ae923..b3367c1 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -126,24 +126,11 @@ public class MavenCli
 
     public static final String MULTIMODULE_PROJECT_DIRECTORY = "maven.multiModuleProjectDirectory";
 
-    @SuppressWarnings( "checkstyle:constantname" )
-    public static final String userHome = System.getProperty( "user.home" );
+    public static final String USER_HOME = System.getProperty( "user.home" );
 
-    @SuppressWarnings( "checkstyle:constantname" )
-    public static final File userMavenConfigurationHome = new File( userHome, ".m2" );
+    public static final File USER_MAVEN_CONFIGURATION_HOME = new File( USER_HOME, ".m2" );
 
-    /**
-     * @deprecated use {@link SettingsXmlConfigurationProcessor#DEFAULT_USER_SETTINGS_FILE}
-     */
-    public static final File DEFAULT_USER_SETTINGS_FILE = SettingsXmlConfigurationProcessor.DEFAULT_USER_SETTINGS_FILE;
-
-    /**
-     * @deprecated use {@link SettingsXmlConfigurationProcessor#DEFAULT_GLOBAL_SETTINGS_FILE}
-     */
-    public static final File DEFAULT_GLOBAL_SETTINGS_FILE =
-        SettingsXmlConfigurationProcessor.DEFAULT_GLOBAL_SETTINGS_FILE;
-
-    public static final File DEFAULT_USER_TOOLCHAINS_FILE = new File( userMavenConfigurationHome,
"toolchains.xml" );
+    public static final File DEFAULT_USER_TOOLCHAINS_FILE = new File( USER_MAVEN_CONFIGURATION_HOME,
"toolchains.xml" );
 
     public static final File DEFAULT_GLOBAL_TOOLCHAINS_FILE =
         new File( System.getProperty( "maven.conf" ), "toolchains.xml" );
@@ -1257,7 +1244,7 @@ public class MavenCli
         //
         // ----------------------------------------------------------------------
 
-        @SuppressWarnings( "unchecked" ) List<String> goals = commandLine.getArgList();
+        List<String> goals = commandLine.getArgList();
 
         boolean recursive = true;
 


Mime
View raw message