Skip to content

Commit

Permalink
Remove workaround code that creates an empty Jar file
Browse files Browse the repository at this point in the history
Follow up to #15

Fixes #78
  • Loading branch information
jjohannes committed Nov 17, 2023
1 parent 5a1c1ed commit 4be43ca
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,9 @@ private boolean isModule(File jar) {
if (!jar.isFile()) {
// If the jar does not exist, we assume that the file, which is produced later is a local artifact and a module.
// For local files this behavior is ok, because this transform is targeting published artifacts.
// See also: https://github.com/jjohannes/extra-java-module-info/issues/15
try {
//noinspection ResultOfMethodCallIgnored
jar.getParentFile().mkdirs();
//noinspection ResultOfMethodCallIgnored
jar.createNewFile();
} catch (IOException e) {
throw new RuntimeException(e);
}
// See also:
// - https://github.com/jjohannes/extra-java-module-info/issues/15
// - https://github.com/jjohannes/extra-java-module-info/issues/78
return true;
}
try (JarInputStream inputStream = new JarInputStream(Files.newInputStream(jar.toPath()))) {
Expand Down

0 comments on commit 4be43ca

Please sign in to comment.