aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java18
-rw-r--r--tests/bugs152/pr136258/StatisticsTypeImpl.java14
-rw-r--r--tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java3
-rw-r--r--tests/src/org/aspectj/systemtest/ajc152/ajc152.xml5
4 files changed, 30 insertions, 10 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
index e562f3538..8b54db3dc 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
@@ -298,14 +298,14 @@ public class AjLookupEnvironment extends LookupEnvironment implements AnonymousC
public void doSupertypesFirst(ReferenceBinding rb,Collection yetToProcess) {
if (rb instanceof SourceTypeBinding) {
if (yetToProcess.contains(rb)) {
- collectAllITDsAndDeclares((SourceTypeBinding)rb, yetToProcess);
+ collectAllITDsAndDeclares((SourceTypeBinding)rb, yetToProcess);
}
} else if (rb instanceof ParameterizedTypeBinding) {
// If its a PTB we need to pull the SourceTypeBinding out of it.
- ParameterizedTypeBinding ptb = (ParameterizedTypeBinding)rb;
- if (ptb.type instanceof SourceTypeBinding && yetToProcess.contains(ptb.type)) {
- collectAllITDsAndDeclares((SourceTypeBinding)ptb.type, yetToProcess);
- }
+ ParameterizedTypeBinding ptb = (ParameterizedTypeBinding)rb;
+ if (ptb.type instanceof SourceTypeBinding && yetToProcess.contains(ptb.type)) {
+ collectAllITDsAndDeclares((SourceTypeBinding)ptb.type, yetToProcess);
+ }
}
}
/**
@@ -316,8 +316,9 @@ public class AjLookupEnvironment extends LookupEnvironment implements AnonymousC
*/
private void collectAllITDsAndDeclares(SourceTypeBinding sourceType, Collection yetToProcess) {
// Look at the supertype first
- ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.COLLECTING_ITDS_AND_DECLARES, sourceType.sourceName);
-
+ //ContextToken tok = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.COLLECTING_ITDS_AND_DECLARES, sourceType.sourceName);
+
+ yetToProcess.remove(sourceType);
// look out our direct supertype
doSupertypesFirst(sourceType.superclass(),yetToProcess);
@@ -331,8 +332,7 @@ public class AjLookupEnvironment extends LookupEnvironment implements AnonymousC
buildInterTypeAndPerClause(sourceType.scope);
addCrosscuttingStructures(sourceType.scope);
- yetToProcess.remove(sourceType);
- CompilationAndWeavingContext.leavingPhase(tok);
+ //CompilationAndWeavingContext.leavingPhase(tok);
}
/**
diff --git a/tests/bugs152/pr136258/StatisticsTypeImpl.java b/tests/bugs152/pr136258/StatisticsTypeImpl.java
new file mode 100644
index 000000000..0837f4192
--- /dev/null
+++ b/tests/bugs152/pr136258/StatisticsTypeImpl.java
@@ -0,0 +1,14 @@
+interface StatisticsType {
+}
+
+public class StatisticsTypeImpl implements StatisticsType {
+ static class UIStatisticsType extends UofwStatisticsType {
+ };
+
+ public static void main(String argz[]) {
+ System.out.println(new UIStatisticsType().toString());
+ }
+}
+
+class UofwStatisticsType extends StatisticsTypeImpl {
+} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java
index 18baacb7e..06c11766c 100644
--- a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java
@@ -16,8 +16,9 @@ import junit.framework.Test;
import org.aspectj.testing.XMLBasedAjcTestCase;
public class Ajc152Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+
public void testAspectLibrariesAndASM_pr135001() { runTest("aspect libraries and asm");}
-
+ public void testStackOverflow_pr136258() { runTest("stack overflow");}
/////////////////////////////////////////
public static Test suite() {
diff --git a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml
index 75c8c07cf..f020e6dc6 100644
--- a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml
+++ b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml
@@ -15,4 +15,9 @@
</run>
</ajc-test>
+ <ajc-test dir="bugs152/pr136258" title="stack overflow">
+ <compile files="StatisticsTypeImpl.java" options="-1.5"/>
+ <run class="StatisticsTypeImpl"/>
+ </ajc-test>
+
</suite> \ No newline at end of file