diff --git a/WHATSNEW b/WHATSNEW index 317f1aeb9..c779be6a7 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -29,6 +29,9 @@ Fixed bugs: * VectorSet#remove(Object) would fail if the size of the vector equaled its capacity. + + * Regression : ant -diagnostics was returning with exit code 1 + Bugzilla Report 48782 Other changes: -------------- diff --git a/src/main/org/apache/tools/ant/Diagnostics.java b/src/main/org/apache/tools/ant/Diagnostics.java index 35ef35f5d..72cd8aed3 100644 --- a/src/main/org/apache/tools/ant/Diagnostics.java +++ b/src/main/org/apache/tools/ant/Diagnostics.java @@ -180,6 +180,9 @@ public final class Diagnostics { * @since Ant 1.8.0 */ private static URL getClassLocation(Class clazz) { + if (clazz.getProtectionDomain().getCodeSource() == null) { + return null; + } return clazz.getProtectionDomain().getCodeSource().getLocation(); }