Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v8]

2025-05-16 Thread Lance Andersen
On Thu, 15 May 2025 21:57:17 GMT, Henry Jen wrote: >> This PR check the jar file to ensure entries are consistent from the central >> directory and local file header. Also check there is no duplicate entry >> names that could override the desired content by accident. > > Henry Jen has updated t

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v6]

2025-05-15 Thread Henry Jen
On Wed, 7 May 2025 17:28:34 GMT, Lance Andersen wrote: >> Henry Jen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Restore Validator access level > > test/jdk/tools/jar/ValidatorTest.java line 232: > >> 230: var err = e.get

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v6]

2025-05-15 Thread Henry Jen
On Wed, 7 May 2025 18:00:23 GMT, Henry Jen wrote: >> src/jdk.jartool/share/classes/sun/tools/jar/Validator.java line 127: >> >>> 125: >>> 126: public DedupEntryNames(boolean isCEN) { >>> 127: this.isCEN = isCEN; >> >> Might be clearer if this was an enum vs boolean? > > I f

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v8]

2025-05-15 Thread Henry Jen
> This PR check the jar file to ensure entries are consistent from the central > directory and local file header. Also check there is no duplicate entry names > that could override the desired content by accident. Henry Jen has updated the pull request incrementally with one additional commit s

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v7]

2025-05-15 Thread Henry Jen
> This PR check the jar file to ensure entries are consistent from the central > directory and local file header. Also check there is no duplicate entry names > that could override the desired content by accident. Henry Jen has updated the pull request incrementally with one additional commit s

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v6]

2025-05-14 Thread Lance Andersen
On Wed, 14 May 2025 16:39:54 GMT, Henry Jen wrote: > UTF-8 messed up the index, we don't want any conversion to happen. Warning: > Entry META-INFMAANIFEST.MF in local file header is not in central directory > Warning: Entry META-INF/BANIFEST.MF in local file header is not in central > director

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v6]

2025-05-14 Thread Henry Jen
On Wed, 7 May 2025 17:41:07 GMT, Lance Andersen wrote: >> Henry Jen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Restore Validator access level > > test/jdk/tools/jar/ValidatorTest.java line 145: > >> 143: var template = out.

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v6]

2025-05-07 Thread Henry Jen
On Wed, 7 May 2025 17:13:19 GMT, Lance Andersen wrote: >> Henry Jen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Restore Validator access level > > src/jdk.jartool/share/classes/sun/tools/jar/Validator.java line 127: > >> 125: >> 12

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v6]

2025-05-07 Thread Lance Andersen
On Tue, 6 May 2025 18:21:30 GMT, Henry Jen wrote: >> This PR check the jar file to ensure entries are consistent from the central >> directory and local file header. Also check there is no duplicate entry >> names that could override the desired content by accident. > > Henry Jen has updated th

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v6]

2025-05-06 Thread Henry Jen
> This PR check the jar file to ensure entries are consistent from the central > directory and local file header. Also check there is no duplicate entry names > that could override the desired content by accident. Henry Jen has updated the pull request incrementally with one additional commit s

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v5]

2025-05-06 Thread Henry Jen
> This PR check the jar file to ensure entries are consistent from the central > directory and local file header. Also check there is no duplicate entry names > that could override the desired content by accident. Henry Jen has updated the pull request incrementally with one additional commit s

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v4]

2025-04-29 Thread Henry Jen
> This PR check the jar file to ensure entries are consistent from the central > directory and local file header. Also check there is no duplicate entry names > that could override the desired content by accident. Henry Jen has updated the pull request incrementally with one additional commit s

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v3]

2025-04-29 Thread Christian Stein
On Tue, 29 Apr 2025 14:36:37 GMT, Henry Jen wrote: >> This PR check the jar file to ensure entries are consistent from the central >> directory and local file header. Also check there is no duplicate entry >> names that could override the desired content by accident. > > Henry Jen has updated t

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v3]

