mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
24 lines
805 B
Diff
24 lines
805 B
Diff
--- a/src/main/org/apache/tools/ant/Diagnostics.java
|
|
+++ b/src/main/org/apache/tools/ant/Diagnostics.java
|
|
@@ -179,7 +179,10 @@
|
|
* @param clazz the class to get the information from.
|
|
* @since Ant 1.8.0
|
|
*/
|
|
- private static URL getClassLocation(Class clazz) {
|
|
+ private static URL getClassLocation(Class clazz) {
|
|
+ if (clazz.getProtectionDomain().getCodeSource() == null) {
|
|
+ return null;
|
|
+ }
|
|
return clazz.getProtectionDomain().getCodeSource().getLocation();
|
|
}
|
|
|
|
@@ -241,7 +244,7 @@
|
|
}
|
|
Transformer transformer = null;
|
|
try {
|
|
- transformer = transformerFactory.newTransformer();
|
|
+ transformer = transformerFactory.newTransformer();
|
|
} catch (Exception e) {
|
|
// ignore
|
|
ignoreThrowable(e);
|