Skip to content

Commit

Permalink
check if not null first
Browse files Browse the repository at this point in the history
  • Loading branch information
wagyourtail committed Jul 21, 2024
1 parent a1917cb commit 450ae3b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ public byte[] apply(String s) {
try(InputStream is = Files.newInputStream(path)) {
Manifest manifest = new Manifest(is);
Attributes attr = manifest.getMainAttributes();
attr.putValue("JvmDowngrader-Version", Flags.jvmdgVersion);
if (Flags.jvmdgVersion != null) {
attr.putValue("JvmDowngrader-Version", Flags.jvmdgVersion);
}

try (OutputStream os = Files.newOutputStream(outFile, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING)) {
manifest.write(os);
Expand Down

0 comments on commit 450ae3b

Please sign in to comment.