incubator-ivy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r510889 - in /incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve: IvyNode.java IvyNodeEviction.java ResolveEngine.java VisitNode.java
Date Fri, 23 Feb 2007 09:50:54 GMT
Author: xavier
Date: Fri Feb 23 01:50:53 2007
New Revision: 510889

URL: http://svn.apache.org/viewvc?view=rev&rev=510889
Log:
check nullity to fail earlier, to help isolate IVY-355

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

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNode.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNode.java?view=diff&rev=510889&r1=510888&r2=510889
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNode.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNode.java Fri Feb 23
01:50:53 2007
@@ -64,6 +64,12 @@
         private String _conf;
 
         public NodeConf(IvyNode node, String conf) {
+        	if (node == null) {
+        		throw new NullPointerException("node must not null");
+        	}
+        	if (conf == null) {
+        		throw new NullPointerException("conf must not null");
+        	}
             _node = node;
             _conf = conf;
         }

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=510889&r1=510888&r2=510889
==============================================================================
--- 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 01:50:53 2007
@@ -79,6 +79,12 @@
         private String _conf;
 
         public ModuleIdConf(ModuleId mid, String conf) {
+        	if (mid == null) {
+        		throw new NullPointerException("mid cannot be null");
+        	}
+        	if (conf == null) {
+        		throw new NullPointerException("conf cannot be null");
+        	}
             _moduleId = mid;
             _conf = conf;
         }

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java?view=diff&rev=510889&r1=510888&r2=510889
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java Fri Feb
23 01:50:53 2007
@@ -352,6 +352,10 @@
         IvyNode rootNode = new IvyNode(data, md);
         
         for (int i = 0; i < confs.length; i++) {
+        	if (confs[i] == null) {
+        		throw new NullPointerException("null conf not allowed: confs where: "+Arrays.asList(confs));
+        	}
+        	
             // for each configuration we clear the cache of what's been fetched
             _fetchedSet.clear();     
             

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/VisitNode.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/VisitNode.java?view=diff&rev=510889&r1=510888&r2=510889
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/VisitNode.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/VisitNode.java Fri Feb 23
01:50:53 2007
@@ -100,6 +100,15 @@
 
     
     public VisitNode(ResolveData data, IvyNode node, VisitNode parent, String rootModuleConf,
String parentConf) {
+    	if (data == null) {
+    		throw new NullPointerException("data must not be null");
+    	}
+    	if (node == null) {
+    		throw new NullPointerException("node must not be null");
+    	}
+    	if (rootModuleConf == null) {
+    		throw new NullPointerException("rootModuleConf must not be null");
+    	}
     	_data = data;
     	_node = node;
     	_parent = parent;



Mime
View raw message