maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject maven git commit: make algo more visible
Date Sat, 08 Nov 2014 20:53:21 GMT
Repository: maven
Updated Branches:
  refs/heads/master bdf5770f9 -> 36d746789


make algo more visible

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

Branch: refs/heads/master
Commit: 36d746789d5493cfeb290120c9735876ceb0f48f
Parents: bdf5770
Author: Hervé Boutemy <hboutemy@apache.org>
Authored: Sat Nov 8 21:53:16 2014 +0100
Committer: Hervé Boutemy <hboutemy@apache.org>
Committed: Sat Nov 8 21:53:16 2014 +0100

----------------------------------------------------------------------
 .../apache/maven/toolchain/java/JavaToolchainFactory.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/36d74678/maven-core/src/main/java/org/apache/maven/toolchain/java/JavaToolchainFactory.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/toolchain/java/JavaToolchainFactory.java
b/maven-core/src/main/java/org/apache/maven/toolchain/java/JavaToolchainFactory.java
index f47a3d0..9df707c 100644
--- a/maven-core/src/main/java/org/apache/maven/toolchain/java/JavaToolchainFactory.java
+++ b/maven-core/src/main/java/org/apache/maven/toolchain/java/JavaToolchainFactory.java
@@ -24,6 +24,7 @@ import java.util.Map.Entry;
 import java.util.Properties;
 
 import org.apache.maven.toolchain.MisconfiguredToolchainException;
+import org.apache.maven.toolchain.RequirementMatcher;
 import org.apache.maven.toolchain.RequirementMatcherFactory;
 import org.apache.maven.toolchain.ToolchainFactory;
 import org.apache.maven.toolchain.ToolchainPrivate;
@@ -73,14 +74,17 @@ public class JavaToolchainFactory
                     "Provides token '" + key + "' doesn't have any value configured." );
             }
 
+            RequirementMatcher matcher;
             if ( "version".equals( key ) )
             {
-                jtc.addProvideToken( key, RequirementMatcherFactory.createVersionMatcher(
value ) );
+                matcher = RequirementMatcherFactory.createVersionMatcher( value );
             }
             else
             {
-                jtc.addProvideToken( key, RequirementMatcherFactory.createExactMatcher( value
) );
+                matcher = RequirementMatcherFactory.createExactMatcher( value );
             }
+
+            jtc.addProvideToken( key, matcher );
         }
 
         // populate the configuration section


Mime
View raw message