On Tue, 11 Nov 2025 18:45:48 GMT, Christian Stein <[email protected]> wrote:

>> Please review this change to include a validation check for expecting an 
>> optional JAR manifest entry being the first or second entry in JAR file. As 
>> the second entry, it must be only preceeded by an entry for the `META-INF/` 
>> directory.
>
> Christian Stein has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Split test steps

src/jdk.jartool/share/classes/sun/tools/jar/Validator.java line 257:

> 255:                         
> errorAndInvalid(formatMsg("error.validator.wrong.position", firstName, "0"));
> 256:                     }
> 257:                 }

I would suggest to move this check to after the order mismatch  validation 
below as the checks also validate if the manifest is missing in the LOC or CEN 
or out of order

By doing so you will also guarantee that Manifest is at the same offset it both 
he LOC and CEN

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28154#discussion_r2511473421

Reply via email to