@@ -175,7 +175,7 @@ | |||
<ajc-test dir="new" pr="248" | |||
title=", PR#249, PR#250 advice on constructor sites" | |||
keywords="from-resolved_10x"> | |||
<compile files="NewSiteAdvice.java"/> | |||
<compile files="NewSiteAdvice.java" options="-Xlint:ignore"/> | |||
<run class="NewSiteAdvice"/> | |||
</ajc-test> | |||
@@ -200,7 +200,7 @@ | |||
<ajc-test dir="new/extraThrows" pr="259" | |||
title="throws Exception clause is unnecessarily added to Driver.main method" | |||
keywords="from-resolved_10x"> | |||
<compile files="Driver.java"/> | |||
<compile files="Driver.java" options="-Xlint:ignore"/> | |||
<run class="Driver"/> | |||
</ajc-test> | |||
@@ -617,7 +617,7 @@ | |||
<ajc-test dir="new" pr="318" title="Handlers problem" | |||
keywords="from-resolved_10x"> | |||
<compile files="PR318.java"/> | |||
<compile files="PR318.java" options="-Xlint:ignore"/> | |||
<run class="PR318"/> | |||
</ajc-test> | |||
@@ -818,7 +818,7 @@ | |||
<ajc-test dir="new" title="Basic test for cflow pointcuts [eachcflow]" | |||
keywords="from-resolved_10x"> | |||
<compile files="CFlowPoints.java"/> | |||
<compile files="CFlowPoints.java" options="-Xlint:ignore"/> | |||
<run class="CFlowPoints"/> | |||
</ajc-test> | |||
@@ -852,7 +852,7 @@ | |||
<ajc-test dir="new" pr="114" | |||
title=", PR#115 checks the ordering of catch clauses" | |||
keywords="from-resolved_10x"> | |||
<compile files="OrderOfCatches.java"/> | |||
<compile files="OrderOfCatches.java" options="-Xlint:ignore"/> | |||
<run class="OrderOfCatches"/> | |||
</ajc-test> | |||
@@ -949,7 +949,7 @@ | |||
<ajc-test dir="new" | |||
title="exceptions thrown and caught in advice, particularly try+proceed" | |||
keywords="from-resolved_10x"> | |||
<compile files="TryAndProceed.java"/> | |||
<compile files="TryAndProceed.java" options="-Xlint:ignore"/> | |||
<run class="TryAndProceed"/> | |||
</ajc-test> | |||
@@ -1640,7 +1640,7 @@ | |||
<ajc-test dir="new/packageAccessPR556" pr="556" | |||
title="aspects should get package access outside the file" | |||
keywords="from-resolved_10rc3"> | |||
<compile files="base1/p/C1.java,base2/p/C2.java"/> | |||
<compile files="base1/p/C1.java,base2/p/C2.java" options="-Xlint:ignore"/> | |||
<run class="p.C1"/> | |||
</ajc-test> | |||
@@ -1731,7 +1731,7 @@ | |||
<ajc-test dir="new" | |||
title="changing this in around's proceed reported by Rich Price" | |||
keywords="from-resolved_104"> | |||
<compile files="AroundChangeThis.java" options="-1.4"/> | |||
<compile files="AroundChangeThis.java" options="-1.4 -Xlint:ignore"/> | |||
<run class="AroundChangeThis"/> | |||
</ajc-test> | |||
@@ -446,7 +446,7 @@ | |||
<ajc-test dir="bugs" pr="34925" | |||
title="declare soft and throw statements"> | |||
<compile files="ConvertToUnchecked.java"/> | |||
<compile files="ConvertToUnchecked.java" options="-Xlint:ignore"/> | |||
<run class="ConvertToUnchecked"/> | |||
</ajc-test> | |||
@@ -499,13 +499,13 @@ | |||
<ajc-test dir="bugs" pr="36564" | |||
title="Internal compiler error with thisJoinPoint.getStaticPart()"> | |||
<compile files="tjpStaticPart/Test.java,tjpStaticPart/Exceptions.java"/> | |||
<compile files="tjpStaticPart/Test.java,tjpStaticPart/Exceptions.java" options="-Xlint:ignore"/> | |||
<run class="tjpStaticPart.Test"/> | |||
</ajc-test> | |||
<ajc-test dir="bugs" pr="29665" | |||
title="Inconsistant stack height with around"> | |||
<compile files="StackError.java"/> | |||
<compile files="StackError.java" options="-Xlint:ignore"/> | |||
<run class="StackError"/> | |||
</ajc-test> | |||
@@ -109,7 +109,7 @@ | |||
<ajc-test dir="bugs" pr="44586" | |||
title="After throwing advice on ctors doesn't execute for inter-type decl field inits"> | |||
<compile files="AfterThrowingCtor.java"> | |||
<compile files="AfterThrowingCtor.java" options="-Xlint:ignore"> | |||
</compile> | |||
<run class="AfterThrowingCtor"/> | |||
</ajc-test> | |||
@@ -207,7 +207,7 @@ | |||
<ajc-test dir="bugs" pr="34206" | |||
title="before():execution(new(..)) does not throw NoAspectBoundException"> | |||
<compile files="ErroneousExceptionConversion1.java"> | |||
<compile files="ErroneousExceptionConversion1.java" options="-Xlint:ignore"> | |||
</compile> | |||
<run class="ErroneousExceptionConversion1"/> | |||
</ajc-test> |
@@ -348,6 +348,8 @@ | |||
<message kind="error" line="10" text="The method ancientJ() from the type AncientFoo is not visible"/> | |||
<message kind="error" line="11" text="The method clone() from the type Object is not visible"/> | |||
<message kind="error" line="12" text="Cannot make a static reference to the non-static method clone() from the type Object"/> | |||
<message kind="warning" line="14" text="Exception swallowed in catch block"/> | |||
<message kind="warning" line="29" text="Exception swallowed in catch block"/> | |||
</compile> | |||
</ajc-test> | |||
@@ -51,7 +51,9 @@ | |||
<message kind="warning" line="17" text="aa * *(..) throws Exception"/> | |||
<message kind="warning" line="37" text="aa call void m() throws Exception"/> | |||
<message kind="warning" line="38" text="aa call void m() throws Exception"/> | |||
</compile> | |||
<message kind="warning" line="37" text="Exception swallowed in catch block"/> | |||
<message kind="warning" line="38" text="Exception swallowed in catch block"/> | |||
</compile> | |||
<run class="pr119749"> | |||
<stdout> | |||
<line text="execution(void pr119749.C.m()): execMe[Me]"/> | |||
@@ -358,7 +360,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="java5/reflection" title="reflection on itds"> | |||
<compile files="InterTypeDeclarations.aj,ReflectOnCodeStyleITDs.java" options="-1.5"></compile> | |||
<compile files="InterTypeDeclarations.aj,ReflectOnCodeStyleITDs.java" options="-1.5 -Xlint:ignore"></compile> | |||
<run class="ReflectOnCodeStyleITDs" classpath="../lib/bcel/bcel.jar"> | |||
<stdout> | |||
<line text="public C.new(int, int, int)"/> | |||
@@ -392,7 +394,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="java5/reflection" title="reflection on @DeclareParents"> | |||
<compile files="AtAspectJDeclareParents.aj,ReflectOnAtAspectJDeclareParents.java" options="-1.5"></compile> | |||
<compile files="AtAspectJDeclareParents.aj,ReflectOnAtAspectJDeclareParents.java" options="-1.5 -Xlint:ignore"></compile> | |||
<run class="ReflectOnAtAspectJDeclareParents" classpath="../lib/bcel/bcel.jar"> | |||
<stdout> | |||
<line text="declare parents : C implements I"/> | |||
@@ -412,7 +414,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="compatibility/case2" title="generating code for a 1.2.1 runtime - 2"> | |||
<compile files="TrackingErrors.aj,A.java" options="-Xajruntimetarget:1.2"/> | |||
<compile files="TrackingErrors.aj,A.java" options="-Xajruntimetarget:1.2 -Xlint:ignore"/> | |||
<run class="A" classpath="../lib/aspectj/lib/aspectjrt121.jar"/> | |||
</ajc-test> | |||
@@ -454,7 +456,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="bugs150" title="declare soft and exclusions" pr="103097"> | |||
<compile files="Pr103097.aj"/> | |||
<compile files="Pr103097.aj" options="-Xlint:ignore"/> | |||
<run class="Pr103097"/> | |||
</ajc-test> | |||
@@ -995,7 +997,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="decs" pr="42743" title="declare soft w. catch block"> | |||
<compile files="VerifyError.aj"> | |||
<compile files="VerifyError.aj" options="-Xlint:ignore"> | |||
</compile> | |||
<run class="VerifyError"/> | |||
</ajc-test> | |||
@@ -1055,7 +1057,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="bugs150" pr="83645" title="pertypewithin({interface}) illegal field modifier"> | |||
<compile files="PR83645.java"/> | |||
<compile files="PR83645.java" options="-Xlint:ignore"/> | |||
<run class="PR83645"/> | |||
</ajc-test> | |||
@@ -1586,7 +1588,7 @@ | |||
<!-- end of atOverride tests with ITDs --> | |||
<ajc-test dir="../docs/dist/doc/examples/introduction" title="introduction sample" vm="1.5"> | |||
<compile files="CloneablePoint.java,ComparablePoint.java,HashablePoint.java,Point.java" options="-1.5"/> | |||
<compile files="CloneablePoint.java,ComparablePoint.java,HashablePoint.java,Point.java" options="-1.5 -Xlint:ignore"/> | |||
</ajc-test> | |||
<ajc-test dir="java5/varargs" title="varargs in constructor sig" vm="1.5"> | |||
@@ -2480,7 +2482,7 @@ | |||
<!-- ======================================================================================= --> | |||
<ajc-test dir="java5/pertypewithin" title="basic ptw test"> | |||
<compile files="A.java,B.java,C.java,D.java,Main.java,X.java"/> | |||
<compile files="A.java,B.java,C.java,D.java,Main.java,X.java" options="-Xlint:ignore"/> | |||
<run class="p.A"> | |||
<stderr> | |||
<line text="hi from A"/> | |||
@@ -2494,7 +2496,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="java5/pertypewithin" title="ptw hasAspect"> | |||
<compile files="A.java,B.java,C.java,D.java,Main.java,X.java"/> | |||
<compile files="A.java,B.java,C.java,D.java,Main.java,X.java" options="-Xlint:ignore"/> | |||
<run class="p.B"> | |||
<stderr> | |||
<line text="hi from B"/> | |||
@@ -2509,7 +2511,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="java5/pertypewithin" title="ptw aspectOf"> | |||
<compile files="A.java,B.java,C.java,D.java,Main.java,X.java"/> | |||
<compile files="A.java,B.java,C.java,D.java,Main.java,X.java" options="-Xlint:ignore"/> | |||
<run class="p.C"/> | |||
</ajc-test> | |||
@@ -180,7 +180,7 @@ | |||
</ajc-test> | |||
<ajc-test dir="java5/ataspectj/annotationGen" title="ann gen for itds"> | |||
<compile files="ITDTest.aj" options="-1.5, -outxml"> | |||
<compile files="ITDTest.aj" options="-1.5, -outxml -Xlint:ignore"> | |||
</compile> | |||
<run class="a.b.c.ITDTest" ltw=""/> | |||
</ajc-test> |
@@ -77,6 +77,13 @@ public class Ajc151Tests extends org.aspectj.testing.XMLBasedAjcTestCase { | |||
runTest("E extends Enum(E) again"); | |||
} | |||
public void testSwallowedException() { | |||
runTest("swallowed exceptions"); | |||
} | |||
public void testSwallowedExceptionIgnored() { | |||
runTest("swallowed exceptions with xlint"); | |||
} | |||
/* | |||
* @AspectJ bugs and enhancements | |||
*/ |
@@ -168,5 +168,15 @@ | |||
</stderr> | |||
</run> | |||
</ajc-test> | |||
<ajc-test dir="features151/swallowedExceptions" title="swallowed exceptions"> | |||
<compile files="SwallowedException.java"> | |||
<message kind="warning" line="11" text="Exception swallowed in catch block"/> | |||
</compile> | |||
</ajc-test> | |||
<ajc-test dir="features151/swallowedExceptions" title="swallowed exceptions with xlint"> | |||
<compile files="SwallowedException.java" options="-Xlint:ignore"> | |||
</compile> | |||
</ajc-test> | |||
</suite> |
@@ -102,7 +102,7 @@ | |||
<ajc-test | |||
dir="bugs/interfaceLibrary" | |||
title="exception clause for aspect-declared interface methods - positive"> | |||
<compile files="Client.java,LibraryAspect.java,lib/LibraryInterface.java"/> | |||
<compile files="Client.java,LibraryAspect.java,lib/LibraryInterface.java" options="-Xlint:ignore"/> | |||
<run class="Client"/> | |||
</ajc-test> | |||
@@ -117,7 +117,7 @@ | |||
<ajc-test | |||
dir="bugs/interfaceLibrary" | |||
title="exception clause for aspect-declared class methods - positive"> | |||
<compile files="ClassClient.java,LibraryClassAspect.java,lib/LibraryClass.java"/> | |||
<compile files="ClassClient.java,LibraryClassAspect.java,lib/LibraryClass.java" options="-Xlint:ignore"/> | |||
<run class="ClassClient"/> | |||
</ajc-test> | |||
@@ -132,7 +132,7 @@ | |||
<ajc-test dir="bugs/interfaceLibrary" | |||
pr="41175" | |||
title="exception clause for aspect-declared interface methods - positive binary"> | |||
<compile files="Client.java" aspectpath="lib.jar"/> | |||
<compile files="Client.java" aspectpath="lib.jar" options="-Xlint:ignore"/> | |||
<run class="Client"/> | |||
</ajc-test> | |||
@@ -147,7 +147,7 @@ | |||
<ajc-test dir="bugs/interfaceLibrary" | |||
pr="41175" | |||
title="exception clause for aspect-declared class methods - positive binary"> | |||
<compile files="ClassClient.java" aspectpath="libClass.jar"/> | |||
<compile files="ClassClient.java" aspectpath="libClass.jar" options="-Xlint:ignore"/> | |||
<run class="ClassClient"/> | |||
</ajc-test> | |||
@@ -50,7 +50,9 @@ | |||
<ajc-test dir="design/intro" | |||
title="declared exceptions are checked correctly on intros"> | |||
<compile files="ExceptionsCP.java"/> | |||
<compile files="ExceptionsCP.java"> | |||
<message kind="warning" line="10" text="Exception swallowed in catch block"/> | |||
</compile> | |||
<run class="ExceptionsCP"/> | |||
</ajc-test> | |||
@@ -77,7 +79,7 @@ | |||
<ajc-test dir="design/reflect" title="Checking new joinpoints" | |||
keywords="from-design"> | |||
<compile files="Coverage.java"/> | |||
<compile files="Coverage.java" options="-Xlint:ignore"/> | |||
<run class="Coverage"/> | |||
</ajc-test> | |||
@@ -40,7 +40,7 @@ | |||
<ajc-test dir="incremental/model/introduction" | |||
title="Testing incremental structure model: Intertype declarations (and a declare parents)" | |||
keywords="incremental-test,model-test" > | |||
<compile staging="true" options="-incremental,-emacssym" sourceroots="src"/> | |||
<compile staging="true" options="-incremental,-emacssym -Xlint:ignore" sourceroots="src"/> | |||
<inc-compile tag="20"/> <!-- Just 'touched' one file --> | |||
<inc-compile tag="30"/> <!-- Just 'touched another aspect --> | |||
</ajc-test> |
@@ -91,13 +91,16 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { | |||
// Make simple changes to a project, adding a class and an aspect | |||
public void testAddingAnAspect() { | |||
initialiseProject("P1"); | |||
build("P1"); | |||
build("P1"); // build 1, weave 1 | |||
alter("P1","inc1"); // adds a class | |||
alter("P1","inc2"); // adds an aspect | |||
build("P1"); | |||
build("P1"); // build 1, | |||
long timeTakenForFullBuildAndWeave = getTimeTakenForBuild(); | |||
checkWasntFullBuild(); | |||
checkCompileWeaveCount(2,3); | |||
checkWasFullBuild(); // it *will* be a full build under the new | |||
// "back-to-the-source strategy | |||
checkCompileWeaveCount(5,3); // we compile X and A (the delta) find out that | |||
// an aspect has changed, go back to the source | |||
// and compile X,A,C, then weave them all. | |||
build("P1"); | |||
long timeTakenForSimpleIncBuild = getTimeTakenForBuild(); | |||
// I don't think this test will have timing issues as the times should be *RADICALLY* different | |||
@@ -145,7 +148,7 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { | |||
alter("P1","inc1"); // adds a class | |||
alter("P1","inc2"); // adds an aspect | |||
build("P1"); | |||
checkWasntFullBuild(); | |||
checkWasFullBuild(); // adding an aspect makes us go back to the source | |||
} | |||
@@ -307,7 +310,7 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { | |||
checkForError("only abstract aspects can have type parameters"); | |||
alter("PR125405","inc2"); | |||
build("PR125405"); | |||
checkCompileWeaveCount(1,1); | |||
checkCompileWeaveCount(2,1); | |||
assertTrue("Should be no errors, but got "+MyTaskListManager.getErrorMessages(),MyTaskListManager.getErrorMessages().size()==0); | |||
} | |||
@@ -348,10 +351,10 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { | |||
build("pr114875"); | |||
alter("pr114875","inc1"); | |||
build("pr114875"); | |||
checkWasntFullBuild(); | |||
checkWasFullBuild(); | |||
alter("pr114875","inc2"); | |||
build("pr114875"); | |||
checkWasntFullBuild(); | |||
checkWasFullBuild(); // back to the source for an aspect change | |||
} | |||
public void testPr117882() { | |||
@@ -362,7 +365,7 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { | |||
checkWasFullBuild(); | |||
alter("PR117882","inc1"); | |||
build("PR117882"); | |||
checkWasntFullBuild(); | |||
checkWasFullBuild(); // back to the source for an aspect | |||
// AjdeInteractionTestbed.VERBOSE=false; | |||
// AjdeInteractionTestbed.configureBuildStructureModel(false); | |||
} | |||
@@ -375,7 +378,7 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { | |||
checkWasFullBuild(); | |||
alter("PR117882_2","inc1"); | |||
build("PR117882_2"); | |||
checkWasntFullBuild(); | |||
checkWasFullBuild(); // back to the source... | |||
//checkCompileWeaveCount(1,4); | |||
//fullBuild("PR117882_2"); | |||
//checkWasFullBuild(); | |||
@@ -390,7 +393,7 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { | |||
checkWasFullBuild(); | |||
alter("PR115251","inc1"); | |||
build("PR115251"); | |||
checkWasntFullBuild(); | |||
checkWasFullBuild(); // back to the source | |||
} | |||
@@ -502,7 +505,7 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { | |||
build("PR113257"); | |||
alter("PR113257","inc1"); | |||
build("PR113257"); | |||
checkWasntFullBuild(); | |||
checkWasFullBuild(); // back to the source | |||
alter("PR113257","inc1"); | |||
build("PR113257"); | |||
} | |||
@@ -512,7 +515,7 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { | |||
build("PR123612"); | |||
alter("PR123612","inc1"); | |||
build("PR123612"); | |||
checkWasntFullBuild(); | |||
checkWasFullBuild(); // back to the source | |||
} | |||
// other possible tests: |
@@ -531,6 +531,7 @@ | |||
<compile files="UndeclaredThrows.java"> | |||
<message kind="error" line="12"/> | |||
<message kind="error" line="18"/> | |||
<message kind="warning" line="18" text="Exception swallowed in catch block"/> | |||
</compile> | |||
</ajc-test> | |||