From: acolyer Date: Fri, 23 Jan 2004 12:34:27 +0000 (+0000) Subject: spring cleaning in advance of 1.2 enhancements: X-Git-Tag: v_preCompileLoopAlteration~75 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9ab17831f2b23aee6b57cbe2dceba1563fa4d08f;p=aspectj.git spring cleaning in advance of 1.2 enhancements: removed unused imports, local variables, and private methods (still there, just commented out). --- diff --git a/weaver/src/org/aspectj/weaver/AjcMemberMaker.java b/weaver/src/org/aspectj/weaver/AjcMemberMaker.java index 52d6d6144..f19776f05 100644 --- a/weaver/src/org/aspectj/weaver/AjcMemberMaker.java +++ b/weaver/src/org/aspectj/weaver/AjcMemberMaker.java @@ -15,7 +15,7 @@ package org.aspectj.weaver; import java.lang.reflect.Modifier; -import org.aspectj.weaver.ResolvedTypeX.Name; +//import org.aspectj.weaver.ResolvedTypeX.Name; public class AjcMemberMaker { diff --git a/weaver/src/org/aspectj/weaver/ConcreteTypeMunger.java b/weaver/src/org/aspectj/weaver/ConcreteTypeMunger.java index d268f2fba..0ce029a55 100644 --- a/weaver/src/org/aspectj/weaver/ConcreteTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/ConcreteTypeMunger.java @@ -73,7 +73,7 @@ public abstract class ConcreteTypeMunger implements PartialOrder.PartialComparab } public int fallbackCompareTo(Object other) { - ConcreteTypeMunger o = (ConcreteTypeMunger) other; +// ConcreteTypeMunger o = (ConcreteTypeMunger) other; return 0; } diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java index 0ffdfc6be..081d9f634 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java @@ -1539,7 +1539,7 @@ public class BcelShadow extends Shadow { InstructionList closureInstantiation = makeClosureInstantiation(constructorSig, closureHolder); - LazyMethodGen constructor = + /*LazyMethodGen constructor = */ makeClosureClassAndReturnConstructor( closureClassName, callbackMethod, diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java index 36ad5acb1..c3fdb2f6a 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java @@ -571,7 +571,7 @@ public class BcelTypeMunger extends ConcreteTypeMunger { } private boolean mungeNewField(BcelClassWeaver weaver, NewFieldTypeMunger munger) { - ResolvedMember initMethod = munger.getInitMethod(aspectType); + /*ResolvedMember initMethod = */munger.getInitMethod(aspectType); LazyClassGen gen = weaver.getLazyClassGen(); ResolvedMember field = munger.getSignature(); diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java index 0d8dff563..3d7611d73 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java @@ -468,7 +468,7 @@ public class BcelWeaver implements IWeaver { return null; } - JavaClass javaClass = classType.getJavaClass(); +// JavaClass javaClass = classType.getJavaClass(); List shadowMungers = fastMatch(shadowMungerList, classType.getResolvedTypeX()); List typeMungers = classType.getResolvedTypeX().getInterTypeMungers(); diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java index 7c409238b..6a37aee39 100644 --- a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java +++ b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java @@ -529,8 +529,8 @@ public final class LazyClassGen { new ObjectType("org.aspectj.lang.JoinPoint$StaticPart"); private static final ObjectType sigType = new ObjectType("org.aspectj.lang.Signature"); - private static final ObjectType slType = - new ObjectType("org.aspectj.lang.reflect.SourceLocation"); +// private static final ObjectType slType = +// new ObjectType("org.aspectj.lang.reflect.SourceLocation"); private static final ObjectType factoryType = new ObjectType("org.aspectj.runtime.reflect.Factory"); private static final ObjectType classType = diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/PatternWeaveTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/PatternWeaveTestCase.java index 4cea61148..db9248c84 100644 --- a/weaver/testsrc/org/aspectj/weaver/bcel/PatternWeaveTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/bcel/PatternWeaveTestCase.java @@ -70,9 +70,9 @@ public class PatternWeaveTestCase extends WeaveTestCase { checkPointcut("get(* java.lang.System.out)", getOutHello, getOutHello); } - private Pointcut makePointcut(String s) { - return new PatternParser(s).parsePointcut(); - } +// private Pointcut makePointcut(String s) { +// return new PatternParser(s).parsePointcut(); +// } private void checkPointcut(String pointcutSource, String[] expectedHelloShadows, String[] expectedFancyShadows) throws IOException diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/WorldTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/WorldTestCase.java index 428bdce9c..7fe8f84c9 100644 --- a/weaver/testsrc/org/aspectj/weaver/bcel/WorldTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/bcel/WorldTestCase.java @@ -38,7 +38,7 @@ public class WorldTestCase extends AbstractWorldTestCase { ResolvedTypeX trace = world.resolve(TypeX.forName("Trace")); fieldsTest(trace, Member.NONE); - Member constr = Member.methodFromString("void Trace.()"); + /*Member constr = */Member.methodFromString("void Trace.()"); //XXX need attribute fix - //methodsTest(trace, new Member[] { constr }); diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/ThisOrTargetTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/ThisOrTargetTestCase.java index d33d42daa..da8f3eecb 100644 --- a/weaver/testsrc/org/aspectj/weaver/patterns/ThisOrTargetTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/patterns/ThisOrTargetTestCase.java @@ -47,14 +47,14 @@ public class ThisOrTargetTestCase extends TestCase { } - private Pointcut makePointcut(String pattern) { - return new PatternParser(pattern).parsePointcut(); - } +// private Pointcut makePointcut(String pattern) { +// return new PatternParser(pattern).parsePointcut(); +// } - private void checkEquals(String pattern, Pointcut p) throws IOException { - assertEquals(pattern, p, makePointcut(pattern)); - checkSerialization(pattern); - } +// private void checkEquals(String pattern, Pointcut p) throws IOException { +// assertEquals(pattern, p, makePointcut(pattern)); +// checkSerialization(pattern); +// } // private void checkMatch(Pointcut p, Signature[] matches, boolean shouldMatch) { @@ -83,18 +83,18 @@ public class ThisOrTargetTestCase extends TestCase { * Method checkSerialization. * @param string */ - private void checkSerialization(String string) throws IOException { - Pointcut p = makePointcut(string); - ByteArrayOutputStream bo = new ByteArrayOutputStream(); - DataOutputStream out = new DataOutputStream(bo); - p.write(out); - out.close(); - - ByteArrayInputStream bi = new ByteArrayInputStream(bo.toByteArray()); - DataInputStream in = new DataInputStream(bi); - Pointcut newP = Pointcut.read(in, null); - - assertEquals("write/read", p, newP); - } +// private void checkSerialization(String string) throws IOException { +// Pointcut p = makePointcut(string); +// ByteArrayOutputStream bo = new ByteArrayOutputStream(); +// DataOutputStream out = new DataOutputStream(bo); +// p.write(out); +// out.close(); +// +// ByteArrayInputStream bi = new ByteArrayInputStream(bo.toByteArray()); +// DataInputStream in = new DataInputStream(bi); +// Pointcut newP = Pointcut.read(in, null); +// +// assertEquals("write/read", p, newP); +// } } diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternTestCase.java index 6d7ee2185..67615d944 100644 --- a/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternTestCase.java @@ -206,7 +206,7 @@ public class TypePatternTestCase extends TestCase { try { TypePattern p = makeTypePattern(pattern); ResolvedTypeX type = world.resolve(name); - FuzzyBoolean result = p.matchesInstanceof(type); + /*FuzzyBoolean result = */p.matchesInstanceof(type); } catch (AbortException e) { return; }