git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@359329 13f79535-47bb-0310-9956-ffa450edef68master
@@ -67,7 +67,8 @@ Changes that could break older environments: | |||||
Fixed bugs: | Fixed bugs: | ||||
----------- | ----------- | ||||
* Some potential NullPointerExceptions, Bugzilla Report 37765 | |||||
* Some potential NullPointerExceptions, Bugzilla Reports 37765 and 38056 | |||||
* Problem when adding multiple filter files, Bugzilla Report 37341 | * Problem when adding multiple filter files, Bugzilla Report 37341 | ||||
@@ -118,4 +118,13 @@ | |||||
</javac> | </javac> | ||||
</target> | </target> | ||||
<target name="presetdef-with-nested-element-twice"> | |||||
<copy todir="."> | |||||
<fileset dir="." includes="nonexistent"/> | |||||
</copy> | |||||
<presetdef name="copy"> | |||||
<copy verbose="true"/> | |||||
</presetdef> | |||||
</target> | |||||
</project> | </project> |
@@ -41,7 +41,7 @@ public class UnknownElement extends Task { | |||||
/** | /** | ||||
* Holds the namespace of the element. | * Holds the namespace of the element. | ||||
*/ | */ | ||||
private String namespace; | |||||
private String namespace = ""; | |||||
/** | /** | ||||
* Holds the namespace qname of the element. | * Holds the namespace qname of the element. | ||||
@@ -111,7 +111,7 @@ public class UnknownElement extends Task { | |||||
getProject()); | getProject()); | ||||
namespace = helper.getCurrentAntlibUri(); | namespace = helper.getCurrentAntlibUri(); | ||||
} | } | ||||
this.namespace = namespace; | |||||
this.namespace = namespace == null ? "" : namespace; | |||||
} | } | ||||
/** Return the qname of the XML element associated with this component. | /** Return the qname of the XML element associated with this component. | ||||
@@ -80,6 +80,10 @@ public class PreSetDefTest extends BuildFileTest { | |||||
"correct_taskname_badel", "element message", "javac doesn't support the"); | "correct_taskname_badel", "element message", "javac doesn't support the"); | ||||
} | } | ||||
public void testPresetdefWithNestedElementTwice() { // #38056 | |||||
executeTarget("presetdef-with-nested-element-twice"); | |||||
executeTarget("presetdef-with-nested-element-twice"); | |||||
} | |||||
/** | /** | ||||
* A test class to check default properties | * A test class to check default properties | ||||