ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: svn commit: r1001756 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/helper/ src/main/org/apache/tools/ant/launch/ src/tests/antunit/taskdefs/taskdef-test.xml
Date Mon, 27 Sep 2010 14:49:42 GMT
On 2010-09-27, <> wrote:

> according to the javadocs of JarURLConnection the separator is !/ not
> ! - this allows dealing with jars in directories that contain a ! in
> their name, as long as it is not at the end of the directory name.

This deals with splitting jar:file:somwhere/jar.file!/some/resource into
the jar's URL and the relative resource.  We used to split at
indexOf("!") and the code now splits at indexOf("!/") which is the
official separator.

Two things to note:

 (1) there is a disabled testcase for when "somewhere" in the URL above
   ends with a "!".  Classloader.getResources("something") happily
   returns an URL that JarURLConnection cannot deal with - it looks as
   if Sun's code was performing the same naive indexOf("!/") that our
   code now uses.

   I'm not conviced that we can fix that (we could try to figure out the
   file part in special cases like the <taskdef> test and perform
   %-escaping if that works) or that we even want to.

 (2) The new tests create JARs that will be loaded by a classloader -
   which means Ant cannot delete them because they remain locked until
   the JVM has exited.  This means the tests accumulate a lot of garbage
   in ${TEMP} over time.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message