Skip to content

Conversation

jamierocks
Copy link
Member

@jamierocks jamierocks commented Jan 30, 2021

Atlas 0.2.1 provides some quality-of-life features designed to make Atlas more configurable and accountable.

  • Execeptions will no longer be dismissed when transforming, and rather rethrown (as was my intention).
  • Output jars will be repackaged to ensure that the manifest is read by JarInputStream correctly.
  • Atlases can specify their own ExecutorService to use, or their parallelism level if using our provided constructors.

jamierocks and others added 7 commits January 29, 2021 23:53
This addresses one of the issues raised in GH-2.
This ensures the output jar is compatible with the JDK's JarInputStream.
This includes a few doc comment improvements, but also has some logic
improvements as well.

First, this will handle cases where MANIFEST.MF isn't all-caps, as it
technically doesn't have to be. JarFile will find any file in META-INF/
named MANIFEST.MF, ignoring case. By using JarFile directly to get the
manifest rather than looking for the entry ourselves we remove the
possibility of that issue causing a failure.

We also now retrieve the manifest first, so if that fails somehowe we
don't create the empty META-INF/ entry. By returning `true` only when
the entries have been set we prevent a silent failure in the
copyManifest() method from causing an error downstream (that is, the
META-INF/ entry getting skipped later even though it wasn't copied).
To do this, they should return null rather than an entry. This fixes
GH-8.
private final ExecutorService executorService;
private final boolean manageExecutor;

public Atlas(final ExecutorService executorService, final boolean manageExecutor) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mentioned suggestions about this stuff to you - commenting to remind.

@jamierocks jamierocks merged commit f2c16aa into master Jan 30, 2021
@jamierocks jamierocks deleted the release-0.2.1 branch March 4, 2021 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Possible to remove entries from a jar while transforming? Concurrency issues

3 participants