From: aclement Date: Fri, 9 Dec 2005 10:52:15 +0000 (+0000) Subject: Some updates for 118754. The various places that were checking for 'MISSING' now... X-Git-Tag: V1_5_0RC1~37 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0c8c0a3d21365eade6f53a0484bba71f24637a65;p=aspectj.git Some updates for 118754. The various places that were checking for 'MISSING' now call 'isMissing' if they can. I think this negates some work Adrian did with introducing MissingWithKnownSignature - but we have to make this change for LTW to work properly. Someone with a bit of time on their hands should go through all the places isMissing() is now called and see if the check should be 'isReallyMissing()' which would allow the MissingWithKnownSignature to get through. I will raise an enhancement to cover this. --- diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java b/loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java index 897e17f52..ff1ea65cf 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java @@ -125,7 +125,7 @@ public class ConcreteAspectCodeGen { m_parent = m_world.resolve(m_concreteAspect.extend, true); // handle inner classes - if (m_parent.equals(ResolvedType.MISSING)) { + if (m_parent.isMissing()) { // fallback on inner class lookup mechanism String fixedName = m_concreteAspect.extend; int hasDot = fixedName.lastIndexOf('.'); @@ -135,7 +135,7 @@ public class ConcreteAspectCodeGen { fixedName = new String(fixedNameChars); hasDot = fixedName.lastIndexOf('.'); m_parent = m_world.resolve(UnresolvedType.forName(fixedName), true); - if (!m_parent.equals(ResolvedType.MISSING)) { + if (!m_parent.isMissing()) { break; } } diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java index 9df8b0382..35eb97dfb 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java @@ -253,7 +253,7 @@ public class EclipseFactory { String baseTypeSignature = null; ResolvedType baseType = getWorld().resolve(UnresolvedType.forName(getName(binding)),true); - if (baseType != ResolvedType.MISSING) { + if (!baseType.isMissing()) { // can legitimately be missing if a bound refers to a type we haven't added to the world yet... if (!baseType.isGenericType() && arguments!=null) baseType = baseType.getGenericType(); baseTypeSignature = baseType.getErasureSignature(); @@ -966,7 +966,7 @@ public class EclipseFactory { UnresolvedType complexTx = fromBinding(binding); // fully aware of any generics info ResolvedType cName = world.resolve(complexTx,true); ReferenceType complexName = null; - if (cName != ResolvedType.MISSING) { + if (!cName.isMissing()) { complexName = (ReferenceType) cName; complexName = (ReferenceType) complexName.getGenericType(); if (complexName == null) complexName = new ReferenceType(complexTx,world); diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java index 8dab02aec..e62a4a05b 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java @@ -314,7 +314,7 @@ public class AsmElementFormatter { String label; UnresolvedType typeX = tp.getExactType(); - if (typeX != ResolvedType.MISSING) { + if (!ResolvedType.isMissing(typeX)) { label = typeX.getName(); if (tp.isIncludeSubtypes()) label += "+"; } else { diff --git a/tests/java5/ataspectj/ajc-ant.xml b/tests/java5/ataspectj/ajc-ant.xml index 5c4495be4..695e8ac07 100644 --- a/tests/java5/ataspectj/ajc-ant.xml +++ b/tests/java5/ataspectj/ajc-ant.xml @@ -60,6 +60,14 @@ + + + + + + + + diff --git a/tests/java5/ataspectj/ataspectj/Test$$EnhancerByCGLIB$$12345.java b/tests/java5/ataspectj/ataspectj/Test$$EnhancerByCGLIB$$12345.java new file mode 100644 index 000000000..78df5f1b1 --- /dev/null +++ b/tests/java5/ataspectj/ataspectj/Test$$EnhancerByCGLIB$$12345.java @@ -0,0 +1,19 @@ +/******************************************************************************* + * Copyright (c) 2005 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * Matthew Webster - initial implementation + *******************************************************************************/ +package ataspectj; + +public class Test$$EnhancerByCGLIB$$12345 { + + public static void main(String[] args) { + System.out.println("Test$$EnhancerByCGLIB$$12345.main()"); + } + +} diff --git a/tests/java5/ataspectj/ataspectj/TestInterface.java b/tests/java5/ataspectj/ataspectj/TestInterface.java new file mode 100644 index 000000000..beac1461b --- /dev/null +++ b/tests/java5/ataspectj/ataspectj/TestInterface.java @@ -0,0 +1,16 @@ +/******************************************************************************* + * Copyright (c) 2005 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * Matthew Webster - initial implementation + *******************************************************************************/ +package ataspectj; + +public interface TestInterface { + + public void testMethod (); +} diff --git a/tests/java5/ataspectj/ataspectj/TestProxyGenerator.java b/tests/java5/ataspectj/ataspectj/TestProxyGenerator.java new file mode 100644 index 000000000..1dc0e9aac --- /dev/null +++ b/tests/java5/ataspectj/ataspectj/TestProxyGenerator.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 2005 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * Matthew Webster - initial implementation + *******************************************************************************/ +package ataspectj; + +import java.lang.reflect.Proxy; + +public class TestProxyGenerator implements TestInterface { + + public void testMethod() { + } + + public static void main(String[] args) { + Class clazz = TestProxyGenerator.class; + Class proxyClazz = Proxy.getProxyClass(clazz.getClassLoader(),new Class[] { TestInterface.class}); + System.out.println("TestProxyGenerator.main() proxyClazz=" + proxyClazz + ", proxyClassLoader=" + proxyClazz.getClassLoader()); + } + +} diff --git a/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml b/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml index c2824e2be..487d5dd62 100644 --- a/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml +++ b/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml @@ -1,6 +1,6 @@ - - + + diff --git a/tests/java5/ataspectj/ataspectj/aop-dumpclosure.xml b/tests/java5/ataspectj/ataspectj/aop-dumpclosure.xml index d73c1c23b..fdee559eb 100644 --- a/tests/java5/ataspectj/ataspectj/aop-dumpclosure.xml +++ b/tests/java5/ataspectj/ataspectj/aop-dumpclosure.xml @@ -4,6 +4,9 @@ - + + diff --git a/tests/java5/ataspectj/ataspectj/aop-dumpproxy.xml b/tests/java5/ataspectj/ataspectj/aop-dumpproxy.xml new file mode 100644 index 000000000..1a76c0152 --- /dev/null +++ b/tests/java5/ataspectj/ataspectj/aop-dumpproxy.xml @@ -0,0 +1,9 @@ + + + + + + + diff --git a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java index 5db988b07..2d27cb8e1 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java @@ -11,12 +11,13 @@ *******************************************************************************/ package org.aspectj.systemtest.ajc150.ataspectj; -import org.aspectj.testing.XMLBasedAjcTestCase; -import org.aspectj.util.FileUtil; +import java.io.File; +import java.io.FilenameFilter; import junit.framework.Test; -import java.io.File; +import org.aspectj.testing.XMLBasedAjcTestCase; +import org.aspectj.util.FileUtil; /** * @author Alexandre Vasseur @@ -97,11 +98,9 @@ public class AtAjLTWTests extends XMLBasedAjcTestCase { public void testLTWDumpBeforeAndAfter() { runTest("LTW DumpTest before and after"); - File f = new File("_ajdump/ataspectj/DumpTest.class"); - assertFalse(f.exists()); - f = new File("_ajdump/_before/ataspectj/DumpTestTheDump.class"); + File f = new File("_ajdump/_before/ataspectj/Test$$EnhancerByCGLIB$$12345.class"); assertTrue(f.exists()); - f = new File("_ajdump/ataspectj/DumpTestTheDump.class"); + f = new File("_ajdump/ataspectj/Test$$EnhancerByCGLIB$$12345.class"); assertTrue(f.exists()); // tidy up... @@ -110,23 +109,39 @@ public class AtAjLTWTests extends XMLBasedAjcTestCase { f.delete(); } - /* FIXME maw currently can't dump closures because the logic in - * ClassLoaderWeavingAdaptor.shouldDump() relies on the World being - * able to resolve the name which it can't for closures. - */ -// public void testLTWDumpClosure() { -// runTest("LTW DumpTest closure"); -// -// File f = new File("_ajdump/_before/ataspectj/DumpTestTheDump$AjcClosure1.class"); -// assertTrue(f.exists()); -// f = new File("_ajdump/ataspectj/DumpTestTheDump$AjcClosure1.class"); -// assertTrue(f.exists()); -// -// // tidy up... -// f = new File("_ajdump"); -// FileUtil.deleteContents(f); -// f.delete(); -// } + public void testLTWDumpClosure() { + runTest("LTW DumpTest closure"); + + File f = new File("_ajdump/ataspectj/DumpTestTheDump$AjcClosure1.class"); + assertTrue("Missing dump file " + f.getAbsolutePath(),f.exists()); + + // tidy up... + f = new File("_ajdump"); + FileUtil.deleteContents(f); + f.delete(); + } + + public void testLTWDumpProxy() { + runTest("LTW DumpTest proxy"); + + // 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"); + System.out.println("AtAjLTWTests.testLTWDumpProxy() f=" + f.getAbsolutePath()); + CountingFilenameFilter cff = new CountingFilenameFilter(); + f.listFiles(cff); + assertEquals("Expected dump file in " + f.getAbsolutePath(),1,cff.getCount()); + f = new File(dir,"_ajdump"); + System.out.println("AtAjLTWTests.testLTWDumpProxy() f=" + f.getAbsolutePath()); + cff = new CountingFilenameFilter(); + f.listFiles(cff); + assertEquals(1,cff.getCount()); + + // tidy up... + f = new File(dir,"_ajdump"); + FileUtil.deleteContents(f); + f.delete(); + } public void testAjcAspect1LTWAspect2_Xreweavable() { runTest("Ajc Aspect1 LTW Aspect2 -Xreweavable"); @@ -185,4 +200,17 @@ public class AtAjLTWTests extends XMLBasedAjcTestCase { runTest("AppContainer"); } + private static class CountingFilenameFilter implements FilenameFilter { + + private int count; + + public boolean accept(File dir, String name) { + if (name.endsWith(".class")) count++; + return false; + } + + public int getCount() { + return count; + } + } } diff --git a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml index 1510598fb..f4ac1a7bb 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml @@ -95,9 +95,9 @@ - + @@ -107,6 +107,13 @@ + + + + + 0) { if (!namePatterns[0].matches(otherType.getName())) return false; } @@ -703,7 +703,7 @@ public class WildTypePattern extends TypePattern { private UnresolvedType lookupTypeInScope(IScope scope, String typeName, IHasPosition location) { UnresolvedType type = null; - while ((type = scope.lookupType(typeName, location)) == ResolvedType.MISSING) { + while (ResolvedType.isMissing(type = scope.lookupType(typeName, location))) { int lastDot = typeName.lastIndexOf('.'); if (lastDot == -1) break; typeName = typeName.substring(0, lastDot) + '$' + typeName.substring(lastDot+1); @@ -713,7 +713,7 @@ public class WildTypePattern extends TypePattern { private ResolvedType lookupTypeInWorld(World world, String typeName) { ResolvedType ret = world.resolve(UnresolvedType.forName(typeName),true); - while (ret == ResolvedType.MISSING) { + while (ret.isMissing()) { int lastDot = typeName.lastIndexOf('.'); if (lastDot == -1) break; typeName = typeName.substring(0, lastDot) + '$' + typeName.substring(lastDot+1); @@ -744,8 +744,8 @@ public class WildTypePattern extends TypePattern { private TypePattern resolveGenericWildcard(IScope scope, UnresolvedType aType) { if (!aType.getSignature().equals(GENERIC_WILDCARD_CHARACTER)) throw new IllegalStateException("Can only have bounds for a generic wildcard"); boolean canBeExact = true; - if ((upperBound != null) && (upperBound.getExactType() == ResolvedType.MISSING)) canBeExact = false; - if ((lowerBound != null) && (lowerBound.getExactType() == ResolvedType.MISSING)) canBeExact = false; + if ((upperBound != null) && ResolvedType.isMissing(upperBound.getExactType())) canBeExact = false; + if ((lowerBound != null) && ResolvedType.isMissing(lowerBound.getExactType())) canBeExact = false; if (canBeExact) { ResolvedType type = null; if (upperBound != null) { @@ -813,7 +813,7 @@ public class WildTypePattern extends TypePattern { return NO; } else if (scope.getWorld().getLint().invalidAbsoluteTypeName.isEnabled()) { // Only put the lint warning out if we can't find it in the world - if (typeFoundInWholeWorldSearch == ResolvedType.MISSING) { + if (typeFoundInWholeWorldSearch.isMissing()) { scope.getWorld().getLint().invalidAbsoluteTypeName.signal(nameWeLookedFor, getSourceLocation()); } } @@ -854,11 +854,11 @@ public class WildTypePattern extends TypePattern { } else { // we have to set bounds on the TypeVariable held by tvrType before resolving it boolean canCreateExactTypePattern = true; - if (upperBound != null && upperBound.getExactType() == ResolvedType.MISSING) canCreateExactTypePattern = false; - if (lowerBound != null && lowerBound.getExactType() == ResolvedType.MISSING) canCreateExactTypePattern = false; + if (upperBound != null && ResolvedType.isMissing(upperBound.getExactType())) canCreateExactTypePattern = false; + if (lowerBound != null && ResolvedType.isMissing(lowerBound.getExactType())) canCreateExactTypePattern = false; if (additionalInterfaceBounds != null) { for (int i = 0; i < additionalInterfaceBounds.length; i++) { - if (additionalInterfaceBounds[i].getExactType() == ResolvedType.MISSING) canCreateExactTypePattern = false; + if (ResolvedType.isMissing(additionalInterfaceBounds[i].getExactType())) canCreateExactTypePattern = false; } } if (canCreateExactTypePattern) { diff --git a/weaver/src/org/aspectj/weaver/patterns/WithinAnnotationPointcut.java b/weaver/src/org/aspectj/weaver/patterns/WithinAnnotationPointcut.java index 1e849f8ab..5996464d7 100644 --- a/weaver/src/org/aspectj/weaver/patterns/WithinAnnotationPointcut.java +++ b/weaver/src/org/aspectj/weaver/patterns/WithinAnnotationPointcut.java @@ -87,7 +87,7 @@ public class WithinAnnotationPointcut extends NameBindingPointcut { */ protected FuzzyBoolean matchInternal(Shadow shadow) { ResolvedType enclosingType = shadow.getIWorld().resolve(shadow.getEnclosingType(),true); - if (enclosingType == ResolvedType.MISSING) { + if (enclosingType.isMissing()) { shadow.getIWorld().getLint().cantFindType.signal( new String[] {WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE_WITHINPCD, shadow.getEnclosingType().getName())}, diff --git a/weaver/src/org/aspectj/weaver/patterns/WithinPointcut.java b/weaver/src/org/aspectj/weaver/patterns/WithinPointcut.java index 381bf6eba..5e893256a 100644 --- a/weaver/src/org/aspectj/weaver/patterns/WithinPointcut.java +++ b/weaver/src/org/aspectj/weaver/patterns/WithinPointcut.java @@ -71,7 +71,7 @@ public class WithinPointcut extends Pointcut { protected FuzzyBoolean matchInternal(Shadow shadow) { ResolvedType enclosingType = shadow.getIWorld().resolve(shadow.getEnclosingType(),true); - if (enclosingType == ResolvedType.MISSING) { + if (enclosingType.isMissing()) { shadow.getIWorld().getLint().cantFindType.signal( new String[] {WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE_WITHINPCD, shadow.getEnclosingType().getName())}, diff --git a/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java b/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java index 3aeaa7f70..6b62365e8 100644 --- a/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java +++ b/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java @@ -361,6 +361,7 @@ public class WeavingAdaptor { dir.mkdirs(); String fileName = dirName + File.separator + className + ".class"; try { +// System.out.println("WeavingAdaptor.dump() fileName=" + new File(fileName).getAbsolutePath()); FileOutputStream os = new FileOutputStream(fileName); os.write(b); os.close(); diff --git a/weaver/testsrc/org/aspectj/weaver/AbstractWorldTestCase.java b/weaver/testsrc/org/aspectj/weaver/AbstractWorldTestCase.java index 306cc1da4..8a8ff8302 100644 --- a/weaver/testsrc/org/aspectj/weaver/AbstractWorldTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/AbstractWorldTestCase.java @@ -78,7 +78,7 @@ public abstract class AbstractWorldTestCase extends TestCase { ResolvedType[] primitives = getWorld().resolve(primitiveTypeXs); UnresolvedType tx = UnresolvedType.forSignature(sig); ResolvedType ty = getWorld().resolve(tx,true); - assertTrue("Couldnt find type "+tx,ty!=ResolvedType.MISSING); + assertTrue("Couldnt find type "+tx,!ty.isMissing()); ResolvedType[] lowerTyArray = getWorld().resolve(UnresolvedType.forSignatures(lowers)); List lowerTys = new ArrayList(Arrays.asList(lowerTyArray)); @@ -103,7 +103,7 @@ public abstract class AbstractWorldTestCase extends TestCase { ResolvedType ty = primitives[i]; UnresolvedType tx = UnresolvedType.forSignature("["+ty.getSignature()); ResolvedType aty = getWorld().resolve(tx,true); - assertTrue("Couldnt find type "+tx,aty!=ResolvedType.MISSING); + assertTrue("Couldnt find type "+tx,!aty.isMissing()); modifiersTest(aty, Modifier.PUBLIC | Modifier.FINAL); fieldsTest(aty, ResolvedMember.NONE); methodsTest(aty, ResolvedMember.NONE); @@ -121,7 +121,7 @@ public abstract class AbstractWorldTestCase extends TestCase { isCoerceableFromTest(aty, ty1, false); tx = UnresolvedType.forSignature("[" + ty1.getSignature()); ResolvedType aty1 = getWorld().resolve(tx,true); - assertTrue("Couldnt find type "+tx,aty1!=ResolvedType.MISSING); + assertTrue("Couldnt find type "+tx,!aty1.isMissing()); if (ty.equals(ty1)) { isCoerceableFromTest(aty, aty1, true); isAssignableFromTest(aty, aty1, true); diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/ArgsWeaveTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/ArgsWeaveTestCase.java index 722e4a83c..abb5e8bc2 100644 --- a/weaver/testsrc/org/aspectj/weaver/bcel/ArgsWeaveTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/bcel/ArgsWeaveTestCase.java @@ -101,7 +101,7 @@ public class ArgsWeaveTestCase extends WeaveTestCase { private BcelAdvice makeArgsMunger(final String kindx) { ResolvedType rtx = world.resolve(UnresolvedType.forName("Aspect"),true); - assertTrue("Cant find required type Aspect",rtx!=ResolvedType.MISSING); + assertTrue("Cant find required type Aspect",!rtx.isMissing()); return new BcelAdvice(AdviceKind.stringToKind(kindx), makePointcutNoZeroArg(), MemberImpl.method(UnresolvedType.forName("Aspect"), 0, "foo", "()V"), 0, -1, -1, null, rtx) { diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/TjpWeaveTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/TjpWeaveTestCase.java index a028f9a98..6dc75c4e7 100644 --- a/weaver/testsrc/org/aspectj/weaver/bcel/TjpWeaveTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/bcel/TjpWeaveTestCase.java @@ -76,7 +76,7 @@ public class TjpWeaveTestCase extends WeaveTestCase { public void testAround2Tjp() throws IOException { ResolvedType rtx = world.resolve(UnresolvedType.forName("Aspect"),true); - assertTrue("Couldnt find type Aspect",rtx!=ResolvedType.MISSING); + assertTrue("Couldnt find type Aspect",!rtx.isMissing()); BcelAdvice munger1 = new BcelAdvice( AdviceKind.stringToKind("around"), makePointcutAll(), diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/WorldTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/WorldTestCase.java index cb82a2f5f..6b6656634 100644 --- a/weaver/testsrc/org/aspectj/weaver/bcel/WorldTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/bcel/WorldTestCase.java @@ -36,7 +36,7 @@ public class WorldTestCase extends AbstractWorldTestCase { // XXX fix the various XXXs before expecting this test to work public void xtestTraceJar() { ResolvedType trace = world.resolve(UnresolvedType.forName("Trace"),true); - assertTrue("Couldnt find type Trace",trace!=ResolvedType.MISSING); + assertTrue("Couldnt find type Trace",!trace.isMissing()); fieldsTest(trace, Member.NONE); /*Member constr = */MemberImpl.methodFromString("void Trace.()"); //XXX need attribute fix - @@ -69,7 +69,7 @@ public class WorldTestCase extends AbstractWorldTestCase { }); ResolvedType myTrace = world.resolve(UnresolvedType.forName("MyTrace"),true); - assertTrue("Couldnt find type MyTrace",myTrace!=ResolvedType.MISSING); + assertTrue("Couldnt find type MyTrace",!myTrace.isMissing()); interfacesTest(myTrace, ResolvedType.NONE); superclassTest(myTrace, trace); diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/WildTypePatternResolutionTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/WildTypePatternResolutionTestCase.java index e9db3caa8..7f25ac1ac 100644 --- a/weaver/testsrc/org/aspectj/weaver/patterns/WildTypePatternResolutionTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/patterns/WildTypePatternResolutionTestCase.java @@ -122,11 +122,11 @@ import org.aspectj.weaver.bcel.BcelWorld; assertTrue("resolves to WildTypePattern",rtp instanceof WildTypePattern); assertTrue("one type parameter", rtp.typeParameters.size() == 1); - assertEquals("missing",ResolvedType.MISSING,rtp.getExactType()); + assertTrue("missing",ResolvedType.isMissing(rtp.getExactType())); WildTypePattern wtp = (WildTypePattern) writeAndRead(rtp); assertTrue("one type parameter", wtp.typeParameters.size() == 1); - assertEquals("missing",ResolvedType.MISSING,wtp.getExactType()); + assertTrue("missing",ResolvedType.isMissing(wtp.getExactType())); assertEquals("Str*",wtp.getTypeParameters().getTypePatterns()[0].toString()); assertFalse("does not match List",wtp.matches(javaUtilList, TypePattern.STATIC).alwaysTrue());