RFR: 8318971: jar v17 should either exit on error immediately or create archive as jar v1.8 did

Lance Andersen lancea at openjdk.org
Mon Nov 6 15:21:15 UTC 2023


On Mon, 6 Nov 2023 11:28:23 GMT, Ryan Wallace <duke at openjdk.org> wrote:

> I had a look and its been in since JDK 9 (https://bugs.openjdk.org/browse/JDK-8158295) but haven’t found any mention of this as a specific desired behaviour so I am going with just noticed now. Its not a major blocker as the user can either make sure the missing file is in place or exclude it from being added to the archive and rerun.
> 
> I agree it will need some thought, I was of the opinion that we should fail upfront and notify the user of why. The JDK 8 behaviour doesn’t make sense as the state is recognised as an error and there are tests to validate this, but they do not validate the archive has not been created, in my opinion we shouldn’t continue on and create it. There are other areas in the jar tool in 8 that will clean up (delete) the archive that has been created if there is an error, this case just seems to fall through the cracks.

As part of the decision process, we should consider the behavior of what simillar  tools do in this area.  We may also want to discuss the merits of whether there should be an option to toggle the behavior

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

PR Comment: https://git.openjdk.org/jdk/pull/16423#issuecomment-1795072524


More information about the compiler-dev mailing list