incubator-ivy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r510895 - /incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNodeEviction.java
Date Fri, 23 Feb 2007 10:09:13 GMT
Author: xavier
Date: Fri Feb 23 02:09:13 2007
New Revision: 510895

URL: http://svn.apache.org/viewvc?view=rev&rev=510895
Log:
add check against null and review line returns to help isolate IVY-379 if still possible

Modified:
    incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNodeEviction.java

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNodeEviction.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNodeEviction.java?view=diff&rev=510895&r1=510894&r2=510895
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNodeEviction.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNodeEviction.java Fri
Feb 23 02:09:13 2007
@@ -121,6 +121,9 @@
     private Map _evicted = new HashMap(); // Map (root module conf -> EvictionData) //
indicates if the node is evicted in each root module conf
     
     public IvyNodeEviction(IvyNode node) {
+    	if (node == null) {
+    		throw new NullPointerException("node must not be null");
+    	}
 		_node = node;
 	}
     
@@ -191,7 +194,11 @@
     public boolean isEvicted(String rootModuleConf) {
         cleanEvicted();
         IvyNode root = _node.getRoot();
-        return root != _node && !root.getResolvedRevisions(_node.getId().getModuleId(),
rootModuleConf).contains(_node.getResolvedId());
+        return  root != _node 
+        	&& !root.getResolvedRevisions(
+        			_node.getId().getModuleId(), 
+        			rootModuleConf)
+        				.contains(_node.getResolvedId());
     }
 
     public boolean isCompletelyEvicted() {



Mime
View raw message