2025-04-29 Thread Henry Jen
> This PR check the jar file to ensure entries are consistent from the central > directory and local file header. Also check there is no duplicate entry names > that could override the desired content by accident. Henry Jen has updated the pull request incrementally with one additional commit s

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v2]

2025-04-29 Thread Henry Jen
On Tue, 29 Apr 2025 00:02:58 GMT, Chen Liang wrote: >> Henry Jen has updated the pull request with a new target base due to a merge >> or a rebase. The incremental webrev excludes the unrelated changes brought >> in by the merge/rebase. The pull request contains three additional commits >> sin

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v2]

2025-04-28 Thread Chen Liang
On Mon, 28 Apr 2025 23:40:11 GMT, Henry Jen wrote: >> This PR check the jar file to ensure entries are consistent from the central >> directory and local file header. Also check there is no duplicate entry >> names that could override the desired content by accident. > > Henry Jen has updated t

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v2]

2025-04-28 Thread Henry Jen
On Fri, 4 Apr 2025 16:41:52 GMT, Lance Andersen wrote: >> Yes, in a perfect world there will be a 1 to 1 match but either way we >> should sanity check it in case something happened > >> Is the ordering required by ZIP or Jar format? We can certainly do that if >> that's under spec and not an i

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v2]

2025-04-28 Thread Henry Jen
> This PR check the jar file to ensure entries are consistent from the central > directory and local file header. Also check there is no duplicate entry names > that could override the desired content by accident. Henry Jen has updated the pull request with a new target base due to a merge or a

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate

2025-04-04 Thread Lance Andersen
On Fri, 4 Apr 2025 16:12:56 GMT, Lance Andersen wrote: >> As we checking entry uniqueness and the size match, and all LOC entries >> should be in CEN, that would means all CEN entries in LOC. >> But if we would like to be specific about the inconsistency, then we will >> have to do a little mo

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate

2025-04-04 Thread Lance Andersen
On Fri, 4 Apr 2025 16:01:40 GMT, Henry Jen wrote: >> src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties line >> 147: >> >>> 145: in incompatible public interfaces >>> 146: warn.validator.duplicate.entry=\ >>> 147: Warning: More than one copy of {0} is detected

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate

2025-04-04 Thread Lance Andersen
On Fri, 4 Apr 2025 16:06:07 GMT, Henry Jen wrote: >> Is the ordering required by ZIP or Jar format? We can certainly do that if >> that's under spec and not an implementation detail. > > As we checking entry uniqueness and the size match, and all LOC entries > should be in CEN, that would mean

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate

2025-04-04 Thread Henry Jen
On Fri, 4 Apr 2025 15:59:47 GMT, Henry Jen wrote: >> src/jdk.jartool/share/classes/sun/tools/jar/Validator.java line 99: >> >>> 97: if (!entryNames.contains(entryName)) { >>> 98: missingEntryNames.add(entryName); >>> 99: } >> >> It looks like

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate

2025-04-04 Thread Henry Jen
On Fri, 4 Apr 2025 12:39:47 GMT, Lance Andersen wrote: >> This PR check the jar file to ensure entries are consistent from the central >> directory and local file header. Also check there is no duplicate entry >> names that could override the desired content by accident. > > src/jdk.jartool/sha

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate

2025-04-04 Thread Lance Andersen
On Fri, 4 Apr 2025 00:39:04 GMT, Henry Jen wrote: > This PR check the jar file to ensure entries are consistent from the central > directory and local file header. Also check there is no duplicate entry names > that could override the desired content by accident. Thank you for starting the wor

RFR: 8345431: Detect duplicate entries in jar files with jar --validate

2025-04-03 Thread Henry Jen
This PR check the jar file to ensure entries are consistent from the central directory and local file header. Also check there is no duplicate entry names that could override the desired content by accident. - Commit messages: - 8345431: Detect duplicate entries in jar files with j