diff --git a/WHATSNEW b/WHATSNEW index 1581d5368..f0af8797e 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -328,6 +328,9 @@ Fixed bugs: * couldn't store files with size between 2GB and 4GB (the upper limit set by the ZIP format itself). Bugzilla Report 33310. +* NPE when when tries to configure a task that + cannot be instantiated. Bugzilla Report 33689. + Changes from Ant 1.6.1 to Ant 1.6.2 =================================== diff --git a/src/main/org/apache/tools/ant/UnknownElement.java b/src/main/org/apache/tools/ant/UnknownElement.java index 1d5acf6ac..fd888f42e 100644 --- a/src/main/org/apache/tools/ant/UnknownElement.java +++ b/src/main/org/apache/tools/ant/UnknownElement.java @@ -404,6 +404,11 @@ public class UnknownElement extends Task { if (o instanceof PreSetDef.PreSetDefinition) { PreSetDef.PreSetDefinition def = (PreSetDef.PreSetDefinition) o; o = def.createObject(ue.getProject()); + if (o == null) { + throw getNotFoundException( + "preset " + name, + def.getPreSets().getComponentName()); + } ue.applyPreSet(def.getPreSets()); if (o instanceof Task) { Task task = (Task) o;