Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 373ED200C5C for ; Thu, 20 Apr 2017 09:48:58 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 35CEF160BB0; Thu, 20 Apr 2017 07:48:58 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 75A3E160B91 for ; Thu, 20 Apr 2017 09:48:57 +0200 (CEST) Received: (qmail 20033 invoked by uid 500); 20 Apr 2017 07:48:56 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 20012 invoked by uid 99); 20 Apr 2017 07:48:55 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Apr 2017 07:48:55 +0000 Received: from v45346.1blu.de (v45346.1blu.de [178.254.23.72]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 66AE91A0814 for ; Thu, 20 Apr 2017 07:48:55 +0000 (UTC) Received: by v45346.1blu.de (Postfix, from userid 1000) id 400CE401C9D; Thu, 20 Apr 2017 09:48:52 +0200 (CEST) From: Stefan Bodewig To: dev@ant.apache.org Subject: Re: [32/34] ant git commit: java 5-8 References: <7fc22acfffd546e0a11de64605e84c96@git.apache.org> <7aca7bfd831548ce9dbbecd4d830bc47@git.apache.org> <871ssomu4k.fsf@v45346.1blu.de> Date: Thu, 20 Apr 2017 09:48:52 +0200 In-Reply-To: (Matt Benson's message of "Wed, 19 Apr 2017 10:28:12 -0500") Message-ID: <871ssn1puj.fsf@v45346.1blu.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain archived-at: Thu, 20 Apr 2017 07:48:58 -0000 On 2017-04-19, Matt Benson wrote: > 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. So this has never worked and nobody has noticed so far, strange. > 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. Wouldn't we end up with a null InputStream and an exception being thrown later on? > 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. A leading slash would violate the ZIP spec https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT 4.4.17.1 The name of the file, with optional relative path. The path stored MUST not contain a drive or device letter, or a leading slash. ... so the current code is certainly wrong. I'll try to dig deeper into this the coming days unless anybody else beats me to it. Many thanks Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org