summaryrefslogtreecommitdiffstats
path: root/weaver/testsrc/org
diff options
context:
space:
mode:
authoraclement <aclement>2005-07-21 10:13:00 +0000
committeraclement <aclement>2005-07-21 10:13:00 +0000
commit09a8a6b89a616d459e6a9851615f3a83c3f6356b (patch)
tree51f8cbf40cb06c8e39d89deaca83f2d2fa969089 /weaver/testsrc/org
parent314bd5f7977ebe80b65a27c2c4df56c7b2e77d24 (diff)
downloadaspectj-09a8a6b89a616d459e6a9851615f3a83c3f6356b.tar.gz
aspectj-09a8a6b89a616d459e6a9851615f3a83c3f6356b.zip
dont go looking for generic types pre 1.5
Diffstat (limited to 'weaver/testsrc/org')
-rw-r--r--weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java26
1 files changed, 15 insertions, 11 deletions
diff --git a/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java b/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java
index 432e441cb..ab702e6b5 100644
--- a/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java
@@ -16,6 +16,8 @@ package org.aspectj.weaver;
import junit.framework.TestCase;
import org.aspectj.testing.util.TestUtil;
+import org.aspectj.testingutil.UtilTests;
+import org.aspectj.util.LangUtil;
import org.aspectj.weaver.bcel.BcelWorld;
/**
@@ -106,17 +108,19 @@ public class TypeXTestCase extends TestCase {
}
public void testTypeXForParameterizedTypes() {
- World world = new BcelWorld();
- UnresolvedType stringType = UnresolvedType.forName("java/lang/String");
- ResolvedType listOfStringType =
- TypeFactory.createParameterizedType(
- UnresolvedType.forName("java/util/List").resolve(world),
- new UnresolvedType[] {stringType},
- world);
- assertEquals("1 type param",1,listOfStringType.typeParameters.length);
- assertEquals(stringType,listOfStringType.typeParameters[0]);
- assertTrue(listOfStringType.isParameterizedType());
- assertFalse(listOfStringType.isGenericType());
+ if (LangUtil.is15VMOrGreater()) { // no funny types pre 1.5
+ World world = new BcelWorld();
+ UnresolvedType stringType = UnresolvedType.forName("java/lang/String");
+ ResolvedType listOfStringType =
+ TypeFactory.createParameterizedType(
+ UnresolvedType.forName("java/util/List").resolve(world),
+ new UnresolvedType[] {stringType},
+ world);
+ assertEquals("1 type param",1,listOfStringType.typeParameters.length);
+ assertEquals(stringType,listOfStringType.typeParameters[0]);
+ assertTrue(listOfStringType.isParameterizedType());
+ assertFalse(listOfStringType.isGenericType());
+ }
}
private void checkTX(UnresolvedType tx,boolean shouldBeParameterized,int numberOfTypeParameters) {