ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgl...@apache.org
Subject svn commit: r1292945 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/types/XMLCatalog.java
Date Thu, 23 Feb 2012 20:42:47 GMT
Author: jglick
Date: Thu Feb 23 20:42:47 2012
New Revision: 1292945

URL: http://svn.apache.org/viewvc?rev=1292945&view=rev
Log:
#52754: correcting basedir for external resolver.

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/types/XMLCatalog.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=1292945&r1=1292944&r2=1292945&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Thu Feb 23 20:42:47 2012
@@ -7,6 +7,10 @@ Changes that could break older environme
 Fixed bugs:
 -----------
 
+ * External XML catalog resolver failed to use project basedir when given an
+   unmentioned relative path like the internal resolver does.
+   Bugzilla Report 52754.
+
 Other changes:
 --------------
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/XMLCatalog.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/XMLCatalog.java?rev=1292945&r1=1292944&r2=1292945&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/XMLCatalog.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/XMLCatalog.java Thu Feb 23 20:42:47
2012
@@ -1072,6 +1072,13 @@ public class XMLCatalog extends DataType
                 // Apache resolver's resolveEntity method to cover
                 // this possibility.
                 //
+                if (base == null) {
+                    try {
+                        base = FILE_UTILS.getFileURL(getProject().getBaseDir()).toString();
+                    } catch (MalformedURLException x) {
+                        throw new TransformerException(x);
+                    }
+                }
                 try {
                     result =
                         (SAXSource) resolve.invoke(resolverImpl,



Mime
View raw message