Bug 560799 - Using incorrect property can lead to class cast exception
while parsing
Change-Id: If66aad12b6dd169e84349258e7401983fc2495ea
diff --git a/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/utils/ProjectHelper.java b/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/utils/ProjectHelper.java
index d5143e9..2a412ee 100644
--- a/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/utils/ProjectHelper.java
+++ b/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/utils/ProjectHelper.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -115,7 +115,7 @@
RuntimeConfigurable wrapper = context.currentWrapper();
currentTask = null;
task = null;
- if (wrapper != null) {
+ if (wrapper != null && (wrapper.getProxy() instanceof Task)) {
currentTask = (Task) wrapper.getProxy();
}
onStartElement0(uri, tag, qname, attrs, context);