<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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]"/>
</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)"/>
</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"/>
</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>
</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>
</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>
</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>
<!-- 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">
<!-- ======================================================================================= -->
<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"/>
</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"/>
</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>
</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>
runTest("E extends Enum(E) again");
}
+ public void testSwallowedException() {
+ runTest("swallowed exceptions");
+ }
+
+ public void testSwallowedExceptionIgnored() {
+ runTest("swallowed exceptions with xlint");
+ }
/*
* @AspectJ bugs and enhancements
*/
</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>
\ No newline at end of file
<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>
<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>
<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>
<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>
<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>
<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>
<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>
// 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
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
}
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);
}
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() {
checkWasFullBuild();
alter("PR117882","inc1");
build("PR117882");
- checkWasntFullBuild();
+ checkWasFullBuild(); // back to the source for an aspect
// AjdeInteractionTestbed.VERBOSE=false;
// AjdeInteractionTestbed.configureBuildStructureModel(false);
}
checkWasFullBuild();
alter("PR117882_2","inc1");
build("PR117882_2");
- checkWasntFullBuild();
+ checkWasFullBuild(); // back to the source...
//checkCompileWeaveCount(1,4);
//fullBuild("PR117882_2");
//checkWasFullBuild();
checkWasFullBuild();
alter("PR115251","inc1");
build("PR115251");
- checkWasntFullBuild();
+ checkWasFullBuild(); // back to the source
}
build("PR113257");
alter("PR113257","inc1");
build("PR113257");
- checkWasntFullBuild();
+ checkWasFullBuild(); // back to the source
alter("PR113257","inc1");
build("PR113257");
}
build("PR123612");
alter("PR123612","inc1");
build("PR123612");
- checkWasntFullBuild();
+ checkWasFullBuild(); // back to the source
}
// other possible tests:
<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>