diff --git a/CHANGELOG.md b/CHANGELOG.md index e9a6dc06..9e915ace 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added scramble to the element, introducing randomized mapping - Add documentation about default values +## Fixed +- Do not use `setComment` when comment is actually `null`. Achieves Android compatibility. + ## [2.9.1] - 2019-11-18 ## Changed - Use a Jekyll-based documentation instead of our own HTML diff --git a/retroguard/src/main/java/com/yworks/yguard/obf/GuardDB.java b/retroguard/src/main/java/com/yworks/yguard/obf/GuardDB.java index 32521463..7345f6d4 100644 --- a/retroguard/src/main/java/com/yworks/yguard/obf/GuardDB.java +++ b/retroguard/src/main/java/com/yworks/yguard/obf/GuardDB.java @@ -453,7 +453,9 @@ else if (STREAM_NAME_MANIFEST.equals(inName.toUpperCase()) || } else { outJar = new JarOutputStream(new BufferedOutputStream(os),newManifest[i]); } - outJar.setComment( Version.getJarComment()); + if (Version.getJarComment() != null) { + outJar.setComment( Version.getJarComment()); + } // sort the entries in ascending order Collections.sort(jarEntries, new Comparator(){