You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2012/02/23 21:40:22 UTC

DO NOT REPLY [Bug 52754] New: XMLCatalog.ExternalResolver handles CWD differently than InternalResolver

https://issues.apache.org/bugzilla/show_bug.cgi?id=52754

             Bug #: 52754
           Summary: XMLCatalog.ExternalResolver handles CWD differently
                    than InternalResolver
           Product: Ant
           Version: 1.8.3
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: jglick@netbeans.org
    Classification: Unclassified


cd /tmp && ant -f .../build.xml
-Dtestcase='org.apache.tools.ant.types.XMLCatalogTest' test

fails:

junit.framework.AssertionFailedError: Empty catalog should return input with a
system ID like file:/.../i/dont/exist.dtd but was tmp/i/dont/exist.dtd
    at junit.framework.Assert.fail(Assert.java:47)
    at junit.framework.Assert.assertTrue(Assert.java:20)
    at
org.apache.tools.ant.types.XMLCatalogTest.testEmptyCatalog(XMLCatalogTest.java:94)

junit.framework.AssertionFailedError: Nonexistent Catalog entry return input
with a system ID like file:/tmp/file:/.../i/dont/exist.dtd but was
tmp/i/dont/exist.dtd
    at junit.framework.Assert.fail(Assert.java:47)
    at junit.framework.Assert.assertTrue(Assert.java:20)
    at
org.apache.tools.ant.types.XMLCatalogTest.testNonExistentEntry(XMLCatalogTest.java:139)

In XMLCatalog.resolve, getCatalogResolver() is an ExternalCatalog and resolving
 a relative path with a null base is done against the JVM's CWD rather than the
project's basedir.

If you force the resolver to be an InternalResolver, the test passes. Seems
that the external resolver when encountering an href with no matching entry
fails to use the basedir as a URL base.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52754] XMLCatalog.ExternalResolver handles CWD differently than InternalResolver

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52754

Jesse Glick <jg...@netbeans.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jglick@netbeans.org
         Resolution|                            |FIXED
   Target Milestone|---                         |1.9.0

--- Comment #1 from Jesse Glick <jg...@netbeans.org> 2012-02-23 20:43:07 UTC ---
Committed revision 1292945.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.