Hello,
After upgrading our environment from Ant 1.6.4 to Ant 1.7.1 we ran into
NullPointerExceptions with some of our custom tasks, something like:
java.lang.NullPointerException
at
org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:390)
at
org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:349)
at
org.apache.tools.ant.UnknownElement.handleChild(UnknownElement.java:568)
at
org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:346)
at
org.apache.tools.ant.UnknownElement.handleChild(UnknownElement.java:569)
at
org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:346)
at
org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:198)
Investigating the issue we found that we created nested UnknownElement
instances in our implementation without explicitly setting the project except
for the "root" element. If we explicitly set the project on each and every
UnknownElement we create then the call to configure()succeeds.
I'm not sure if this should be considered a bug, but at least I couldn't find
anything in the documentation that this change was intentional. From the
subversion repository this might be a side effect of change 450605
(http://svn.apache.org/viewvc?view=rev&revision=450605 ) but I didn't verify
this in detail.
Googling around for the exception I only found an older thread in the JetBrains
Developer Community ( http://www.jetbrains.net/devnet/thread/265263 ) without a
solution for the issue, though.
Did anybody else experience problems with this? Should I open this as a bug?
Best regards,
Marc
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]