You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by ma...@apache.org on 2007/12/06 23:50:00 UTC

svn commit: r601896 - /ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManager.java

Author: maartenc
Date: Thu Dec  6 14:50:00 2007
New Revision: 601896

URL: http://svn.apache.org/viewvc?rev=601896&view=rev
Log:
No need to retrieve the IvySettings from the IvyContext here since this manager implements the IvySettingsAware interface.

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManager.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManager.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManager.java?rev=601896&r1=601895&r2=601896&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManager.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/conflict/LatestCompatibleConflictManager.java Thu Dec  6 14:50:00 2007
@@ -75,8 +75,7 @@
         if (conflicts.size() < 2) {
             return conflicts;
         }
-        IvySettings settings = IvyContext.getContext().getSettings();
-        VersionMatcher versionMatcher = settings.getVersionMatcher();
+        VersionMatcher versionMatcher = getSettings().getVersionMatcher();
         
         Iterator iter = conflicts.iterator();
         IvyNode node = (IvyNode) iter.next();
@@ -162,15 +161,14 @@
                  getStrategy().findLatest(
                      toArtifactInfo(Arrays.asList(new IvyNode[] {node, other})), null);
              if (latest != null) {
-                 IvySettings settings = IvyContext.getContext().getSettings();
                  IvyNode latestNode = latest.getNode();
                  IvyNode oldestNode = latestNode == node ? other : node;
                  blackListIncompatibleCallerAndRestartResolveIfPossible(
-                     settings, parent, oldestNode, latestNode); 
+                     getSettings(), parent, oldestNode, latestNode); 
                  // if we arrive here, we haven' managed to blacklist all paths to the latest
                  // node, we try with the oldest
                  blackListIncompatibleCallerAndRestartResolveIfPossible(
-                     settings, parent, latestNode, oldestNode); 
+                     getSettings(), parent, latestNode, oldestNode); 
                  // still not possible, we aren't able to find a solution to the incompatibility
                  handleUnsolvableConflict(parent, conflicts, node, other);