From: wisberg Date: Thu, 9 Jun 2005 15:57:10 +0000 (+0000) Subject: unused imports (only) X-Git-Tag: PRE_ANDY~176 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6b4238eb0f0871eae60d71fe596c96c2ae5dce76;p=aspectj.git unused imports (only) --- diff --git a/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java b/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java index 525e91e52..30465bda2 100644 --- a/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java +++ b/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java @@ -24,7 +24,6 @@ import java.util.Set; import org.aspectj.ajde.internal.CompilerAdapter; import org.aspectj.bridge.IMessage; -import org.aspectj.tools.ajc.AjcTestCase; import org.aspectj.util.FileUtil; import org.aspectj.util.LangUtil; diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/JavadocRunner.java b/ajdoc/src/org/aspectj/tools/ajdoc/JavadocRunner.java index 901af2949..f2388da98 100644 --- a/ajdoc/src/org/aspectj/tools/ajdoc/JavadocRunner.java +++ b/ajdoc/src/org/aspectj/tools/ajdoc/JavadocRunner.java @@ -17,8 +17,6 @@ package org.aspectj.tools.ajdoc; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import org.aspectj.util.LangUtil; - /** * @author Mik Kersten */ diff --git a/ajdoc/testsrc/AjdocModuleTests.java b/ajdoc/testsrc/AjdocModuleTests.java index d829c78d8..40d99244a 100644 --- a/ajdoc/testsrc/AjdocModuleTests.java +++ b/ajdoc/testsrc/AjdocModuleTests.java @@ -9,13 +9,11 @@ * Contributors: * Mik Kersten initial implementation * ******************************************************************/ -import java.io.File; import junit.framework.Test; import junit.framework.TestSuite; import org.aspectj.tools.ajdoc.AjdocTests; -import org.aspectj.util.FileUtil; /** * @author Mik Kersten diff --git a/aspectj5rt/java5-src/org/aspectj/lang/reflect/AjType.java b/aspectj5rt/java5-src/org/aspectj/lang/reflect/AjType.java index a468653d7..095db2172 100644 --- a/aspectj5rt/java5-src/org/aspectj/lang/reflect/AjType.java +++ b/aspectj5rt/java5-src/org/aspectj/lang/reflect/AjType.java @@ -17,7 +17,6 @@ import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; -import java.util.Set; /** * The runtime representation of a type (Aspect, Class, Interface, Annotation, Enum, or Array) in an AspectJ diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjcTests.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjcTests.java index b1b01884c..cb721c841 100644 --- a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjcTests.java +++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjcTests.java @@ -13,8 +13,6 @@ package org.aspectj.tools.ajc; -import java.io.File; - import org.aspectj.testing.util.TestUtil; import junit.framework.Test; diff --git a/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java b/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java index 7db54e005..22cb30338 100644 --- a/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java +++ b/testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java @@ -16,6 +16,7 @@ import java.io.FileInputStream; import java.io.InputStreamReader; import java.util.HashMap; import java.util.Map; +import java.util.Stack; import junit.extensions.TestSetup; import junit.framework.Test; @@ -39,6 +40,7 @@ public abstract class XMLBasedAjcTestCase extends AjcTestCase { private static Map testMap = new HashMap(); private static boolean suiteLoaded = false; private AjcTest currentTest = null; + private Stack clearTestAfterRun = new Stack(); public XMLBasedAjcTestCase() { } @@ -96,11 +98,20 @@ public abstract class XMLBasedAjcTestCase extends AjcTestCase { */ protected void runTest(String title) { currentTest = (AjcTest) testMap.get(title); + final boolean clearTest = clearTestAfterRun(); if (currentTest == null) { - fail("No test '" + title + "' in suite."); - } + if (clearTest) { + System.err.println("test already run: " + title); + return; + } else { + fail("No test '" + title + "' in suite."); + } + } ajc.setShouldEmptySandbox(true); currentTest.runTest(this); + if (clearTest) { + testMap.remove(title); + } } /** @@ -119,6 +130,25 @@ public abstract class XMLBasedAjcTestCase extends AjcTestCase { public void addTest(AjcTest test) { testMap.put(test.getTitle(),test); } + protected final void pushClearTestAfterRun(boolean val) { + clearTestAfterRun.push(val ? Boolean.FALSE: Boolean.TRUE); + } + protected final boolean popClearTestAfterRun() { + return clearTest(true); + } + protected final boolean clearTestAfterRun() { + return clearTest(false); + } + private boolean clearTest(boolean pop) { + if (clearTestAfterRun.isEmpty()) { + return false; + } + boolean result = ((Boolean) clearTestAfterRun.peek()).booleanValue(); + if (pop) { + clearTestAfterRun.pop(); + } + return result; + } /* * The rules for parsing a suite spec file. The Digester using bean properties to match attributes diff --git a/testing/src/org/aspectj/testing/xml/AjcSpecXmlReader.java b/testing/src/org/aspectj/testing/xml/AjcSpecXmlReader.java index 28912a026..8e13e5778 100644 --- a/testing/src/org/aspectj/testing/xml/AjcSpecXmlReader.java +++ b/testing/src/org/aspectj/testing/xml/AjcSpecXmlReader.java @@ -471,14 +471,17 @@ public class AjcSpecXmlReader { String publicId, String systemId) throws SAXException { + InputSource result = null; if ((null != systemId) && systemId.endsWith(NAME)) { String path = getPath(systemId); if (null != path) { - return new InputSource(path); + result = new InputSource(path); + result.setSystemId(path); + result.setPublicId(path); } } - return null; + return result; } } } diff --git a/tests/src/org/aspectj/systemtest/AllTests.java b/tests/src/org/aspectj/systemtest/AllTests.java index ca01cd05c..0ea78b169 100644 --- a/tests/src/org/aspectj/systemtest/AllTests.java +++ b/tests/src/org/aspectj/systemtest/AllTests.java @@ -13,7 +13,6 @@ import org.aspectj.systemtest.ajc10x.Ajc10xTests; import org.aspectj.systemtest.ajc11.Ajc11Tests; import org.aspectj.systemtest.ajc120.Ajc120Tests; import org.aspectj.systemtest.ajc121.Ajc121Tests; -import org.aspectj.systemtest.ajc150.AllTestsAspectJ150; import org.aspectj.systemtest.aspectpath.AspectPathTests; import org.aspectj.systemtest.base.BaseTests; import org.aspectj.systemtest.design.DesignTests; diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java b/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java index d7ba55716..c242f729b 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java @@ -21,7 +21,6 @@ import java.util.Collections; import org.aspectj.apache.bcel.generic.InstructionFactory; import org.aspectj.apache.bcel.generic.InstructionHandle; import org.aspectj.apache.bcel.generic.InstructionList; -import org.aspectj.apache.bcel.generic.ReferenceType; import org.aspectj.apache.bcel.generic.InstructionConstants; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.Message; @@ -37,15 +36,11 @@ import org.aspectj.weaver.Shadow; import org.aspectj.weaver.TypeX; import org.aspectj.weaver.WeaverMessages; import org.aspectj.weaver.World; -import org.aspectj.weaver.PerObjectInterfaceTypeMunger; import org.aspectj.weaver.ast.Literal; import org.aspectj.weaver.ast.Test; import org.aspectj.weaver.patterns.ExactTypePattern; import org.aspectj.weaver.patterns.ExposedState; import org.aspectj.weaver.patterns.Pointcut; -import org.aspectj.weaver.patterns.PerClause; -import org.aspectj.weaver.patterns.PerObject; -import org.aspectj.weaver.patterns.PerFromSuper; /** * Advice implemented for bcel. diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java index 5ea3a5278..baba1fc51 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java @@ -75,7 +75,6 @@ import org.aspectj.weaver.TypeX; import org.aspectj.weaver.WeaverMessages; import org.aspectj.weaver.WeaverMetrics; import org.aspectj.weaver.WeaverStateInfo; -import org.aspectj.weaver.PerObjectInterfaceTypeMunger; import org.aspectj.weaver.Shadow.Kind; import org.aspectj.weaver.patterns.DeclareAnnotation; import org.aspectj.weaver.patterns.FastMatchInfo; diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java index 2180ca921..16fa420a2 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java @@ -52,7 +52,6 @@ import org.aspectj.apache.bcel.generic.SWAP; import org.aspectj.apache.bcel.generic.StoreInstruction; import org.aspectj.apache.bcel.generic.TargetLostException; import org.aspectj.apache.bcel.generic.Type; -import org.aspectj.apache.bcel.generic.ReferenceType; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.ISourceLocation; import org.aspectj.bridge.Message; diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java index 0b67d4b55..ade0a191f 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java @@ -72,7 +72,6 @@ import org.aspectj.weaver.WeaverMessages; import org.aspectj.weaver.WeaverMetrics; import org.aspectj.weaver.WeaverStateInfo; import org.aspectj.weaver.World; -import org.aspectj.weaver.ResolvedMember; import org.aspectj.weaver.patterns.AndPointcut; import org.aspectj.weaver.patterns.BindingAnnotationTypePattern; import org.aspectj.weaver.patterns.BindingTypePattern; diff --git a/weaver/src/org/aspectj/weaver/internal/tools/PointcutExpressionImpl.java b/weaver/src/org/aspectj/weaver/internal/tools/PointcutExpressionImpl.java index 8757cae3f..f1e7aa50f 100644 --- a/weaver/src/org/aspectj/weaver/internal/tools/PointcutExpressionImpl.java +++ b/weaver/src/org/aspectj/weaver/internal/tools/PointcutExpressionImpl.java @@ -19,7 +19,6 @@ import org.aspectj.weaver.patterns.AbstractPatternNodeVisitor; import org.aspectj.weaver.patterns.ArgsAnnotationPointcut; import org.aspectj.weaver.patterns.ArgsPointcut; import org.aspectj.weaver.patterns.CflowPointcut; -import org.aspectj.weaver.patterns.FastMatchInfo; import org.aspectj.weaver.patterns.IfPointcut; import org.aspectj.weaver.patterns.NotAnnotationTypePattern; import org.aspectj.weaver.patterns.NotPointcut; diff --git a/weaver/src/org/aspectj/weaver/patterns/IfPointcut.java b/weaver/src/org/aspectj/weaver/patterns/IfPointcut.java index d6cf9fa84..bebc5aa84 100644 --- a/weaver/src/org/aspectj/weaver/patterns/IfPointcut.java +++ b/weaver/src/org/aspectj/weaver/patterns/IfPointcut.java @@ -35,7 +35,6 @@ import org.aspectj.weaver.VersionedDataInputStream; import org.aspectj.weaver.WeaverMessages; import org.aspectj.weaver.TypeX; import org.aspectj.weaver.AjcMemberMaker; -import org.aspectj.weaver.bcel.AtAjAttributes; import org.aspectj.weaver.ast.Expr; import org.aspectj.weaver.ast.Literal; import org.aspectj.weaver.ast.Test; diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java index 2b80740c7..2e76e562f 100644 --- a/weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java @@ -22,8 +22,6 @@ import org.aspectj.weaver.World; import org.aspectj.weaver.bcel.BcelShadow; import org.aspectj.weaver.bcel.BcelWorld; -import sun.reflect.generics.tree.TypeVariableSignature; - /** * @author hugunin *