diff options
author | aclement <aclement> | 2011-07-26 15:52:40 +0000 |
---|---|---|
committer | aclement <aclement> | 2011-07-26 15:52:40 +0000 |
commit | c6fb752d7ca6910bcb825cfd5ccdf8d39e419408 (patch) | |
tree | 1564df7fefb0ff089601cb5702bad0c7e174e39c /loadtime | |
parent | 8553b30c9211a49b225e6c6bc81abda849263740 (diff) | |
download | aspectj-c6fb752d7ca6910bcb825cfd5ccdf8d39e419408.tar.gz aspectj-c6fb752d7ca6910bcb825cfd5ccdf8d39e419408.zip |
353100: warning demoted to debug info
Diffstat (limited to 'loadtime')
-rw-r--r-- | loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java index cf3229035..f407a19f5 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java @@ -89,7 +89,7 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { private StringBuffer namespace; private IWeavingContext weavingContext; - private List concreteAspects = new ArrayList(); + private List<ConcreteAspectCodeGen> concreteAspects = new ArrayList<ConcreteAspectCodeGen>(); private static Trace trace = TraceFactory.getTraceFactory().getTrace(ClassLoaderWeavingAdaptor.class); @@ -263,7 +263,7 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { definitions.add(DocumentParser.parse(xml)); seenBefore.add(xml); } else { - warn("ignoring duplicate definition: " + xml); + debug("ignoring duplicate definition: " + xml); } } } @@ -319,10 +319,9 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { * @param loader * @param definitions */ - private void registerOptions(final BcelWeaver weaver, final ClassLoader loader, final List definitions) { + private void registerOptions(final BcelWeaver weaver, final ClassLoader loader, final List<Definition> definitions) { StringBuffer allOptions = new StringBuffer(); - for (Iterator iterator = definitions.iterator(); iterator.hasNext();) { - Definition definition = (Definition) iterator.next(); + for (Definition definition : definitions) { allOptions.append(definition.getWeaverOptions()).append(' '); } @@ -537,8 +536,7 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { } boolean success = true; - for (Iterator iterator = concreteAspects.iterator(); iterator.hasNext();) { - ConcreteAspectCodeGen gen = (ConcreteAspectCodeGen) iterator.next(); + for (ConcreteAspectCodeGen gen : concreteAspects) { String name = gen.getClassName(); byte[] bytes = gen.getBytes(); @@ -565,13 +563,12 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { * @param loader * @param definitions */ - private void registerIncludeExclude(final BcelWeaver weaver, final ClassLoader loader, final List definitions) { + private void registerIncludeExclude(final BcelWeaver weaver, final ClassLoader loader, final List<Definition> definitions) { String fastMatchInfo = null; - for (Iterator iterator = definitions.iterator(); iterator.hasNext();) { - Definition definition = (Definition) iterator.next(); - for (Iterator iterator1 = definition.getIncludePatterns().iterator(); iterator1.hasNext();) { + for (Definition definition : definitions) { + for (Iterator<String> iterator1 = definition.getIncludePatterns().iterator(); iterator1.hasNext();) { hasIncludes = true; - String include = (String) iterator1.next(); + String include = iterator1.next(); fastMatchInfo = looksLikeStartsWith(include); if (fastMatchInfo != null) { m_includeStartsWith.add(fastMatchInfo); @@ -584,9 +581,9 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { includeTypePattern.add(includePattern); } } - for (Iterator iterator1 = definition.getExcludePatterns().iterator(); iterator1.hasNext();) { + for (Iterator<String> iterator1 = definition.getExcludePatterns().iterator(); iterator1.hasNext();) { hasExcludes = true; - String exclude = (String) iterator1.next(); + String exclude = iterator1.next(); fastMatchInfo = looksLikeStartsWith(exclude); if (fastMatchInfo != null) { excludeStartsWith.add(fastMatchInfo); @@ -706,11 +703,10 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { * @param loader * @param definitions */ - private void registerDump(final BcelWeaver weaver, final ClassLoader loader, final List definitions) { - for (Iterator iterator = definitions.iterator(); iterator.hasNext();) { - Definition definition = (Definition) iterator.next(); - for (Iterator iterator1 = definition.getDumpPatterns().iterator(); iterator1.hasNext();) { - String dump = (String) iterator1.next(); + private void registerDump(final BcelWeaver weaver, final ClassLoader loader, final List<Definition> definitions) { + for (Definition definition : definitions) { + for (Iterator<String> iterator1 = definition.getDumpPatterns().iterator(); iterator1.hasNext();) { + String dump = iterator1.next(); TypePattern pattern = new PatternParser(dump).parseTypePattern(); m_dumpTypePattern.add(pattern); } |