diff options
author | Andy Clement <aclement@gopivotal.com> | 2014-03-18 21:46:27 -0700 |
---|---|---|
committer | Andy Clement <aclement@gopivotal.com> | 2014-03-18 21:46:27 -0700 |
commit | bedb85ee870c2c0dad34d68662c83ff7033dd746 (patch) | |
tree | 543d944b19d25edabfc567b047c4d0c74a7335e2 | |
parent | f68fad1168cb96b6dd5402b4778a25e8b4d0acab (diff) | |
download | aspectj-bedb85ee870c2c0dad34d68662c83ff7033dd746.tar.gz aspectj-bedb85ee870c2c0dad34d68662c83ff7033dd746.zip |
Upgrade to JDT 1.8.0 compiler
-rw-r--r-- | loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java | 6 | ||||
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java | 4 | ||||
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/CompactTypeStructureRepresentation.java | 7 | ||||
-rw-r--r-- | org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip | bin | 4167575 -> 4376739 bytes | |||
-rw-r--r-- | org.eclipse.jdt.core/jdtcore-for-aspectj.jar | bin | 7533281 -> 8107837 bytes | |||
-rw-r--r-- | tests/java5/ataspectj/ataspectj/aop-dumpproxy.xml | 4 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java | 4 |
7 files changed, 16 insertions, 9 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java index 2aa6307d3..21a182157 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java @@ -53,7 +53,7 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { private boolean initialized; - private List m_dumpTypePattern = new ArrayList(); + private List<TypePattern> m_dumpTypePattern = new ArrayList<TypePattern>(); private boolean m_dumpBefore = false; private boolean dumpDirPerClassloader = false; @@ -931,8 +931,8 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { // TODO AV - optimize for className.startWith only ResolvedType classInfo = weaver.getWorld().resolve(UnresolvedType.forName(className), true); // dump - for (Iterator iterator = m_dumpTypePattern.iterator(); iterator.hasNext();) { - TypePattern typePattern = (TypePattern) iterator.next(); + for (Iterator<TypePattern> iterator = m_dumpTypePattern.iterator(); iterator.hasNext();) { + TypePattern typePattern = iterator.next(); if (typePattern.matchesStatically(classInfo)) { // dump match return true; diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java index 1692a6679..31d9d149a 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java @@ -737,12 +737,12 @@ public class AjProblemReporter extends ProblemReporter { } } - public void duplicateMethodInType(SourceTypeBinding type, AbstractMethodDeclaration methodDecl, boolean equalParameters, int severity) { + public void duplicateMethodInType(AbstractMethodDeclaration methodDecl, boolean equalParameters, int severity) { if (new String(methodDecl.selector).startsWith("ajc$interMethod")) { // this is an ITD clash and will be reported in another way by AspectJ (173602) return; } - super.duplicateMethodInType(type, methodDecl, equalParameters, severity); + super.duplicateMethodInType(methodDecl, equalParameters, severity); } // pr246393 - if we are going to complain about privileged, we clearly don't know what is going on, so don't diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/CompactTypeStructureRepresentation.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/CompactTypeStructureRepresentation.java index 3d8a4627a..6770b647a 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/CompactTypeStructureRepresentation.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/CompactTypeStructureRepresentation.java @@ -18,6 +18,7 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryField; import org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryMethod; import org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryNestedType; import org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryType; +import org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryTypeAnnotation; /** * Used to determine if a type has structurally changed during incremental compilation. At the end of compilation we create one of @@ -54,6 +55,7 @@ public class CompactTypeStructureRepresentation implements IBinaryType { IBinaryMethod[] binMethods; IBinaryNestedType[] memberTypes; IBinaryAnnotation[] annotations; + IBinaryTypeAnnotation[] typeAnnotations; public CompactTypeStructureRepresentation(ClassFileReader cfr, boolean isAspect) { @@ -82,6 +84,7 @@ public class CompactTypeStructureRepresentation implements IBinaryType { // references and which were real declarations this.memberTypes = cfr.getMemberTypes(isAspect); this.annotations = cfr.getAnnotations(); + this.typeAnnotations = cfr.getTypeAnnotations(); this.sourceName = cfr.getSourceName(); this.className = cfr.getName(); // slashes... this.modifiers = cfr.getModifiers(); @@ -174,4 +177,8 @@ public class CompactTypeStructureRepresentation implements IBinaryType { return sourceName; } + public IBinaryTypeAnnotation[] getTypeAnnotations() { + return typeAnnotations; + } + }
\ No newline at end of file diff --git a/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip b/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip Binary files differindex 4dc475e26..f7bdf4c3e 100644 --- a/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip +++ b/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip diff --git a/org.eclipse.jdt.core/jdtcore-for-aspectj.jar b/org.eclipse.jdt.core/jdtcore-for-aspectj.jar Binary files differindex 8b35515fc..c29fcf5d4 100644 --- a/org.eclipse.jdt.core/jdtcore-for-aspectj.jar +++ b/org.eclipse.jdt.core/jdtcore-for-aspectj.jar diff --git a/tests/java5/ataspectj/ataspectj/aop-dumpproxy.xml b/tests/java5/ataspectj/ataspectj/aop-dumpproxy.xml index 2c8245798..3056ea28e 100644 --- a/tests/java5/ataspectj/ataspectj/aop-dumpproxy.xml +++ b/tests/java5/ataspectj/ataspectj/aop-dumpproxy.xml @@ -4,9 +4,9 @@ <aspect name="ataspectj.EmptyAspect"/> </aspects> <weaver> -<!-- <dump within="*..*Proxy*" beforeandafter="true"/> ---> +<!-- <dump within="*Proxy*" beforeandafter="true"/> +--> </weaver> </aspectj> diff --git a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java index 30332b4d7..e28d1af4e 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java @@ -132,11 +132,11 @@ public class AtAjLTWTests extends XMLBasedAjcTestCase { // The working directory is different because this test must be forked File dir = new File("../tests/java5/ataspectj"); - File f = new File(dir, "_ajdump/_before"); + File f = new File(dir, "_ajdump/_before/com/sun/proxy"); CountingFilenameFilter cff = new CountingFilenameFilter(".class"); f.listFiles(cff); assertEquals("Expected dump file in " + f.getAbsolutePath(), 1, cff.getCount()); - f = new File(dir, "_ajdump"); + f = new File(dir, "_ajdump/com/sun/proxy"); cff = new CountingFilenameFilter(".class"); f.listFiles(cff); assertEquals(1, cff.getCount()); |