You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by xa...@apache.org on 2007/03/30 17:42:24 UTC

svn commit: r524201 - in /incubator/ivy/core/trunk: CHANGES.txt src/java/org/apache/ivy/Main.java

Author: xavier
Date: Fri Mar 30 10:42:23 2007
New Revision: 524201

URL: http://svn.apache.org/viewvc?view=rev&rev=524201
Log:
FIX: Ivy standalone is passing null args to main method when invoking with no args (IVY-457)

Modified:
    incubator/ivy/core/trunk/CHANGES.txt
    incubator/ivy/core/trunk/src/java/org/apache/ivy/Main.java

Modified: incubator/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/CHANGES.txt?view=diff&rev=524201&r1=524200&r2=524201
==============================================================================
--- incubator/ivy/core/trunk/CHANGES.txt (original)
+++ incubator/ivy/core/trunk/CHANGES.txt Fri Mar 30 10:42:23 2007
@@ -58,6 +58,7 @@
 - IMPROVE: New "modules in use" section in console report at the end of resolve (IVY-373) (thanks to John Wiliams)
 - IMPROVE: Generated XML reports now contains more information about the resolved module (IVY-446)
 
+- FIX: Ivy standalone is passing null args to main method when invoking with no args (IVY-457)
 - FIX: Invalid error report with m2compatible resolver (IVY-456)
 - FIX: IvyPostResolve Task doesn't use specified cache for the resolve (IVY-453)
 - FIX: XmlModuleDescriptorWriterTest not working with Java 6 (IVY-374)

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/Main.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/Main.java?view=diff&rev=524201&r1=524200&r2=524201
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/Main.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/Main.java Fri Mar 30 10:42:23 2007
@@ -424,7 +424,7 @@
         	Method mainMethod = c.getMethod("main", new Class[] { String[].class });
         	
         	// Split up arguments 
-        	mainMethod.invoke(null, new Object[] { args });
+        	mainMethod.invoke(null, new Object[] { (args == null ? new String[0] : args) });
         } catch (ClassNotFoundException cnfe) {
         	throw new RuntimeException("Could not find class: " + mainclass, cnfe);
         } catch (SecurityException e) {