From: aclement Date: Wed, 28 May 2008 23:54:05 +0000 (+0000) Subject: 231396: Comment #4: Big Refactoring X-Git-Tag: V1_6_1y~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=91109eab15f47311489b5028aea3f1fc056b1d41;p=aspectj.git 231396: Comment #4: Big Refactoring --- diff --git a/weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java b/weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java index c5f0b62f3..47f70c366 100644 --- a/weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java +++ b/weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java @@ -112,7 +112,7 @@ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder { // memory. try { JavaClass jc = bcelRepository.loadClass(onMember.getDeclaringClass()); - org.aspectj.apache.bcel.classfile.annotation.Annotation[] anns = new org.aspectj.apache.bcel.classfile.annotation.Annotation[0]; + org.aspectj.apache.bcel.classfile.annotation.AnnotationGen[] anns = new org.aspectj.apache.bcel.classfile.annotation.AnnotationGen[0]; if (onMember instanceof Method) { org.aspectj.apache.bcel.classfile.Method bcelMethod = jc.getMethod((Method)onMember); if (bcelMethod == null) { @@ -130,7 +130,8 @@ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder { } // the answer is cached and we don't want to hold on to memory bcelRepository.clear(); - if (anns == null) anns = new org.aspectj.apache.bcel.classfile.annotation.Annotation[0]; + // OPTIMIZE make constant 0 size array for sharing + if (anns == null) anns = new org.aspectj.apache.bcel.classfile.annotation.AnnotationGen[0]; // convert to our Annotation type for (int i=0;i annSet = new HashSet(); for (int i = 0; i < anns.length; i++) { @@ -225,7 +227,7 @@ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder { // memory. try { JavaClass jc = bcelRepository.loadClass(forClass); - org.aspectj.apache.bcel.classfile.annotation.Annotation[] anns =jc.getAnnotations(); + org.aspectj.apache.bcel.classfile.annotation.AnnotationGen[] anns =jc.getAnnotations(); bcelRepository.clear(); if (anns == null) return new ResolvedType[0]; ResolvedType[] ret = new ResolvedType[anns.length]; @@ -293,7 +295,7 @@ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder { // memory. try { JavaClass jc = bcelRepository.loadClass(onMember.getDeclaringClass()); - org.aspectj.apache.bcel.classfile.annotation.Annotation[][] anns = null; + org.aspectj.apache.bcel.classfile.annotation.AnnotationGen[][] anns = null; if (onMember instanceof Method) { org.aspectj.apache.bcel.classfile.Method bcelMethod = jc.getMethod((Method)onMember); if (bcelMethod == null) {