Browse Source

NPE when when <presetdef> tries to configure a task that

cannot be instantiated.
PR:  33689
Reported by: Steve Loughran


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277704 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 20 years ago
parent
commit
83c26f549b
2 changed files with 8 additions and 0 deletions
  1. +3
    -0
      WHATSNEW
  2. +5
    -0
      src/main/org/apache/tools/ant/UnknownElement.java

+ 3
- 0
WHATSNEW View File

@@ -328,6 +328,9 @@ Fixed bugs:
* <zip> couldn't store files with size between 2GB and 4GB (the * <zip> couldn't store files with size between 2GB and 4GB (the
upper limit set by the ZIP format itself). Bugzilla Report 33310. upper limit set by the ZIP format itself). Bugzilla Report 33310.


* NPE when when <presetdef> tries to configure a task that
cannot be instantiated. Bugzilla Report 33689.

Changes from Ant 1.6.1 to Ant 1.6.2 Changes from Ant 1.6.1 to Ant 1.6.2
=================================== ===================================




+ 5
- 0
src/main/org/apache/tools/ant/UnknownElement.java View File

@@ -404,6 +404,11 @@ public class UnknownElement extends Task {
if (o instanceof PreSetDef.PreSetDefinition) { if (o instanceof PreSetDef.PreSetDefinition) {
PreSetDef.PreSetDefinition def = (PreSetDef.PreSetDefinition) o; PreSetDef.PreSetDefinition def = (PreSetDef.PreSetDefinition) o;
o = def.createObject(ue.getProject()); o = def.createObject(ue.getProject());
if (o == null) {
throw getNotFoundException(
"preset " + name,
def.getPreSets().getComponentName());
}
ue.applyPreSet(def.getPreSets()); ue.applyPreSet(def.getPreSets());
if (o instanceof Task) { if (o instanceof Task) {
Task task = (Task) o; Task task = (Task) o;


Loading…
Cancel
Save