You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2007/10/29 09:43:14 UTC

svn commit: r589544 - /maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java

Author: brett
Date: Mon Oct 29 01:43:13 2007
New Revision: 589544

URL: http://svn.apache.org/viewvc?rev=589544&view=rev
Log:
work around bug in old versions of xalan bundled in JDK 1.4.2

Modified:
    maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java

Modified: maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java?rev=589544&r1=589543&r2=589544&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java (original)
+++ maven/plugins/trunk/maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/AntBuildWriterUtil.java Mon Oct 29 01:43:13 2007
@@ -1089,7 +1089,7 @@
                 XObject obj = XPathAPI.eval( doc, "//configuration/" + optionName );
 
                 NodeList nodeList = obj.nodelist();
-                if ( isList( nodeList.item( 0 ) ) )
+                if ( nodeList.getLength() > 0 && isList( nodeList.item( 0 ) ) )
                 {
                     /*
                      * <optionNames>
@@ -1182,7 +1182,6 @@
             }
             catch ( Exception e )
             {
-                e.printStackTrace();
                 throw new IOException( "Exception occured: " + e.getMessage() );
             }
         }