diff options
author | Stefan Bodewig <bodewig@apache.org> | 2008-11-28 15:42:05 +0000 |
---|---|---|
committer | Stefan Bodewig <bodewig@apache.org> | 2008-11-28 15:42:05 +0000 |
commit | e88414ba32cbb978c462dab3ba5fee7efc3f670e (patch) | |
tree | cc87eb0ebc544260822e128123e6c31b9ac934b6 /src/main/org/apache/tools/ant/types/XMLCatalog.java | |
parent | 027f5c796500728c71fca5edcd504aa6065ca34c (diff) | |
download | ant-e88414ba32cbb978c462dab3ba5fee7efc3f670e.tar.gz |
first step of reference-check auditing after I re-understood how things are supposed to work.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@721523 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/main/org/apache/tools/ant/types/XMLCatalog.java')
-rw-r--r-- | src/main/org/apache/tools/ant/types/XMLCatalog.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main/org/apache/tools/ant/types/XMLCatalog.java b/src/main/org/apache/tools/ant/types/XMLCatalog.java index 66413e519..739dac134 100644 --- a/src/main/org/apache/tools/ant/types/XMLCatalog.java +++ b/src/main/org/apache/tools/ant/types/XMLCatalog.java @@ -27,6 +27,7 @@ import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import java.util.Enumeration; +import java.util.Stack; import java.util.Vector; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParserFactory; @@ -451,6 +452,28 @@ public class XMLCatalog extends DataType return source; } + protected synchronized void dieOnCircularReference(Stack stk, Project p) + throws BuildException { + if (isChecked()) { + return; + } + if (isReference()) { + super.dieOnCircularReference(stk, p); + } else { + if (classpath != null) { + stk.push(classpath); + invokeCircularReferenceCheck(classpath, stk, p); + stk.pop(); + } + if (catalogPath != null) { + stk.push(catalogPath); + invokeCircularReferenceCheck(catalogPath, stk, p); + stk.pop(); + } + setChecked(true); + } + } + /** * @since Ant 1.6 */ |