From: aclement Date: Fri, 23 Sep 2011 16:07:41 +0000 (+0000) Subject: catch security exception accessing property and return false X-Git-Tag: V1_6_12~14 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=997bf891fadb2186b55ab7703f153cde753b8fc3;p=aspectj.git catch security exception accessing property and return false --- diff --git a/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java b/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java index 1ebb14b1a..7ac87ac9d 100644 --- a/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java +++ b/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java @@ -127,7 +127,7 @@ public class WeavingAdaptor implements IMessageContext { init(FileUtil.makeClasspath(classURLs), FileUtil.makeClasspath(aspectURLs)); } - private List getFullClassPath(ClassLoader loader) { + private List getFullClassPath(ClassLoader loader) { List list = new LinkedList(); for (; loader != null; loader = loader.getParent()) { if (loader instanceof URLClassLoader) { @@ -143,7 +143,7 @@ public class WeavingAdaptor implements IMessageContext { return list; } - private List getFullAspectPath(ClassLoader loader) { + private List getFullAspectPath(ClassLoader loader) { List list = new LinkedList(); for (; loader != null; loader = loader.getParent()) { if (loader instanceof WeavingClassLoader) { @@ -151,15 +151,19 @@ public class WeavingAdaptor implements IMessageContext { list.addAll(0, FileUtil.makeClasspath(urls)); } } - return list; } private static boolean getVerbose() { - return Boolean.getBoolean(WEAVING_ADAPTOR_VERBOSE); + try { + return Boolean.getBoolean(WEAVING_ADAPTOR_VERBOSE); + } catch (Throwable t) { + // security exception + return false; + } } - private void init(List classPath, List aspectPath) { + private void init(List classPath, List aspectPath) { abortOnError = true; createMessageHandler();