ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@gmail.com>
Subject Re: [32/34] ant git commit: java 5-8
Date Wed, 19 Apr 2017 15:28:12 GMT
Hi Stefan,
  I had forgotten about this. When testing my other changes I noted that no
InputStream was returned here, due to the requested entry name including
the leading slash from the jar resource URL; the jar entries encountered
during testing, at least, lacked the leading slash. Due to this the actual
reading of the resource was deferred to the XML parser. Skipping the slash
fixed this issue for me and seemed anecdotally to decrease the amount of
time needed to run the tests. You of course know much more about the file
format than I; I have been unable to find a definitive resource that
confirms that jar file entries should always lack a leading separator.

Matt

On Wed, Apr 19, 2017 at 7:58 AM, Stefan Bodewig <bodewig@apache.org> wrote:

> Matt,
>
> something I overlooked on my first pass
>
> On 2017-04-13, <mbenson@apache.org> wrote:
>
> > http://git-wip-us.apache.org/repos/asf/ant/blob/b7d1e9bd/
> src/main/org/apache/tools/ant/helper/ProjectHelper2.java
> > @@ -256,7 +259,7 @@ public class ProjectHelper2 extends ProjectHelper {
> >                      zf = new ZipFile(org.apache.tools.ant.
> launch.Locator
> >                                       .fromJarURI(uri), "UTF-8");
> >                      inputStream =
> > -                        zf.getInputStream(zf.getEntry(uri.substring(pling
> + 1)));
> > +                        zf.getInputStream(zf.getEntry(uri.substring(pling
> + 2)));
>
> why did you change the offset from 1 to 2? Doesn't look right to me but
> if it is we should probably change it for 1.9.x as well.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message