]> source.dussan.org Git - aspectj.git/commitdiff
unused imports (only)
authorwisberg <wisberg>
Thu, 9 Jun 2005 15:57:10 +0000 (15:57 +0000)
committerwisberg <wisberg>
Thu, 9 Jun 2005 15:57:10 +0000 (15:57 +0000)
15 files changed:
ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java
ajdoc/src/org/aspectj/tools/ajdoc/JavadocRunner.java
ajdoc/testsrc/AjdocModuleTests.java
aspectj5rt/java5-src/org/aspectj/lang/reflect/AjType.java
org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjcTests.java
testing/newsrc/org/aspectj/testing/XMLBasedAjcTestCase.java
testing/src/org/aspectj/testing/xml/AjcSpecXmlReader.java
tests/src/org/aspectj/systemtest/AllTests.java
weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
weaver/src/org/aspectj/weaver/internal/tools/PointcutExpressionImpl.java
weaver/src/org/aspectj/weaver/patterns/IfPointcut.java
weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java

index 525e91e526d043e0443b74ed98316430a486f69f..30465bda27f18f84ec217b9ac2ab74d619d94a98 100644 (file)
@@ -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;
 
index 901af2949fa978e37457e4fa8904c3a4bb53f4c1..f2388da98b1ffddae65276c9943c6667c8e12a0b 100644 (file)
@@ -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
  */
index d829c78d8b3d97fdfc4c695665fd6d0414d9b364..40d99244a5c90c95bfc8fa96a54f11a33a011eb6 100644 (file)
@@ -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
index a468653d7005464678cdae73641808f5be4c4840..095db2172b9aedf2608f9212b8f3a1f78f33a5bb 100644 (file)
@@ -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
index b1b01884c19f80f1e6b3ca3ca180e6f0e7a6fea5..cb721c8412ce9838f4d62c18e2e9a348b6dd9487 100644 (file)
@@ -13,8 +13,6 @@
 
 package org.aspectj.tools.ajc;
 
-import java.io.File;
-
 import org.aspectj.testing.util.TestUtil;
 
 import junit.framework.Test;
index 7db54e00518eaef300be4851de6c812be08e16e6..22cb30338db5f5b9c7a19517b41d7206d26bf08b 100644 (file)
@@ -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
index 28912a02662b5d0b607680ca7ee9be7077153c94..8e13e5778a3d80c08d0320d4f2d19a6ccdd1a10b 100644 (file)
@@ -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;
         }
     }
 }
index ca01cd05c876059832b1c7ce91bf332a8bbce437..0ea78b169d5698c8fb6fcfde3f118a28c5db71ce 100644 (file)
@@ -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;
index d7ba55716920d30a8c2f5492c4bc235f816266e1..c242f729b2b77be132257f54649a7218e16b87e9 100644 (file)
@@ -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.
index 5ea3a527889d1cb11d0eb9da09d9450c2a4ab01b..baba1fc51a6945be902afbc7039b3925b113bebf 100644 (file)
@@ -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;
index 2180ca921da2d53adcc23d09373cae2cdaa221ac..16fa420a252b1d60db1f2189d771f889473c4611 100644 (file)
@@ -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;
index 0b67d4b55f8e2650c58755f860d8d179aec5e87b..ade0a191fe658a6017dc6aebd188ece3b0252911 100644 (file)
@@ -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;
index 8757cae3feb75d058cd7f9bc06b11dcba49f62c0..f1e7aa50f07f37407b5763341fd2fd53bfe4869f 100644 (file)
@@ -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;
index d6cf9fa84f05b95385dccc2c15a57468bfbdb94b..bebc5aa84c8a4ae1b7803ff2f134c6431a59ae12 100644 (file)
@@ -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;
index 2b80740c7ca684775f59e2c81111397e8b5e63de..2e76e562face019cdc8ee0a257827f795d98ec06 100644 (file)
@@ -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
  *