Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove workaround code that creates an empty Jar file #80

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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