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 2008/02/27 15:43:11 UTC

[Bug 44499] New: ManifestClassPath throws when a relative path would traverse the file system root

http://issues.apache.org/bugzilla/show_bug.cgi?id=44499

           Summary: ManifestClassPath throws when a relative path would
                    traverse the file system root
           Product: Ant
           Version: 1.7.0
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: wolf@nlm.nih.gov


ManifestClassPath throws when a relative path would traverse the file system
root.

The relative path to /aux/b.jar from /usr/local should be ../../aux/b.jar, but
ManifestClassPath does not tolerate it.  The exception thrown seems to depend
on maxParentLevels.  Here are two illustrations.

This build file produces a java.lang.NullPointerException:

<project name="crash" basedir="/usr/local">
<manifestclasspath jarfile="e.jar" maxParentLevels="99" property="cp">
   <classpath>
      <pathelement location="/aux/b.jar"/>
   </classpath>
</manifestclasspath>
</project>

This build file produces a java.lang.ArrayIndexOutOfBoundsException:

<project name="crash" basedir="/usr/local">
<manifestclasspath jarfile="e.jar" maxParentLevels="2" property="cp">
   <classpath>
      <pathelement location="/aux/b.jar"/>
   </classpath>
</manifestclasspath>
</project>


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