You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ajc150.xml 259KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <!-- AspectJ v1.5.0 Tests -->
  3. <suite>
  4. <ajc-test dir="java5/staticImports" title="import static java.lang.System.out">
  5. <compile files="StaticImport.aj" options="-1.5"/>
  6. </ajc-test>
  7. <ajc-test dir="java5/bridgeMethods" pr="72766" title="Ignore bridge methods">
  8. <compile files="AspectX.aj" inpath="testcode.jar" options="-showWeaveInfo">
  9. <!-- <message kind="warning" line="7" text="pointcut did not match on the method call to a bridge method."/>
  10. <message kind="warning" line="7" text="does not match because declaring type is Number"/>-->
  11. <message kind="weave" text="(AspectX.aj:18) advised by before advice from 'AspectX'"/>
  12. <message kind="weave" text="(AspectX.aj:19) advised by before advice from 'AspectX'"/>
  13. <message kind="weave" text="(Number.java:5) advised by before advice from 'AspectX'"/>
  14. </compile>
  15. </ajc-test>
  16. <ajc-test title="intermediate annotation matching" dir="bugs150">
  17. <compile files="AnnotationPlusPatternMatchingError.aj" options="-1.5">
  18. <message kind="warning" line="28" text="matched"/>
  19. </compile>
  20. <run class="AnnotationPlusPatternMatchingError">
  21. <stdout>
  22. <line text="In advice"/>
  23. </stdout>
  24. </run>
  25. </ajc-test>
  26. <ajc-test dir="migration" title="load aspectj 1.2.1 aspects in aspectj 5">
  27. <compile files="Program.java" aspectpath="aspects121.jar">
  28. </compile>
  29. <run class="Program"/>
  30. </ajc-test>
  31. <ajc-test dir="bugs/java5/arrayCloning" pr="72150" vm="1.5"
  32. title="AJC possible bug with static nested classes">
  33. <compile files="A.java,C.java" options="-1.5,-showWeaveInfo">
  34. <message kind="weave" text="Type 'C' (C.java:14) advised by around advice from 'A' (A.java:2)"/>
  35. </compile>
  36. <run class="C"/>
  37. </ajc-test>
  38. <ajc-test dir="java5/pseudoKeywords"
  39. title="method called around in class">
  40. <compile files="MethodCalledAround.java">
  41. </compile>
  42. </ajc-test>
  43. <ajc-test dir="java5/pseudoKeywords"
  44. title="method called around in aspect">
  45. <compile files="MethodCalledAroundAspect.java">
  46. <message kind="error" line="2"/>
  47. </compile>
  48. </ajc-test>
  49. <ajc-test dir="bugs150" pr="64568" title="clear error message on itd with type pattern">
  50. <compile files="pr64568.aj">
  51. <message line="4" kind="error" text="Syntax error on token &quot;*&quot;, delete this token"/>
  52. <message line="4" kind="error" text="foo cannot be resolved to a type"/>
  53. </compile>
  54. </ajc-test>
  55. <ajc-test dir="bugs150" pr="74562" title="before and after are valid identifiers in classes">
  56. <compile files="pr74562.aj">
  57. </compile>
  58. </ajc-test>
  59. <ajc-test dir="bugs150" pr="107486" title="anonymous inner classes">
  60. <compile files="pr107486.aj">
  61. </compile>
  62. </ajc-test>
  63. <ajc-test dir="bugs150" pr="102210" title="NullPointerException trying to compile">
  64. <compile files="PR102210.java"/>
  65. <run class="PR102210">
  66. <stderr>
  67. <line text="List size is 1"/>
  68. <line text="m1 running"/>
  69. <line text="List size is 2"/>
  70. <line text="m2 running"/>
  71. <line text="List size is 3"/>
  72. <line text="m3 running"/>
  73. </stderr>
  74. </run>
  75. </ajc-test>
  76. <ajc-test dir="bugs150" pr="107486" title="multiple anonymous inner classes">
  77. <compile files="pr107486part2.aj">
  78. </compile>
  79. <run class="pr107486part2">
  80. <stdout>
  81. <line text="[advised] f"/>
  82. <line text="[advised] g"/>
  83. </stdout>
  84. </run>
  85. </ajc-test>
  86. <ajc-test dir="bugs150" pr="91114" title="before and after are valid identifiers in classes, part 2">
  87. <compile files="pr91114.aj">
  88. </compile>
  89. </ajc-test>
  90. <ajc-test dir="bugs150" pr="78621" title="void field type in pointcut expression">
  91. <compile files="pr78261.aj">
  92. <message line="3" kind="error" text="fields cannot have a void type"/>
  93. </compile>
  94. </ajc-test>
  95. <ajc-test dir="bugs150" pr="86057" title="overriding final pointcut from super-aspect">
  96. <compile files="pr86057.aj">
  97. <message line="9" kind="error" text="can't override final pointcut Base.foo()"/>
  98. </compile>
  99. </ajc-test>
  100. <ajc-test dir="bugs150" pr="78707" title="before returning advice not allowed!">
  101. <compile files="pr78707.aj">
  102. <message line="3" kind="error" text="Syntax error on token &quot;returning&quot;, delete this token"/>
  103. <message line="3" kind="error" text="Syntax error on token &quot;throwing&quot;, delete this token"/>
  104. </compile>
  105. </ajc-test>
  106. <ajc-test dir="bugs150" pr="104529" title="@SuppressWarnings should suppress">
  107. <compile files="pr104529.aj" options = "-1.5 -warn:+unchecked">
  108. <message line="11" kind="warning" text="needs unchecked conversion"/>
  109. </compile>
  110. </ajc-test>
  111. <ajc-test dir="bugs150" pr="79523" title="declare warning : foo(str) : ...;">
  112. <compile files="pr79523.aj">
  113. <message line="4" kind="warning" text="no match for this type name: str"/>
  114. <message line="4" kind="error" text="bad parameter"/>
  115. <message line="4" kind="error" text="args() pointcut designator cannot be used in declare statement"/>
  116. </compile>
  117. </ajc-test>
  118. <ajc-test dir="bugs150" pr="107059" title="parser crashes on call(void (@a *)(..)">
  119. <compile files="pr107059.aj">
  120. <message line="3" kind="error" text="Syntax error on token &quot;(&quot;, &quot;name pattern&quot; expected"/>
  121. </compile>
  122. </ajc-test>
  123. <ajc-test dir="bugs150" pr="107059" title="target(@Foo *)">
  124. <compile files="pr107059_2.aj" options="-1.5">
  125. <message kind="error" line="4" text="wildcard type pattern not allowed"></message>
  126. </compile>
  127. </ajc-test>
  128. <ajc-test dir="bugs150" title="varargs with type variable">
  129. <compile files="ParameterizedVarArgMatch.aj" options="-1.5">
  130. </compile>
  131. </ajc-test>
  132. <ajc-test dir="bugs150" pr="108104" title="multiple anonymous inner classes 2">
  133. <compile files="pr108104.aj" options="-1.5">
  134. </compile>
  135. </ajc-test>
  136. <ajc-test dir="bugs150" pr="108050" title="signature matching in override scenario">
  137. <compile files="pr108050.aj" options="-1.5">
  138. <message kind="warning" line = "2" text="servlet request"></message>
  139. <message kind="warning" line = "7" text="servlet request"></message>
  140. <message kind="warning" line = "21" text="servlet request"></message>
  141. </compile>
  142. </ajc-test>
  143. <ajc-test dir="bugs150/pr108425" pr="108245" title="wildcard annotation matching - pr108245">
  144. <compile files="package1/Bean.java,package2/Bean.java,package2/propertyChanger.java,package3/pr108425.aj" options="-1.5">
  145. </compile>
  146. </ajc-test>
  147. <ajc-test dir="bugs150/" pr="108104" title="inner types and type variables">
  148. <compile files="ShapeCommandMap.java" options="-1.5">
  149. </compile>
  150. </ajc-test>
  151. <ajc-test dir="bugs150/" pr="107953" title="@AfterThrowing with no formal specified">
  152. <compile files="pr107953.java" options="-1.5">
  153. <message kind="error" line="8" text="throwing formal 'RuntimeException' must be declared as a parameter in the advice signature"></message>
  154. </compile>
  155. </ajc-test>
  156. <ajc-test dir="bugs150/pr106130" pr="106130" title="test weaving with > 256 locals">
  157. <compile files="AroundLotsOfVars.java LotsOfVars.java" options="-preserveAllLocals"/>
  158. <run class="LotsOfVars">
  159. <stdout>
  160. <line text="hello"/>
  161. <line text="2"/>
  162. </stdout>
  163. </run>
  164. </ajc-test>
  165. <ajc-test dir="bugs150/pr87376" title="structure model npe on type not found">
  166. <compile files="I.java,NPE.aj" options="-emacssym">
  167. <message kind="error" line="8" text="I cannot be resolved to a type"/>
  168. <message kind="error" line="10" text="I cannot be resolved to a type"/>
  169. </compile>
  170. </ajc-test>
  171. <ajc-test dir="bugs150" pr="83311" title="overriding/polymorphism error on interface method introduction">
  172. <compile files="pr83311.aj"/>
  173. </ajc-test>
  174. <ajc-test dir="bugs150" pr="103266" title="NPE on syntax error">
  175. <compile files="pr103266.aj">
  176. <message kind="error" line="41" text="ConnectionRequestContext cannot be resolved to a type"/>
  177. </compile>
  178. </ajc-test>
  179. <ajc-test title="itd override with no exception clause" dir="bugs150">
  180. <compile files="pr83377.aj"></compile>
  181. </ajc-test>
  182. <ajc-test dir="bugs150/pr84260" vm="1.5" title="static import failures">
  183. <compile files="A.java,I1.java,I2.java" options="-1.5"/>
  184. <run class="I1">
  185. <stderr>
  186. <line text="static method running"/>
  187. </stderr>
  188. </run>
  189. <run class="I2">
  190. <stderr>
  191. <line text="static method running"/>
  192. </stderr>
  193. </run>
  194. </ajc-test>
  195. <ajc-test title="anonymous inner class with method returning type parameter" pr="107898" dir="bugs150">
  196. <compile files="pr107898.aj" options="-1.5"></compile>
  197. </ajc-test>
  198. <ajc-test title="matching against Object[]" pr="72668" dir="bugs150">
  199. <compile files="pr72668.aj" options="-1.5">
  200. <message kind="error" line="3" text="incompatible return type applying to method-execution(java.lang.Number[] pr72668.getThoseInts())"></message>
  201. <message kind="error" line="10" text="incompatible return type applying to method-execution(java.lang.Number[] pr72668.getThoseInts())"></message>
  202. </compile>
  203. </ajc-test>
  204. <ajc-test dir="decp" pr="80249" title="Order of types passed to compiler determines weaving behavior">
  205. <compile files="A.java,B.java,AspectX.java"/>
  206. <run class="B"/>
  207. <compile files="B.java,A.java,AspectX.java"/>
  208. <run class="B"/>
  209. </ajc-test>
  210. <ajc-test dir="bugs150" pr="99228" vm="1.5" title="ITD of a field into a generic class">
  211. <compile files="PR99228.aj" options="-1.5"/>
  212. </ajc-test>
  213. <ajc-test dir="bugs150" pr="98320" vm="1.5" title="intertype with nested generic type">
  214. <compile files="PR98320.aj" options="-1.5"/>
  215. </ajc-test>
  216. <ajc-test dir="decs" pr="42743" title="declare soft of runtime exception">
  217. <compile files="DeclareSoftRuntimeException.aj">
  218. <message kind="warning" line="3" text="MyRuntimeException will not be softened as it is already a RuntimeException"/>
  219. </compile>
  220. <run class="DeclareSoftRuntimeException">
  221. <stdout>
  222. <line text="MyRuntimeException"/>
  223. <line text="org.aspectj.lang.SoftException"/>
  224. <line text="MyRuntimeException"/>
  225. </stdout>
  226. </run>
  227. </ajc-test>
  228. <ajc-test dir="decs" pr="42743" title="declare soft w. catch block">
  229. <compile files="VerifyError.aj">
  230. </compile>
  231. <run class="VerifyError"/>
  232. </ajc-test>
  233. <ajc-test dir="bugs" pr="61568" title="Various kinds of ambiguous bindings">
  234. <compile files="AmbiguousBindings.aj">
  235. <message line="17" text="ambiguous binding of parameter(s) foo across '||' in pointcut"></message>
  236. <message line="19" text="ambiguous binding of parameter(s) foo across '||' in pointcut"></message>
  237. <message line="21" text="ambiguous binding of parameter(s) foo across '||' in pointcut"></message>
  238. <message line="23" text="ambiguous binding of parameter(s) x across '||' in pointcut"></message>
  239. <message line="25" text="ambiguous binding of parameter(s) foo across '||' in pointcut"></message>
  240. </compile>
  241. </ajc-test>
  242. <ajc-test dir="bugs" pr="61658" title="ambiguous args">
  243. <compile files="PR61658.java">
  244. <message line="17" text="ambiguous binding of parameter(s) a, b across '||' in pointcut"></message>
  245. </compile>
  246. </ajc-test>
  247. <ajc-test dir="bugs150" pr="78021" title="Injecting exception into while loop with break statement causes catch block to be ignored">
  248. <compile files="PR78021.java"/>
  249. <run class="PR78021"/>
  250. </ajc-test>
  251. <ajc-test dir="bugs150/pr99089" vm="1.5" pr="99089" title="ArrayIndexOutOfBoundsException - Generics in privileged aspects">
  252. <compile files="DataClass.java,TracingAspect.java" options="-1.5"/>
  253. <run class="DataClass">
  254. <stderr>
  255. <line text="before:Length of v=1"/>
  256. <line text="after:Length of v=2"/>
  257. </stderr>
  258. </run>
  259. </ajc-test>
  260. <ajc-test dir="bugs150" pr="79554" title="Return in try-block disables catch-block if final-block is present">
  261. <compile files="PR79554.java"/>
  262. <run class="PR79554"/>
  263. </ajc-test>
  264. <ajc-test dir="bugs150" pr="82570" title="Weaved code does not include debug lines">
  265. <compile files="PR82570_1.java"/>
  266. </ajc-test>
  267. <ajc-test dir="bugs150" pr="83303" title="compiler error when mixing inheritance, overriding and polymorphism">
  268. <compile files="PR83303.java"/>
  269. </ajc-test>
  270. <ajc-test dir="bugs150" pr="83563" title="pertypewithin() handing of inner classes (1)">
  271. <compile files="PR83563_1.java"/>
  272. <run class="PR83563_1"/>
  273. </ajc-test>
  274. <ajc-test dir="bugs150" pr="83563" title="pertypewithin() handing of inner classes (2)">
  275. <compile files="PR83563_2.java"/>
  276. <run class="PR83563_2"/>
  277. </ajc-test>
  278. <ajc-test dir="bugs150" pr="83645" title="pertypewithin({interface}) illegal field modifier">
  279. <compile files="PR83645.java"/>
  280. <run class="PR83645"/>
  281. </ajc-test>
  282. <ajc-test dir="bugs150" title="bad asm for enums" vm="1.5">
  283. <compile files="Rainbow.java" options="-emacssym,-1.5"/>
  284. </ajc-test>
  285. <ajc-test dir="bugs150" pr="10461" title="missing name pattern">
  286. <compile files="PR106461.aj">
  287. <message kind="error" line="3" text="Syntax error on token &quot;(&quot;, &quot;name pattern&quot; expected"/>
  288. <message kind="error" line="5" text="Syntax error on token &quot;)&quot;, &quot;name pattern&quot; expected"/>
  289. <message kind="error" line="7" text="Syntax error on token &quot;.&quot;, &quot;name pattern&quot; expected"/>
  290. </compile>
  291. </ajc-test>
  292. <ajc-test dir="bugs150" pr="106634" title="IllegalStateException unpacking signature of nested parameterized type">
  293. <compile files="pr106634.aj" options="-1.5"/>
  294. </ajc-test>
  295. <ajc-test dir="bugs150" title="(@Foo *)+ type pattern parse error">
  296. <compile files="AnnotationPlusPatternParseError.aj" options="-1.5"/>
  297. </ajc-test>
  298. <ajc-test dir="bugs150" pr="80571" title="around advice on interface initializer">
  299. <compile files="pr80571.aj"/>
  300. <run class="pr80571">
  301. <stdout>
  302. <line text="before"/>
  303. <line text="after"/>
  304. </stdout>
  305. </run>
  306. </ajc-test>
  307. <ajc-test dir="bugs150" pr="78314" title="good error message for unmatched member syntax">
  308. <compile files="pr78314.aj" options="-1.5">
  309. <message kind="error" line="5" text="Syntax error, insert &quot;body&quot;"/>
  310. <message kind="error" line="5" text="Syntax error on tokens, valid member declaration expected instead"/>
  311. </compile>
  312. <compile files="pr78314.aj">
  313. <message kind="error" line="5" text="Syntax error, insert &quot;body&quot;"/>
  314. <message kind="error" line="5" text="Syntax error on tokens, valid member declaration expected instead"/>
  315. </compile>
  316. </ajc-test>
  317. <ajc-test dir="bugs150" pr="108377" title="itd field access inside itd method">
  318. <compile files="pr108377.aj"/>
  319. <run class="pr108377"/>
  320. </ajc-test>
  321. <ajc-test dir="bugs150/pr108054" pr="108054" title="type variable with type variable bound">
  322. <compile files="pr108054.aj" options="-1.5"/>
  323. <compile files="ISequence.java,ICounter.java,ASequence.java" options="-1.5"/>
  324. </ajc-test>
  325. <ajc-test dir="bugs150/pr108370" pr="108370" title="switch on enum inside ITD method">
  326. <compile files="et/Q.java" options="-1.5"/>
  327. <compile files="EnumTest.aj" options="-1.5 -inpath et"/>
  328. <run class="EnumTest">
  329. <stdout>
  330. <line text="B!"/>
  331. </stdout>
  332. </run>
  333. </ajc-test>
  334. <ajc-test dir="bugs150" pr="95992" title="inner type of generic interface reference from parameterized type">
  335. <compile files="pr95992.aj" options="-1.5"/>
  336. </ajc-test>
  337. <ajc-test dir="bugs150" pr="105479" title="declare parents introducing override with covariance">
  338. <compile files="pr105479.aj" options="-1.5"/>
  339. </ajc-test>
  340. <ajc-test dir="bugs150" pr="104024" title="inner class passed as argument to varargs method">
  341. <compile files="pr104024.aj" options="-1.5"/>
  342. </ajc-test>
  343. <ajc-test dir="bugs150" pr="107858" title="inlined field access in proceed call">
  344. <compile files="pr107858.aj" options="-1.5">
  345. <message kind="error" line="9" text="too many arguments to proceed, expected 0"></message>
  346. <message kind="error" line="10" text="too many arguments to proceed, expected 0"></message>
  347. </compile>
  348. </ajc-test>
  349. <ajc-test dir="bugs150/pr71159" pr="71159" title="visibility in signature matching with overrides - 1">
  350. <compile files="pr71159.aj">
  351. <message kind="warning" line="26" text="should match"/>
  352. </compile>
  353. </ajc-test>
  354. <ajc-test dir="bugs150/pr71159" pr="71159" title="visibility in signature matching with overrides - 2">
  355. <compile files="PrivateITD.aj">
  356. <message kind="warning" line="28" text="should match"/>
  357. </compile>
  358. </ajc-test>
  359. <ajc-test dir="bugs150/pr71159" pr="71159" title="visibility in signature matching with overrides - 3">
  360. <compile files="pkg1/A.java,pkg1/B.java,pkg1/C.java,pkg2/ITDInDiffPackage.aj">
  361. <message kind="warning" line="10" text="should match"/>
  362. </compile>
  363. </ajc-test>
  364. <ajc-test dir="bugs150" pr="59196" title="args generated correctly for advice execution join point">
  365. <compile files="pr59196.aj" options="-XnoInline -1.5"/>
  366. </ajc-test>
  367. <ajc-test dir="bugs150" pr="74048" title="no unused warnings on aspect types">
  368. <compile files="pr74048.aj" options="-warn:unusedPrivate"/>
  369. </ajc-test>
  370. <ajc-test dir="bugs150" pr="59397" title="synthetic arguments on itd cons are not used in matching">
  371. <compile files="pr59397.aj">
  372. <message line="6" kind="warning" text="should match"/>
  373. </compile>
  374. </ajc-test>
  375. <ajc-test dir="bugs150" pr="108602" title="parse generic type signature with parameterized type in interface">
  376. <compile files="pr108602.java" options="-1.5"/>
  377. </ajc-test>
  378. <ajc-test dir="bugs150" pr="105479" title="override and covariance with decp - runtime">
  379. <compile files="pr105479part2.aj" options="-1.5"/>
  380. <run class="pr105479part2">
  381. <stdout>
  382. <line text="in Test.hashCode()"/>
  383. <line text="in Test.hashCode()"/>
  384. <line text="id"/>
  385. <line text="in Test.hashCode()"/>
  386. </stdout>
  387. </run>
  388. </ajc-test>
  389. <ajc-test dir="bugs150/pr105479" pr="105479" title="override and covariance with decp - runtime separate files">
  390. <compile files="ReturnTypeTest.aj,ReturnTypeTester.java,Driver.java" options="-1.5"/>
  391. <run class="Driver">
  392. <stdout>
  393. <line text="in Test.hashCode()"/>
  394. <line text="in Test.hashCode()"/>
  395. <line text="id"/>
  396. <line text="in Test.hashCode()"/>
  397. </stdout>
  398. </run>
  399. </ajc-test>
  400. <ajc-test dir="bugs150" pr="102212" title="abstract synchronized itdms not detected">
  401. <compile files="pr102212.aj">
  402. <message line="7" kind="error" text="The abstract method _abstract in type Parent can only set a visibility modifier, one of public or protected"/>
  403. </compile>
  404. </ajc-test>
  405. <ajc-test dir="bugs150" pr="102212" title="synchronized itd interface methods">
  406. <compile files="SynchronizedInterfaceMethods.aj" options="-1.5">
  407. </compile>
  408. <run class="SynchronizedInterfaceMethods"/>
  409. </ajc-test>
  410. <ajc-test dir="bugs150" pr="101606" title="unused private pointcuts">
  411. <compile files="pr101606.aj" options="-warn:unusedPrivate">
  412. </compile>
  413. </ajc-test>
  414. <ajc-test dir="bugs150/pr99125" pr="99125" title="itd interface method already existing on interface">
  415. <compile files="p/pr99125.aj,p/I.java,p/J.java" options="-1.5">
  416. </compile>
  417. <compile files="Aspects.aj" options="-inpath p"/>
  418. <run class="p.pr99125"/>
  419. <compile files="p2/pr99125.aj,p/I.java,p/J.java"/> <!-- actually in package p, introduces incompatible change -->
  420. <compile files="Aspects.aj" options="-inpath p">
  421. <message kind="error" line="7" text="inter-type declaration from X conflicts with existing member"/>
  422. </compile>
  423. </ajc-test>
  424. <ajc-test dir="bugs150/pr87530" pr="87530" title="final itd methods on interfaces">
  425. <compile files="FinalITDMOnInterface.aj">
  426. <message kind="error" line="12" text="Cannot override the final method from A.TestInterface"></message>
  427. </compile>
  428. <compile files="FinalITDMOnInterface2.aj">
  429. <message kind="error" line="8" text="Cannot override the final method from A.TestInterface"></message>
  430. <message kind="error" line="8" text="can't override final void A$TestInterface.m()"></message>
  431. </compile>
  432. </ajc-test>
  433. <ajc-test dir="bugs150" pr="108818" title="can't override private pointcut in abstract aspect">
  434. <compile files="PrivatePointcutOverriding.aj">
  435. <message kind="warning" line="19" text="matched join point from super advice"/>
  436. <message kind="warning" line="21" text="matched join point from sub advice"/>
  437. </compile>
  438. </ajc-test>
  439. <ajc-test dir="bugs150" pr="108816" title="advising cflow advice execution">
  440. <compile files="pr108816.aj" >
  441. </compile>
  442. </ajc-test>
  443. <ajc-test dir="bugs150/pr108902" pr="108902" title="no type mismatch on generic types in itds">
  444. <compile files="Subject.java,Observer.java,ObserverProtocol.aj" >
  445. </compile>
  446. </ajc-test>
  447. <ajc-test dir="bugs150" pr="108903" title="super call in ITD">
  448. <compile files="pr108903.aj" >
  449. <message kind="error" line="14" text="The method print() is undefined for the type Object"/>
  450. </compile>
  451. </ajc-test>
  452. <ajc-test dir="bugs150" pr="109042" title="no unused parameter warnings for synthetic advice args">
  453. <compile files="pr109042.aj" options="-warn:+unusedArgument -warn:+unusedPrivate -warn:+unusedImport -1.5">
  454. </compile>
  455. </ajc-test>
  456. <ajc-test dir="bugs150" pr="109486" title="Internal compiler error (ClassParser.java:242)">
  457. <compile files="PR109486.java" >
  458. <message kind="error" line="1" text="The class PR109486 can be either abstract or final, not both"/>
  459. </compile>
  460. </ajc-test>
  461. <ajc-test dir="bugs150" pr="109124" title="no verify error with set on inner type">
  462. <compile files="VerifyErrorOnSet.aj" options="-1.5" >
  463. </compile>
  464. <run class="test.VerifyErrorOnSet"/>
  465. <compile files="pr106874.aj" options="-1.5" >
  466. </compile>
  467. <run class="pr106874"/>
  468. </ajc-test>
  469. <ajc-test dir="bugs150" pr="108826" title="cant find type error with generic return type or parameter">
  470. <compile files="pr108826.aj" options="-1.5 -emacssym" >
  471. </compile>
  472. </ajc-test>
  473. <ajc-test dir="bugs150" pr="105181" title="no verify error on generic collection member access">
  474. <compile files="pr105181.aj" options="-1.5">
  475. </compile>
  476. <run class="pr105181"/>
  477. </ajc-test>
  478. <ajc-test dir="bugs150/pr108903" pr="108903" title="super call in ITD - part 2">
  479. <compile files="com/designpattern/decorator/HeaderDecorator.aj,com/designpattern/decorator/Main.java,com/designpattern/decorator/Order.java,com/designpattern/decorator/OrderDecorator.aj,com/designpattern/decorator/SalesOrder.java" options="-1.5" >
  480. </compile>
  481. </ajc-test>
  482. <ajc-test dir="bugs150/pr103740" pr="103740" title="Compiler failure on at_annotation">
  483. <compile files="AroundAdvice.aj" options="-1.5,-showWeaveInfo">
  484. <message kind="weave" text="Join point 'method-execution(void C.m1())' in Type 'C' (AroundAdvice.aj:12) advised by before advice from 'ErrorHandling' (AroundAdvice.aj:8)"/>
  485. <message kind="weave" text="Join point 'method-execution(void C.m3())' in Type 'C' (AroundAdvice.aj:14) advised by before advice from 'ErrorHandling' (AroundAdvice.aj:8)"/>
  486. </compile>
  487. </ajc-test>
  488. <ajc-test dir="bugs150/pr106554" pr="106554" title="Problem in staticinitialization with pertypewithin aspect">
  489. <compile files="A.aj" options="-showWeaveInfo">
  490. <message kind="weave" text="Join point 'staticinitialization(void A.&lt;clinit&gt;())' in Type 'A' (A.aj:1) advised by before advice from 'StopsInit' (A.aj:21)"/>
  491. </compile>
  492. <run class="A">
  493. <stdout>
  494. <line text="test = 1"/>
  495. </stdout>
  496. </run>
  497. </ajc-test>
  498. <ajc-test dir="bugs150/SimpleInsuranceFailure" title="raw and generic type conversion with itd cons">
  499. <compile files="" options=" -emacssym, -sourceroots ." >
  500. </compile>
  501. </ajc-test>
  502. <ajc-test dir="bugs150" title="@annotation binding with around advice">
  503. <compile files="AnnotationBinding.aj" options="-1.5"/>
  504. <run class="AnnotationBinding"/>
  505. </ajc-test>
  506. <ajc-test dir="bugs150" title="declare parents on a missing type">
  507. <compile files="Pr76374.aj" options="-1.5">
  508. <message kind="warning" line="3" text="no match for this type name"/>
  509. </compile>
  510. </ajc-test>
  511. <ajc-test dir="bugs150" title="parameterized generic methods">
  512. <compile files="Pr109283.aj" options="-1.5 -warn:indirectStatic">
  513. </compile>
  514. </ajc-test>
  515. <ajc-test dir="bugs150" title="call join points in anonymous inner classes">
  516. <compile files="pr104229.aj" options="-1.5">
  517. <message kind="warning" line="54" text="bingo"/>
  518. <message kind="warning" line="115" text="bingo"/>
  519. <message kind="warning" line="130" text="bingo"/>
  520. </compile>
  521. <run class="pr104229">
  522. <stdout>
  523. <line text="call match class pr104229"/>
  524. <line text="OK it worked!"/>
  525. </stdout>
  526. </run>
  527. </ajc-test>
  528. <ajc-test dir="bugs150" title="default impl of Runnable">
  529. <compile files="pr88900.aj" options="-Xdev:Pinpoint">
  530. </compile>
  531. </ajc-test>
  532. <ajc-test dir="bugs150" title="array clone call join points in 1.4 vs 1.3">
  533. <compile files="pr102933.aj" options="-1.3">
  534. <message kind="warning" line="7" text="a call within pr102933"/>
  535. </compile>
  536. <compile files="pr102933.aj" options="-1.4">
  537. <message kind="warning" line="7" text="a call within pr102933"/>
  538. </compile>
  539. <compile files="pr102933.aj" options="-1.5">
  540. <message kind="warning" line="7" text="a call within pr102933"/>
  541. </compile>
  542. </ajc-test>
  543. <ajc-test dir="bugs150" pr="100195" title="debug info in around advice inlining">
  544. <compile files="pr100195.aj">
  545. </compile>
  546. <run class="pr100195"/>
  547. </ajc-test>
  548. <ajc-test dir="bugs150/pr77269" title="advice in structure model with anonymous inner class">
  549. <compile files="pack/pr77269.aj" options="-emacssym">
  550. </compile>
  551. </ajc-test>
  552. <ajc-test dir="bugs150" title="advice in structure model with named inner class">
  553. <compile files="pr77269b.aj" options="-emacssym">
  554. </compile>
  555. </ajc-test>
  556. <ajc-test dir="bugs150/pr77269" title="declare warning in structure model with anonymous inner class">
  557. <compile files="pack/pr77269c.aj" options="-emacssym">
  558. <message kind="warning" line="8" text="blah blah blah"/>
  559. </compile>
  560. </ajc-test>
  561. <!-- ============================================================================ -->
  562. <!-- ============================================================================ -->
  563. <!-- atOverride tests with ITDs -->
  564. <ajc-test dir="java5/generics/itds" pr="106630" title="atOverride used with ITDs">
  565. <compile files="AtOverride.aj" options="-1.5"/>
  566. </ajc-test>
  567. <ajc-test dir="java5/generics/itds" pr="106630" title="atOverride used with ITDs - 1">
  568. <compile files="AtOverride1.aj" options="-1.5">
  569. <message kind="error" line="9" text="The method method() of type Child must override a superclass method"/>
  570. </compile>
  571. </ajc-test>
  572. <ajc-test dir="java5/generics/itds" pr="106630" title="atOverride used with ITDs - 2">
  573. <compile files="AtOverride2.aj" options="-1.5"/>
  574. </ajc-test>
  575. <ajc-test dir="java5/generics/itds" pr="106630" title="atOverride used with ITDs - 3">
  576. <compile files="AtOverride3.aj" options="-1.5"/>
  577. </ajc-test>
  578. <ajc-test dir="java5/generics/itds" pr="106630" title="atOverride used with ITDs - 4">
  579. <compile files="AtOverride4.aj" options="-1.5"/>
  580. </ajc-test>
  581. <ajc-test dir="java5/generics/itds" pr="106630" title="atOverride used with ITDs - 5">
  582. <compile files="AtOverride5.aj" options="-1.5">
  583. <message kind="error" line="11" text="The method method() of type Child must override a superclass method"/>
  584. </compile>
  585. </ajc-test>
  586. <ajc-test dir="java5/generics/itds" pr="106630" title="atOverride used with ITDs - 6">
  587. <compile files="AtOverride6.aj" options="-1.5"/>
  588. </ajc-test>
  589. <ajc-test dir="java5/generics/itds" pr="106630" title="atOverride used with ITDs - 7">
  590. <compile files="AtOverride7.aj" options="-1.5"/>
  591. </ajc-test>
  592. <!-- end of atOverride tests with ITDs -->
  593. <ajc-test dir="../docs/dist/doc/examples/introduction" title="introduction sample" vm="1.5">
  594. <compile files="CloneablePoint.java,ComparablePoint.java,HashablePoint.java,Point.java" options="-1.5"/>
  595. </ajc-test>
  596. <ajc-test dir="java5/varargs" title="varargs in constructor sig" vm="1.5">
  597. <compile files="Pr88652.aj" options="-1.5">
  598. <message kind="warning" line="8" text="should match"/>
  599. <message kind="warning" line="9" text="should match"/>
  600. </compile>
  601. </ajc-test>
  602. <ajc-test dir="java5/varargs" title="Varargs with .. in pointcut" vm="1.5">
  603. <compile files="pr93356.aj" options="-1.5">
  604. <message kind="warning" line="5" text="a"/>
  605. <message kind="warning" line="5" text="b"/>
  606. <message kind="warning" line="5" text="c"/>
  607. <message kind="warning" line="5" text="d"/>
  608. <message kind="warning" line="5" text="e"/>
  609. <message kind="warning" line="5" text="k"/>
  610. <message kind="warning" line="5" text="l"/>
  611. <message kind="warning" line="4" text="f"/>
  612. <message kind="warning" line="4" text="g"/>
  613. <message kind="warning" line="4" text="h"/>
  614. <message kind="warning" line="4" text="i"/>
  615. <message kind="warning" line="4" text="j"/>
  616. <message kind="warning" line="7" text="f"/>
  617. </compile>
  618. </ajc-test>
  619. <ajc-test dir="java5/varargs" title="star varargs pattern" vm="1.5">
  620. <compile files="StarVarargsPattern.aj" options="-1.5">
  621. <message kind="warning" line="5" text="you used a varargs signature"/>
  622. <message kind="warning" line="7" text="you used a varargs signature"/>
  623. </compile>
  624. </ajc-test>
  625. <ajc-test dir="java5/annotations" title="invalid cons syntax" vm="1.5">
  626. <compile files="SyntaxError.aj" options="-1.5">
  627. <message kind="error" line="3" text="Syntax error on token &quot;new&quot;, &quot;method name (not constructor)&quot; expected"/>
  628. </compile>
  629. </ajc-test>
  630. <!-- hasmethod / hasfield tests -->
  631. <ajc-test title="declare parents : hasmethod(..) - 1" dir="hasmember">
  632. <compile files="HasMethod.aj">
  633. <message kind="error" line="5" text="the type pattern hasmethod(* print(..)) can only be used when the -XhasMember option is set"/>
  634. </compile>
  635. </ajc-test>
  636. <ajc-test title="declare parents : hasmethod(..) - 1" dir="hasmember">
  637. <compile files="HasMethod.aj" options="-XhasMember">
  638. </compile>
  639. <run class="HasMethod"></run>
  640. </ajc-test>
  641. <ajc-test title="declare parents : hasmethod(..) - 2" dir="hasmember">
  642. <compile files="HasMethodInherited.aj" options="-XhasMember">
  643. </compile>
  644. <run class="HasMethodInherited"></run>
  645. </ajc-test>
  646. <ajc-test title="declare parents : hasmethod(..) - 3" dir="hasmember">
  647. <compile files="HasPrivateMethodInherited.aj" options="-XhasMember">
  648. </compile>
  649. <run class="HasPrivateMethodInherited"></run>
  650. </ajc-test>
  651. <ajc-test title="declare parents : hasmethod(..) - 4" dir="hasmember">
  652. <compile files="HasMethodViaITD.aj" options="-XhasMember">
  653. <message kind="warning" line="15" text="hasmethod matched on ITD ok"/>
  654. </compile>
  655. </ajc-test>
  656. <ajc-test title="declare parents : hasfield(..) - 1" dir="hasmember">
  657. <compile files="HasField.aj" options="-XhasMember">
  658. </compile>
  659. <run class="HasField"></run>
  660. </ajc-test>
  661. <ajc-test title="declare parents : hasfield(..) - 2" dir="hasmember">
  662. <compile files="HasFieldInherited.aj" options="-XhasMember">
  663. </compile>
  664. <run class="HasFieldInherited"></run>
  665. </ajc-test>
  666. <ajc-test title="declare parents : hasfield(..) - 3" dir="hasmember">
  667. <compile files="HasPrivateFieldInherited.aj" options="-XhasMember">
  668. </compile>
  669. <run class="HasPrivateFieldInherited"></run>
  670. </ajc-test>
  671. <!-- Annotation binding tests -->
  672. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 1">
  673. <compile files="CallAnnBinding.aj" options="-1.5"/>
  674. <run class="CallAnnBinding"/>
  675. </ajc-test>
  676. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 2">
  677. <compile files="CallAnnBinding2.aj" options="-1.5"/>
  678. <run class="CallAnnBinding2"/>
  679. </ajc-test>
  680. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 3">
  681. <compile files="CallAnnBinding3.aj" options="-1.5"/>
  682. <run class="CallAnnBinding3"/>
  683. </ajc-test>
  684. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 4">
  685. <compile files="CallAnnBinding4.aj" options="-1.5"/>
  686. <run class="CallAnnBinding4"/>
  687. </ajc-test>
  688. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 5">
  689. <compile files="CallAnnBinding5.aj" options="-1.5"/>
  690. <run class="CallAnnBinding5"/>
  691. </ajc-test>
  692. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 6">
  693. <compile files="CallAnnBinding6.aj" options="-1.5"/>
  694. <run class="CallAnnBinding6"/>
  695. </ajc-test>
  696. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 7">
  697. <compile files="CallAnnBinding7.aj" options="-1.5"/>
  698. <run class="CallAnnBinding7"/>
  699. </ajc-test>
  700. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@target annotation binding 1">
  701. <compile files="AtTarget1.aj" options="-1.5"/>
  702. <run class="AtTarget1"/>
  703. </ajc-test>
  704. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@target annotation binding 2">
  705. <compile files="AtTarget2.aj" options="-1.5"/>
  706. <run class="AtTarget2"/>
  707. </ajc-test>
  708. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@target annotation binding 3">
  709. <compile files="AtTarget3.aj" options="-1.5"/>
  710. <run class="AtTarget3"/>
  711. </ajc-test>
  712. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@target annotation binding 4">
  713. <compile files="AtTarget4.aj" options="-1.5"/>
  714. <run class="AtTarget4"/>
  715. </ajc-test>
  716. <ajc-test dir="java5/annotations/binding/usingPackageNames" vm="1.5" title="@target annotation binding 5">
  717. <compile files="MyAspect.aj,MyAnnotation.java,MyClass.java" options="-1.5"/>
  718. <run class="test.MyClass"/>
  719. </ajc-test>
  720. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@this annotation binding 1">
  721. <compile files="AtThis1.aj" options="-1.5"/>
  722. <run class="AtThis1"/>
  723. </ajc-test>
  724. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@this annotation binding 2">
  725. <compile files="AtThis2.aj" options="-1.5"/>
  726. <run class="AtThis2"/>
  727. </ajc-test>
  728. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@this annotation binding 3">
  729. <compile files="AtThis3.aj" options="-1.5"/>
  730. <run class="AtThis3"/>
  731. </ajc-test>
  732. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@this annotation binding 4">
  733. <compile files="AtThis4.aj" options="-1.5"/>
  734. <run class="AtThis4"/>
  735. </ajc-test>
  736. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@this annotation binding 5">
  737. <compile files="AtThis5.aj" options="-1.5"/>
  738. <run class="AtThis5"/>
  739. </ajc-test>
  740. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@args annotation binding 1">
  741. <compile files="AtArgs1.aj" options="-1.5"/>
  742. <run class="AtArgs1"/>
  743. </ajc-test>
  744. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@args annotation binding 2">
  745. <compile files="AtArgs2.aj" options="-1.5"/>
  746. <run class="AtArgs2"/>
  747. </ajc-test>
  748. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@args annotation binding 3">
  749. <compile files="AtArgs3.aj" options="-1.5"/>
  750. <run class="AtArgs3"/>
  751. </ajc-test>
  752. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@args annotation binding 4">
  753. <compile files="AtArgs4.aj" options="-1.5"/>
  754. <run class="AtArgs4"/>
  755. </ajc-test>
  756. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@args annotation binding 5">
  757. <compile files="AtArgs5.aj" options="-1.5"/>
  758. <run class="AtArgs5"/>
  759. </ajc-test>
  760. <ajc-test dir="java5/annotations/binding" vm="1.5" title="execution and @annotation">
  761. <compile files="ExecutionAnnBinding1.aj" options="-1.5"/>
  762. <run class="ExecutionAnnBinding1"/>
  763. </ajc-test>
  764. <ajc-test dir="java5/annotations/binding" vm="1.5" title="set and @annotation">
  765. <compile files="FieldAnnBinding1.aj" options="-1.5"/>
  766. <run class="FieldAnnBinding1"/>
  767. </ajc-test>
  768. <ajc-test dir="java5/annotations/binding" vm="1.5" title="get and @annotation">
  769. <compile files="FieldAnnBinding2.aj" options="-1.5"/>
  770. <run class="FieldAnnBinding2"/>
  771. </ajc-test>
  772. <ajc-test dir="java5/annotations/binding" vm="1.5" title="get and @annotation with arrays">
  773. <compile files="FieldAnnBinding3.aj" options="-1.5"/>
  774. <run class="FieldAnnBinding3"/>
  775. </ajc-test>
  776. <ajc-test dir="java5/annotations/binding" vm="1.5" title="cons call and @annotation">
  777. <compile files="CtorAnnBinding1.aj" options="-1.5"/>
  778. <run class="CtorAnnBinding1"/>
  779. </ajc-test>
  780. <ajc-test dir="java5/annotations/binding" vm="1.5" title="cons exe and @annotation">
  781. <compile files="CtorAnnBinding2.aj" options="-1.5"/>
  782. <run class="CtorAnnBinding2"/>
  783. </ajc-test>
  784. <ajc-test dir="java5/annotations/binding" vm="1.5" title="staticinit and @annotation">
  785. <compile files="StaticInitBinding.aj" options="-1.5"/>
  786. <run class="StaticInitBinding"/>
  787. </ajc-test>
  788. <ajc-test dir="java5/annotations/binding" vm="1.5" title="preinit and @annotation">
  789. <compile files="PreInitBinding.aj" options="-1.5"/>
  790. <run class="PreInitBinding"/>
  791. </ajc-test>
  792. <ajc-test dir="java5/annotations/binding" vm="1.5" title="init and @annotation">
  793. <compile files="InitBinding.aj" options="-1.5"/>
  794. <run class="InitBinding"/>
  795. </ajc-test>
  796. <ajc-test dir="java5/annotations/binding" vm="1.5" title="adviceexecution and @annotation">
  797. <compile files="AdviceExecBinding.aj" options="-1.5"/>
  798. <run class="AdviceExecBinding"/>
  799. </ajc-test>
  800. <ajc-test dir="java5/annotations/binding" vm="1.5" title="handler and @annotation">
  801. <compile files="HandlerBinding.aj" options="-1.5"/>
  802. <run class="HandlerBinding"/>
  803. </ajc-test>
  804. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@withincode() and call(* println(..))">
  805. <compile files="WithinCodeBinding1.aj" options="-1.5"/>
  806. <run class="WithinCodeBinding1"/>
  807. </ajc-test>
  808. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@within">
  809. <compile files="WithinBinding1.aj" options="-1.5"/>
  810. <run class="WithinBinding1"/>
  811. </ajc-test>
  812. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@within - multiple types">
  813. <compile files="WithinBinding2.aj" options="-1.5"/>
  814. <run class="WithinBinding2"/>
  815. </ajc-test>
  816. <ajc-test dir="java5/annotations/binding/complexExample" vm="1.5" title="packages and no binding">
  817. <compile files="A.java,B.java,Color.java,X.java" options="-1.5"/>
  818. <run class="a.b.c.A"/>
  819. </ajc-test>
  820. <ajc-test dir="java5/annotations/binding/complexExample" vm="1.5" title="packages and binding">
  821. <compile files="A.java,B.java,Color.java,X2.java" options="-1.5"/>
  822. <run class="a.b.c.A"/>
  823. </ajc-test>
  824. <ajc-test dir="java5/annotations/binding" vm="1.5" title="binding with static methods">
  825. <compile files="StaticMethods.java" options="-1.5"/>
  826. <run class="StaticMethods"/>
  827. </ajc-test>
  828. <ajc-test dir="java5/annotations" vm="1.5" title="annotation matching on call">
  829. <weave classesFiles="AnnotatedType.java,SimpleAnnotation.java,SimpleAnnotation2.java"
  830. aspectsFiles="AnnotationAspect02.aj"
  831. options="-1.5,-showWeaveInfo">
  832. <message kind="weave" text="Type 'AnnotatedType' (AnnotatedType.java:3) advised by before advice from 'AnnotationAspect02' (AnnotationAspect02.aj:4)"/>
  833. <message kind="weave" text="Type 'AnnotatedType' (AnnotatedType.java:3) advised by before advice from 'AnnotationAspect02' (AnnotationAspect02.aj:2)"/>
  834. <message kind="weave" text="Type 'AnnotatedType' (AnnotatedType.java:4) advised by before advice from 'AnnotationAspect02' (AnnotationAspect02.aj:4)"/>
  835. </weave>
  836. </ajc-test>
  837. <ajc-test dir="java5/annotations" vm="1.5" title="at annotation matching">
  838. <weave classesFiles="AnnotatedType.java,SimpleAnnotation.java,SimpleAnnotation2.java"
  839. aspectsFiles="AnnotationAspect03.aj"
  840. options="-1.5,-showWeaveInfo">
  841. <message kind="warning" line="8" text="@annotation matched here"/>
  842. </weave>
  843. </ajc-test>
  844. <ajc-test dir="java5/annotations/within_code" vm="1.5" title="annotations and within(code)">
  845. <weave classesFiles="TestingAnnotations.java"
  846. aspectsFiles="WithinAndWithinCodeTests.java"
  847. options="-1.5,-showWeaveInfo">
  848. <message kind="warning" line="31" text="@within match on non-inherited annotation"/>
  849. <message kind="warning" line="39" text="@within match on non-inherited annotation"/>
  850. <message kind="warning" line="39" text="@within match on inheritable annotation"/>
  851. <message kind="warning" line="43" text="@within match on inheritable annotation"/>
  852. <message kind="warning" line="32" text="@withincode match"/>
  853. </weave>
  854. </ajc-test>
  855. <ajc-test dir="java5/annotations/within" vm="1.5" title="annotations and within">
  856. <weave classesFiles="PlainWithin.java"
  857. aspectsFiles="PlainWithinTests.java"
  858. options="-1.5,-showWeaveInfo">
  859. <message kind="warning" line="21" text="positive within match on annotation"/>
  860. <message kind="warning" line="25" text="negative within match on annotation"/>
  861. </weave>
  862. </ajc-test>
  863. <ajc-test dir="java5/annotations/thisOrtarget" vm="1.5" title="must have runtime retention">
  864. <compile options="-1.5" files="NotRuntimeRetention.aj">
  865. <message kind="error" line="20" text="Annotation type MySourceAnnotation does not have runtime retention"/>
  866. <message kind="error" line="21" text="Annotation type MyClassAnnotation does not have runtime retention"/>
  867. <message kind="error" line="22" text="Annotation type MyAnnotation does not have runtime retention"/>
  868. </compile>
  869. </ajc-test>
  870. <ajc-test dir="java5/annotations/thisOrtarget" vm="1.5" title="inheritable or not">
  871. <compile options="-1.5" files="TestingAnnotations.java,ThisOrTargetTests.aj">
  872. </compile>
  873. <run class="TestingAnnotations"/>
  874. </ajc-test>
  875. <ajc-test dir="java5/annotations/thisOrtarget" vm="1.5" title="use of @this/target in deow">
  876. <compile options="-1.5" files="TestingAnnotations.java,DeclareEoW.java">
  877. <message kind="error" line="3" text="this() pointcut designator cannot be used in declare statement"/>
  878. <message kind="error" line="5" text="target() pointcut designator cannot be used in declare statement"/>
  879. </compile>
  880. </ajc-test>
  881. <ajc-test dir="java5/annotations/args" vm="1.5" title="@args tests">
  882. <compile options="-1.5" files="TestingArgsAnnotations.java,AtArgsAspect.java">
  883. </compile>
  884. <run class="TestingArgsAnnotations"/>
  885. </ajc-test>
  886. <ajc-test dir="java5/annotations/args" vm="1.5" title="use of @args in deow">
  887. <compile options="-1.5" files="TestingArgsAnnotations.java,DeclareEoW.java">
  888. <message kind="error" line="3" text="args() pointcut designator cannot be used in declare statement"/>
  889. </compile>
  890. </ajc-test>
  891. <ajc-test dir="java5/annotations" vm="1.5" title="compiling an annotation">
  892. <compile options="-1.5" files="SimpleAnnotation.java">
  893. </compile>
  894. </ajc-test>
  895. <ajc-test dir="java5/annotations" vm="1.5" title="compiling annotated file">
  896. <compile options="-1.5" files="SimpleAnnotation.java,AnnotatedType.java">
  897. </compile>
  898. </ajc-test>
  899. <ajc-test dir="java5/annotations/within" vm="1.5" title="annotations and within (src)">
  900. <compile files="PlainWithin.java,PlainWithinTests.java"
  901. aspectsFiles="PlainWithinTests.java"
  902. options="-1.5">
  903. <message kind="warning" line="21" text="positive within match on annotation"/>
  904. <message kind="warning" line="25" text="negative within match on annotation"/>
  905. </compile>
  906. </ajc-test>
  907. <ajc-test dir="java5/annotations/attarget" vm="1.5" title="losing annotations...">
  908. <compile options="-1.5" files="Program.java,AtTargetAspect.java">
  909. </compile>
  910. </ajc-test>
  911. <ajc-test dir="java5/annotations" vm="1.5" title="no itds on annotation types">
  912. <compile files="AnnotatedType.java,SimpleAnnotation.java,SimpleAnnotation2.java,AnnotationAspect01.aj"
  913. options="-1.5">
  914. <message kind="error" line="4" text="can't make inter-type constructor declarations"/>
  915. <message kind="error" line="8" text="can't make inter-type method declarations"/>
  916. <message kind="error" line="13" text="can't make inter-type field declarations"/>
  917. </compile>
  918. </ajc-test>
  919. <ajc-test dir="java5/annotations" vm="1.5" title="no declare parents on annotation types">
  920. <compile files="AnnotatedType.java,SimpleAnnotation.java,SimpleAnnotation2.java,AnnotationAspect04.aj"
  921. options="-1.5">
  922. <message kind="error" line="7" text="can't use declare parents to alter supertype of annotation type SimpleAnnotation"/>
  923. <message kind="error" line="10" text="can't use declare parents to make 'java.lang.annotation.Annotation' the parent of type"/>
  924. <message kind="error" line="4" text="can't use declare parents to make annotation type SimpleAnnotation implement an interface"/>
  925. </compile>
  926. </ajc-test>
  927. <ajc-test dir="java5/annotations" vm="1.5" title="declare parents wildcards matching annotation types">
  928. <compile files="AnnotatedType.java,SimpleAnnotation.java,SimpleAnnotation2.java,AnnotationAspect05.aj"
  929. options="-1.5">
  930. <message kind="warning" line="4" text="annotation type SimpleAnnotation2 matches a declare parents type pattern but is being ignored"/>
  931. <message kind="warning" line="4" text="annotation type SimpleAnnotation matches a declare parents type pattern but is being ignored"/>
  932. </compile>
  933. </ajc-test>
  934. <ajc-test dir="java5/annotations/binding/complexExample" vm="1.5" title="annotated any pattern">
  935. <compile files="A.java,B.java,C.java,Color.java,X3.java"
  936. options="-1.5">
  937. </compile>
  938. <run class="g.h.i.C"/>
  939. <run class="a.b.c.A"/>
  940. </ajc-test>
  941. <ajc-test dir="java5/annotations/binding/complexExample" vm="1.5" title="annotation not imported">
  942. <compile files="A.java,B.java,C.java,Color.java,X4.java"
  943. options="-1.5">
  944. <message kind="warning" line="6" text="no match for this type name: Color"/>
  945. </compile>
  946. <run class="a.b.c.A"/>
  947. </ajc-test>
  948. <ajc-test dir="java5/annotations/itds" vm="1.5" title="annotated public itds">
  949. <compile files="AtItd2.aj" options="-1.5"/>
  950. <run class="AtItd2"/>
  951. </ajc-test>
  952. <ajc-test dir="java5/annotations/itds" vm="1.5" title="annotated public itds - values">
  953. <compile files="AtItd3.aj" options="-1.5"/>
  954. <run class="AtItd3"/>
  955. </ajc-test>
  956. <ajc-test dir="java5/annotations/itds" vm="1.5" title="annotated public itds - multiple complex annotations">
  957. <compile files="AtItd4.aj" options="-1.5"/>
  958. <run class="AtItd4"/>
  959. </ajc-test>
  960. <ajc-test dir="java5/annotations/itds" vm="1.5" title="nasty annotation and itds test">
  961. <compile files="AnnotationsAndITDs.aj" options="-1.5">
  962. <!-- first two are ITCs, second two are ITCs annotated via declare @ctor, third is default ctor -->
  963. <message kind="warning" line="17" text="execution(@SomeAnnotation ...new(..)"/>
  964. <message kind="warning" line="20" text="execution(@SomeAnnotation ...new(..)"/>
  965. <message kind="warning" line="45" text="execution(@SomeAnnotation ...new(..)"/>
  966. <message kind="warning" line="46" text="execution(@SomeAnnotation ...new(..)"/>
  967. <message kind="warning" line="180" text="execution(@SomeAnnotation ...new(..)"/>
  968. <!-- first four are fields annotated via declare, last two are directly annotated ITDs -->
  969. <message kind="warning" line="59" text="set(@SomeAnnotation...)"/>
  970. <message kind="warning" line="60" text="set(@SomeAnnotation...)"/>
  971. <message kind="warning" line="70" text="set(@SomeAnnotation...)"/>
  972. <message kind="warning" line="71" text="set(@SomeAnnotation...)"/>
  973. <message kind="warning" line="76" text="set(@SomeAnnotation...)"/>
  974. <message kind="warning" line="77" text="set(@SomeAnnotation...)"/>
  975. <!-- annotations added via declare -->
  976. <message kind="warning" line="175" text="si(@SomeAnnotation...)"/>
  977. <message kind="warning" line="180" text="si(@SomeAnnotation...)"/>
  978. <message kind="warning" line="25" text="execution(@SomeAnnotation ...)"/>
  979. <message kind="warning" line="28" text="execution(@SomeAnnotation ...)"/>
  980. <message kind="warning" line="52" text="execution(@SomeAnnotation ...)"/>
  981. <message kind="warning" line="53" text="execution(@SomeAnnotation ...)"/>
  982. <!--message kind="warning" line="70" text="set(@SomeAnnotation...)"/>
  983. <message kind="warning" line="71" text="set(@SomeAnnotation...)"/-->
  984. </compile>
  985. <run class="AnnotationsAndITDs">
  986. <stderr>
  987. <line text="@type java.lang.System (AnnotationsAndITDs.aj:0)"/>
  988. <line text="hello AnnotationsAndITDs (AnnotationsAndITDs.aj:17)"/>
  989. <line text="goodbye java.lang.String (AnnotationsAndITDs.aj:20)"/>
  990. <line text="goodbye java.lang.String (AnnotationsAndITDs.aj:20)"/>
  991. <line text="y java.lang.Integer (AnnotationsAndITDs.aj:28)"/>
  992. <line text="d java.lang.Double (AnnotationsAndITDs.aj:70)"/>
  993. <line text="f java.lang.Double (AnnotationsAndITDs.aj:71)"/>
  994. <line text="@type java.lang.System (AnnotationsAndITDs.aj:0)"/>
  995. <line text="@field ITDMe2 (AnnotationsAndITDs.aj:59)"/>
  996. <line text="@field ITDMe2 (AnnotationsAndITDs.aj:60)"/>
  997. <line text="@cons java.lang.String (AnnotationsAndITDs.aj:45)"/>
  998. <line text="@field ITDMe2 (AnnotationsAndITDs.aj:59)"/>
  999. <line text="@field ITDMe2 (AnnotationsAndITDs.aj:60)"/>
  1000. <line text="@cons java.lang.String (AnnotationsAndITDs.aj:46)"/>
  1001. <line text="@cons java.lang.String (AnnotationsAndITDs.aj:46)"/>
  1002. <line text="@method ITDMe2 (AnnotationsAndITDs.aj:53)"/>
  1003. <line text="@field ITDMe2 (AnnotationsAndITDs.aj:76)"/>
  1004. <line text="@field ITDMe2 (AnnotationsAndITDs.aj:77)"/>
  1005. <!--
  1006. <line text="method bar has 1 params, first param annotation is @ParamAnnotation"/>
  1007. -->
  1008. </stderr>
  1009. </run>
  1010. </ajc-test>
  1011. <ajc-test dir="java5/annotations/declare" pr="91858" title="declare @Type (should be @type)">
  1012. <compile files="DeathByPoorSpelling.aj" options="-1.5">
  1013. <message kind="error" line="6" text="Syntax error on token &quot;:&quot;, &quot;one of type, method, field, constructor&quot; expected"/>
  1014. </compile>
  1015. </ajc-test>
  1016. <!-- ======================================================================================= -->
  1017. <!-- Autoboxing tests -->
  1018. <!-- ======================================================================================= -->
  1019. <ajc-test dir="java5/autoboxing" vm="1.5" title="simple boxing test">
  1020. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,SimpleAutoboxingAspect.aj"
  1021. options="-1.5,-showWeaveInfo">
  1022. <message kind="weave" text="Type 'SimpleAutoboxing' (SimpleAutoboxing.java:7) advised by before advice from 'SimpleAutoboxingAspect' (SimpleAutoboxingAspect.aj:8)"/>
  1023. <message kind="weave" text="Type 'SimpleAutoboxing' (SimpleAutoboxing.java:7) advised by before advice from 'SimpleAutoboxingAspect' (SimpleAutoboxingAspect.aj:4)"/>
  1024. </compile>
  1025. <run class="SimpleAutoboxing">
  1026. <stderr>
  1027. <line text="Matching by Integer:20000"/>
  1028. <line text="Matching by int:20000"/>
  1029. <line text="method_takes_Integer=20000"/>
  1030. </stderr>
  1031. </run>
  1032. </ajc-test>
  1033. <ajc-test dir="java5/autoboxing" vm="1.5" title="integer boxing">
  1034. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectInteger.aj"
  1035. options="-1.5,-showWeaveInfo">
  1036. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:11) advised by before advice from 'AspectInteger' (AspectInteger.aj:8)"/>
  1037. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:11) advised by before advice from 'AspectInteger' (AspectInteger.aj:4)"/>
  1038. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:12) advised by before advice from 'AspectInteger' (AspectInteger.aj:8)"/>
  1039. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:12) advised by before advice from 'AspectInteger' (AspectInteger.aj:4)"/>
  1040. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:13) advised by before advice from 'AspectInteger' (AspectInteger.aj:8)"/>
  1041. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:13) advised by before advice from 'AspectInteger' (AspectInteger.aj:4)"/>
  1042. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:14) advised by before advice from 'AspectInteger' (AspectInteger.aj:8)"/>
  1043. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:14) advised by before advice from 'AspectInteger' (AspectInteger.aj:4)"/>
  1044. </compile>
  1045. <run class="AutoboxingI">
  1046. <stderr>
  1047. <line text="Matching by Integer:10000"/>
  1048. <line text="Matching by int:10000"/>
  1049. <line text="method_takes_Integer=10000"/>
  1050. <line text="Matching by Integer:20000"/>
  1051. <line text="Matching by int:20000"/>
  1052. <line text="method_takes_Integer=20000"/>
  1053. <line text="Matching by Integer:30000"/>
  1054. <line text="Matching by int:30000"/>
  1055. <line text="method_takes_int=30000"/>
  1056. <line text="Matching by Integer:40000"/>
  1057. <line text="Matching by int:40000"/>
  1058. <line text="method_takes_int=40000"/>
  1059. </stderr>
  1060. </run>
  1061. </ajc-test>
  1062. <ajc-test dir="java5/autoboxing" vm="1.5" title="char boxing">
  1063. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectChar.aj"
  1064. options="-1.5,-showWeaveInfo">
  1065. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:11) advised by before advice from 'AspectChar' (AspectChar.aj:8)"/>
  1066. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:11) advised by before advice from 'AspectChar' (AspectChar.aj:4)"/>
  1067. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:12) advised by before advice from 'AspectChar' (AspectChar.aj:8)"/>
  1068. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:12) advised by before advice from 'AspectChar' (AspectChar.aj:4)"/>
  1069. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:13) advised by before advice from 'AspectChar' (AspectChar.aj:8)"/>
  1070. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:13) advised by before advice from 'AspectChar' (AspectChar.aj:4)"/>
  1071. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:14) advised by before advice from 'AspectChar' (AspectChar.aj:8)"/>
  1072. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:14) advised by before advice from 'AspectChar' (AspectChar.aj:4)"/>
  1073. </compile>
  1074. <run class="AutoboxingC">
  1075. <stderr>
  1076. <line text="Character:1"/>
  1077. <line text="char:1"/>
  1078. <line text="method_takes_Character=1"/>
  1079. <line text="Character:2"/>
  1080. <line text="char:2"/>
  1081. <line text="method_takes_Character=2"/>
  1082. <line text="Character:3"/>
  1083. <line text="char:3"/>
  1084. <line text="method_takes_char=3"/>
  1085. <line text="Character:4"/>
  1086. <line text="char:4"/>
  1087. <line text="method_takes_char=4"/>
  1088. </stderr>
  1089. </run>
  1090. </ajc-test>
  1091. <ajc-test dir="java5/autoboxing" vm="1.5" title="double boxing">
  1092. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectDouble.aj"
  1093. options="-1.5,-showWeaveInfo">
  1094. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:11) advised by before advice from 'AspectDouble' (AspectDouble.aj:8)"/>
  1095. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:11) advised by before advice from 'AspectDouble' (AspectDouble.aj:4)"/>
  1096. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:12) advised by before advice from 'AspectDouble' (AspectDouble.aj:8)"/>
  1097. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:12) advised by before advice from 'AspectDouble' (AspectDouble.aj:4)"/>
  1098. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:13) advised by before advice from 'AspectDouble' (AspectDouble.aj:8)"/>
  1099. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:13) advised by before advice from 'AspectDouble' (AspectDouble.aj:4)"/>
  1100. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:14) advised by before advice from 'AspectDouble' (AspectDouble.aj:8)"/>
  1101. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:14) advised by before advice from 'AspectDouble' (AspectDouble.aj:4)"/>
  1102. </compile>
  1103. <run class="AutoboxingD">
  1104. <stderr>
  1105. <line text="Double:100.0"/>
  1106. <line text="double:100.0"/>
  1107. <line text="method_takes_Double=100.0"/>
  1108. <line text="Double:200.0"/>
  1109. <line text="double:200.0"/>
  1110. <line text="method_takes_Double=200.0"/>
  1111. <line text="Double:300.0"/>
  1112. <line text="double:300.0"/>
  1113. <line text="method_takes_double=300.0"/>
  1114. <line text="Double:400.0"/>
  1115. <line text="double:400.0"/>
  1116. <line text="method_takes_double=400.0"/>
  1117. </stderr>
  1118. </run>
  1119. </ajc-test>
  1120. <ajc-test dir="java5/autoboxing" vm="1.5" title="float boxing">
  1121. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectFloat.aj"
  1122. options="-1.5,-showWeaveInfo">
  1123. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:11) advised by before advice from 'AspectFloat' (AspectFloat.aj:8)"/>
  1124. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:11) advised by before advice from 'AspectFloat' (AspectFloat.aj:4)"/>
  1125. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:12) advised by before advice from 'AspectFloat' (AspectFloat.aj:8)"/>
  1126. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:12) advised by before advice from 'AspectFloat' (AspectFloat.aj:4)"/>
  1127. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:13) advised by before advice from 'AspectFloat' (AspectFloat.aj:8)"/>
  1128. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:13) advised by before advice from 'AspectFloat' (AspectFloat.aj:4)"/>
  1129. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:14) advised by before advice from 'AspectFloat' (AspectFloat.aj:8)"/>
  1130. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:14) advised by before advice from 'AspectFloat' (AspectFloat.aj:4)"/>
  1131. </compile>
  1132. <run class="AutoboxingF">
  1133. <stderr>
  1134. <line text="Float:100.0"/>
  1135. <line text="float:100.0"/>
  1136. <line text="method_takes_Float=100.0"/>
  1137. <line text="Float:200.0"/>
  1138. <line text="float:200.0"/>
  1139. <line text="method_takes_Float=200.0"/>
  1140. <line text="Float:300.0"/>
  1141. <line text="float:300.0"/>
  1142. <line text="method_takes_float=300.0"/>
  1143. <line text="Float:400.0"/>
  1144. <line text="float:400.0"/>
  1145. <line text="method_takes_float=400.0"/>
  1146. </stderr>
  1147. </run>
  1148. </ajc-test>
  1149. <ajc-test dir="java5/autoboxing" vm="1.5" title="short boxing">
  1150. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectShort.aj"
  1151. options="-1.5,-showWeaveInfo">
  1152. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:11) advised by before advice from 'AspectShort' (AspectShort.aj:8)"/>
  1153. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:11) advised by before advice from 'AspectShort' (AspectShort.aj:4)"/>
  1154. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:12) advised by before advice from 'AspectShort' (AspectShort.aj:8)"/>
  1155. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:12) advised by before advice from 'AspectShort' (AspectShort.aj:4)"/>
  1156. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:13) advised by before advice from 'AspectShort' (AspectShort.aj:8)"/>
  1157. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:13) advised by before advice from 'AspectShort' (AspectShort.aj:4)"/>
  1158. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:14) advised by before advice from 'AspectShort' (AspectShort.aj:8)"/>
  1159. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:14) advised by before advice from 'AspectShort' (AspectShort.aj:4)"/>
  1160. </compile>
  1161. <run class="AutoboxingS">
  1162. <stderr>
  1163. <line text="Short:100"/>
  1164. <line text="short:100"/>
  1165. <line text="method_takes_Short=100"/>
  1166. <line text="Short:200"/>
  1167. <line text="short:200"/>
  1168. <line text="method_takes_Short=200"/>
  1169. <line text="Short:300"/>
  1170. <line text="short:300"/>
  1171. <line text="method_takes_short=300"/>
  1172. <line text="Short:400"/>
  1173. <line text="short:400"/>
  1174. <line text="method_takes_short=400"/>
  1175. </stderr>
  1176. </run>
  1177. </ajc-test>
  1178. <ajc-test dir="java5/autoboxing" vm="1.5" title="long boxing">
  1179. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectLong.aj"
  1180. options="-1.5,-showWeaveInfo">
  1181. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:11) advised by before advice from 'AspectLong' (AspectLong.aj:8)"/>
  1182. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:11) advised by before advice from 'AspectLong' (AspectLong.aj:4)"/>
  1183. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:12) advised by before advice from 'AspectLong' (AspectLong.aj:8)"/>
  1184. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:12) advised by before advice from 'AspectLong' (AspectLong.aj:4)"/>
  1185. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:13) advised by before advice from 'AspectLong' (AspectLong.aj:8)"/>
  1186. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:13) advised by before advice from 'AspectLong' (AspectLong.aj:4)"/>
  1187. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:14) advised by before advice from 'AspectLong' (AspectLong.aj:8)"/>
  1188. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:14) advised by before advice from 'AspectLong' (AspectLong.aj:4)"/>
  1189. </compile>
  1190. <run class="AutoboxingJ">
  1191. <stderr>
  1192. <line text="Long:1000000"/>
  1193. <line text="long:1000000"/>
  1194. <line text="method_takes_Long=1000000"/>
  1195. <line text="Long:2000000"/>
  1196. <line text="long:2000000"/>
  1197. <line text="method_takes_Long=2000000"/>
  1198. <line text="Long:3000000"/>
  1199. <line text="long:3000000"/>
  1200. <line text="method_takes_long=3000000"/>
  1201. <line text="Long:4000000"/>
  1202. <line text="long:4000000"/>
  1203. <line text="method_takes_long=4000000"/>
  1204. </stderr>
  1205. </run>
  1206. </ajc-test>
  1207. <ajc-test dir="java5/autoboxing" vm="1.5" title="boolean boxing">
  1208. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectBoolean.aj"
  1209. options="-1.5,-showWeaveInfo">
  1210. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:9) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:8)"/>
  1211. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:9) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:4)"/>
  1212. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:10) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:8)"/>
  1213. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:10) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:4)"/>
  1214. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:11) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:8)"/>
  1215. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:11) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:4)"/>
  1216. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:12) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:8)"/>
  1217. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:12) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:4)"/>
  1218. </compile>
  1219. <run class="AutoboxingZ">
  1220. <stderr>
  1221. <line text="Boolean:false"/>
  1222. <line text="boolean:false"/>
  1223. <line text="method_takes_Boolean=false"/>
  1224. <line text="Boolean:false"/>
  1225. <line text="boolean:false"/>
  1226. <line text="method_takes_Boolean=false"/>
  1227. <line text="Boolean:false"/>
  1228. <line text="boolean:false"/>
  1229. <line text="method_takes_boolean=false"/>
  1230. <line text="Boolean:false"/>
  1231. <line text="boolean:false"/>
  1232. <line text="method_takes_boolean=false"/>
  1233. </stderr>
  1234. </run>
  1235. </ajc-test>
  1236. <ajc-test dir="java5/autoboxing" vm="1.5" title="byte boxing">
  1237. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectByte.aj"
  1238. options="-1.5,-showWeaveInfo">
  1239. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:11) advised by before advice from 'AspectByte' (AspectByte.aj:8)"/>
  1240. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:11) advised by before advice from 'AspectByte' (AspectByte.aj:4)"/>
  1241. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:12) advised by before advice from 'AspectByte' (AspectByte.aj:8)"/>
  1242. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:12) advised by before advice from 'AspectByte' (AspectByte.aj:4)"/>
  1243. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:13) advised by before advice from 'AspectByte' (AspectByte.aj:8)"/>
  1244. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:13) advised by before advice from 'AspectByte' (AspectByte.aj:4)"/>
  1245. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:14) advised by before advice from 'AspectByte' (AspectByte.aj:8)"/>
  1246. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:14) advised by before advice from 'AspectByte' (AspectByte.aj:4)"/>
  1247. </compile>
  1248. <run class="AutoboxingB">
  1249. <stderr>
  1250. <line text="Byte:1"/>
  1251. <line text="byte:1"/>
  1252. <line text="method_takes_Byte=1"/>
  1253. <line text="Byte:50"/>
  1254. <line text="byte:50"/>
  1255. <line text="method_takes_Byte=50"/>
  1256. <line text="Byte:3"/>
  1257. <line text="byte:3"/>
  1258. <line text="method_takes_byte=3"/>
  1259. <line text="Byte:52"/>
  1260. <line text="byte:52"/>
  1261. <line text="method_takes_byte=52"/>
  1262. </stderr>
  1263. </run>
  1264. </ajc-test>
  1265. <ajc-test dir="java5/autoboxing" vm="1.5" title="boxing in after returning">
  1266. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectAfterReturning.aj"
  1267. options="-1.5,-showWeaveInfo">
  1268. <message kind="weave" text="Type 'AspectAfterReturning' (AspectAfterReturning.aj:18) advised by afterReturning advice from 'AspectAfterReturning' (AspectAfterReturning.aj:4)"/>
  1269. <message kind="weave" text="Type 'AspectAfterReturning' (AspectAfterReturning.aj:18) advised by afterReturning advice from 'AspectAfterReturning' (AspectAfterReturning.aj:8)"/>
  1270. <message kind="weave" text="Type 'AspectAfterReturning' (AspectAfterReturning.aj:18) advised by afterReturning advice from 'AspectAfterReturning' (AspectAfterReturning.aj:12)"/>
  1271. <message kind="weave" text="Type 'AspectAfterReturning' (AspectAfterReturning.aj:19) advised by afterReturning advice from 'AspectAfterReturning' (AspectAfterReturning.aj:4)"/>
  1272. <message kind="weave" text="Type 'AspectAfterReturning' (AspectAfterReturning.aj:19) advised by afterReturning advice from 'AspectAfterReturning' (AspectAfterReturning.aj:8)"/>
  1273. <message kind="weave" text="Type 'AspectAfterReturning' (AspectAfterReturning.aj:19) advised by afterReturning advice from 'AspectAfterReturning' (AspectAfterReturning.aj:12)"/>
  1274. </compile>
  1275. <run class="AspectAfterReturning">
  1276. <stderr>
  1277. <line text="Returning I=5"/>
  1278. <line text="Returning Integer=5"/>
  1279. <line text="Returning Object=5"/>
  1280. <line text="Returning I=10"/>
  1281. <line text="Returning Integer=10"/>
  1282. <line text="Returning Object=10"/>
  1283. </stderr>
  1284. </run>
  1285. </ajc-test>
  1286. <!-- ======================================================================================= -->
  1287. <!-- Covariance tests -->
  1288. <!-- ======================================================================================= -->
  1289. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 1">
  1290. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect01.aj">
  1291. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:26) advised by before advice from 'CovAspect01' (CovAspect01.aj:5)"/>
  1292. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect01' (CovAspect01.aj:5)"/>
  1293. </compile>
  1294. </ajc-test>
  1295. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 2">
  1296. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect02.aj">
  1297. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:26) advised by before advice from 'CovAspect02' (CovAspect02.aj:5)"/>
  1298. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect02' (CovAspect02.aj:5)"/>
  1299. </compile>
  1300. </ajc-test>
  1301. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 3">
  1302. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect03.aj">
  1303. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:26) advised by before advice from 'CovAspect03' (CovAspect03.aj:5)"/>
  1304. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect03' (CovAspect03.aj:5)"/>
  1305. </compile>
  1306. </ajc-test>
  1307. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 4">
  1308. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram02.java,CovAspect04.aj">
  1309. <message kind="weave" text="Type 'CovBaseProgram02' (CovBaseProgram02.java:30) advised by before advice from 'CovAspect04' (CovAspect04.aj:5)"/>
  1310. </compile>
  1311. </ajc-test>
  1312. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 5">
  1313. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect05.aj">
  1314. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:26) advised by before advice from 'CovAspect05' (CovAspect05.aj:5)"/>
  1315. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect05' (CovAspect05.aj:5)"/>
  1316. </compile>
  1317. </ajc-test>
  1318. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 6">
  1319. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect06.aj">
  1320. <message kind="warning" line="3" text="does not match because declaring type is Super"/>
  1321. </compile>
  1322. </ajc-test>
  1323. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 7">
  1324. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect07.aj">
  1325. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect07' (CovAspect07.aj:5)"/>
  1326. <message kind="warning" line="3" text="does not match because declaring type is Super"/>
  1327. </compile>
  1328. </ajc-test>
  1329. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 8">
  1330. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect08.aj">
  1331. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect08' (CovAspect08.aj:11)"/>
  1332. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect08' (CovAspect08.aj:5)"/>
  1333. </compile>
  1334. </ajc-test>
  1335. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 9">
  1336. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect09.aj">
  1337. </compile>
  1338. </ajc-test>
  1339. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 10">
  1340. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect10.aj">
  1341. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:26) advised by before advice from 'CovAspect10' (CovAspect10.aj:5)"/>
  1342. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect10' (CovAspect10.aj:5)"/>
  1343. </compile>
  1344. </ajc-test>
  1345. <!-- ======================================================================================= -->
  1346. <!-- Enum tests -->
  1347. <!-- ======================================================================================= -->
  1348. <ajc-test dir="java5/enums" vm="1.5" title="cant itd constructor on enum">
  1349. <compile files="SimpleEnum.java,SimpleEnum2.java,EnumAspect01.aj" options="-1.5">
  1350. <message kind="error" line="2" text="can't make inter-type constructor declarations on enum types"/>
  1351. </compile>
  1352. </ajc-test>
  1353. <ajc-test dir="java5/enums" vm="1.5" title="cant itd field or method on enum">
  1354. <compile files="SimpleEnum.java,SimpleEnum2.java,EnumAspect02.aj" options="-1.5">
  1355. <message kind="error" line="2" text="can't make inter-type method declarations on enum types"/>
  1356. <message kind="error" line="6" text="can't make inter-type field declarations on enum types"/>
  1357. </compile>
  1358. </ajc-test>
  1359. <ajc-test dir="java5/enums" vm="1.5" title="declare parents and enums">
  1360. <compile files="SimpleEnum.java,SimpleEnum2.java,EnumAspect03.aj" options="-1.5">
  1361. <message kind="error" line="5" text="can't use declare parents to make enum type SimpleEnum implement an interface"/>
  1362. <message kind="error" line="8" text="can't use declare parents to alter supertype of enum type SimpleEnum"/>
  1363. <message kind="error" line="11" text="can't use declare parents to make 'java.lang.Enum' the parent of type EnumAspect03$D"/>
  1364. </compile>
  1365. </ajc-test>
  1366. <ajc-test dir="java5/enums" vm="1.5" title="wildcard enum match in itd">
  1367. <compile files="SimpleEnum.java,SimpleEnum2.java,EnumAspect04.aj" options="-1.5">
  1368. <message kind="warning" line="5" text="enum type SimpleEnum2 matches a declare parents type pattern but is being ignored"/>
  1369. <message kind="warning" line="5" text="enum type SimpleEnum matches a declare parents type pattern but is being ignored"/>
  1370. </compile>
  1371. </ajc-test>
  1372. <!-- ======================================================================================= -->
  1373. <!-- pertypewithin tests -->
  1374. <!-- ======================================================================================= -->
  1375. <ajc-test dir="java5/pertypewithin" title="basic ptw test">
  1376. <compile files="A.java,B.java,C.java,D.java,Main.java,X.java"/>
  1377. <run class="p.A">
  1378. <stderr>
  1379. <line text="hi from A"/>
  1380. <line text="after() returning from a method call to sayhi()"/>
  1381. <line text="hi from A"/>
  1382. <line text="after() returning from a method call to sayhi()"/>
  1383. <line text="Tests in A have passed"/>
  1384. <line text="callcount = 2"/>
  1385. </stderr>
  1386. </run>
  1387. </ajc-test>
  1388. <ajc-test dir="java5/pertypewithin" title="ptw hasAspect">
  1389. <compile files="A.java,B.java,C.java,D.java,Main.java,X.java"/>
  1390. <run class="p.B">
  1391. <stderr>
  1392. <line text="hi from B"/>
  1393. <line text="after() returning from a method call to sayhi()"/>
  1394. <line text="hi from B"/>
  1395. <line text="after() returning from a method call to sayhi()"/>
  1396. <line text="hi from B"/>
  1397. <line text="after() returning from a method call to sayhi()"/>
  1398. <line text="callcount = 3"/>
  1399. </stderr>
  1400. </run>
  1401. </ajc-test>
  1402. <ajc-test dir="java5/pertypewithin" title="ptw aspectOf">
  1403. <compile files="A.java,B.java,C.java,D.java,Main.java,X.java"/>
  1404. <run class="p.C"/>
  1405. </ajc-test>
  1406. <ajc-test dir="java5/pertypewithin" title="ptw multi-aspects">
  1407. <compile files="P.java,Q.java,R.java"/>
  1408. <run class="P">
  1409. <stderr>
  1410. <line text="Q reporting 2"/>
  1411. <line text="R reporting 3"/>
  1412. </stderr>
  1413. </run>
  1414. </ajc-test>
  1415. <ajc-test dir="java5/pertypewithin" title="ptw binary">
  1416. <weave classesFiles="G.java" aspectsFiles="H.java"/>
  1417. <run class="G">
  1418. <stderr>
  1419. <line text="advice running"/>
  1420. </stderr>
  1421. </run>
  1422. </ajc-test>
  1423. <ajc-test dir="java5/pertypewithin" title="ptw binary aspect">
  1424. <compile files="H.java" outjar="aspects.jar">
  1425. <message kind="warning" line="1" text="no match for this type name: G"/>
  1426. </compile>
  1427. <compile files="G.java" aspectpath="aspects.jar"/>
  1428. <run class="G">
  1429. <stderr>
  1430. <line text="advice running"/>
  1431. </stderr>
  1432. </run>
  1433. </ajc-test>
  1434. <!-- ======================================================================================= -->
  1435. <!-- varargs tests -->
  1436. <!-- ======================================================================================= -->
  1437. <ajc-test dir="java5/varargs" vm="1.5" title="varargs not matched by Object[] (call)">
  1438. <compile files="SimpleVarargs.java,VarargsAspect01.aj" options="-1.5,-showWeaveInfo">
  1439. </compile>
  1440. </ajc-test>
  1441. <ajc-test dir="java5/varargs" vm="1.5" title="varargs not matched by Object[] (exe)">
  1442. <compile files="SimpleVarargs.java,VarargsAspect02.aj" options="-1.5,-showWeaveInfo">
  1443. </compile>
  1444. </ajc-test>
  1445. <ajc-test dir="java5/varargs" vm="1.5" title="varargs not matched by Object[] (init)">
  1446. <compile files="SimpleVarargs.java,VarargsAspect03.aj" options="-1.5,-showWeaveInfo">
  1447. </compile>
  1448. </ajc-test>
  1449. <ajc-test dir="java5/varargs" vm="1.5" title="varargs not matched by Object[] (withincode)">
  1450. <compile files="SimpleVarargs.java,VarargsAspect04.aj" options="-1.5,-showWeaveInfo">
  1451. </compile>
  1452. </ajc-test>
  1453. <ajc-test dir="java5/varargs" vm="1.5" title="call with varargs signature">
  1454. <compile files="SimpleVarargs.java,VarargsAspect05.aj" options="-1.5,-showWeaveInfo">
  1455. <message kind="weave" text="Type 'SimpleVarargs' (SimpleVarargs.java:20) advised by before advice from 'VarargsAspect05' (VarargsAspect05.aj:3)"/>
  1456. <message kind="weave" text="Type 'SimpleVarargs' (SimpleVarargs.java:21) advised by before advice from 'VarargsAspect05' (VarargsAspect05.aj:3)"/>
  1457. <message kind="weave" text="Type 'SimpleVarargs' (SimpleVarargs.java:22) advised by before advice from 'VarargsAspect05' (VarargsAspect05.aj:3)"/>
  1458. </compile>
  1459. </ajc-test>
  1460. <ajc-test dir="java5/varargs" vm="1.5" title="call with varargs multi-signature">
  1461. <compile files="SimpleVarargs.java,VarargsAspect06.aj" options="-1.5,-showWeaveInfo">
  1462. <message kind="weave" text="Type 'SimpleVarargs' (SimpleVarargs.java:25) advised by before advice from 'VarargsAspect06' (VarargsAspect06.aj:3)"/>
  1463. <message kind="weave" text="Type 'SimpleVarargs' (SimpleVarargs.java:26) advised by before advice from 'VarargsAspect06' (VarargsAspect06.aj:3)"/>
  1464. <message kind="weave" text="Type 'SimpleVarargs' (SimpleVarargs.java:27) advised by before advice from 'VarargsAspect06' (VarargsAspect06.aj:3)"/>
  1465. </compile>
  1466. </ajc-test>
  1467. <ajc-test dir="java5/suppressedWarnings" vm="1.5" title="suppressing non-matching advice warnings">
  1468. <compile files="Suppression1.aj" options="-1.5,-showWeaveInfo">
  1469. <message kind="warning" line="13"/>
  1470. <message kind="warning" line="21"/>
  1471. </compile>
  1472. </ajc-test>
  1473. <ajc-test dir="java5/suppressedWarnings" vm="1.5" title="suppressing non-matching advice warnings when multiple source files involved">
  1474. <compile files="A.java,A1.aj,A2.aj,A3.aj" options="-1.5,-showWeaveInfo">
  1475. <message kind="warning" line="4" file="A1.aj"/>
  1476. <message kind="warning" line="4" file="A2.aj"/>
  1477. <message kind="warning" line="11" file="A2.aj"/>
  1478. <message kind="warning" line="4" file="A3.aj"/>
  1479. <message kind="warning" line="11" file="A3.aj"/>
  1480. </compile>
  1481. </ajc-test>
  1482. <ajc-test dir="bugs150" title="XLint warning for advice not applied with cflow(execution)" pr="93345">
  1483. <compile options="-Xlint,-1.5" files="PR93345.aj" >
  1484. <message kind="warning" line="7" text="advice defined in AnAspect has not been applied [Xlint:adviceDidNotMatch]"/>
  1485. </compile>
  1486. </ajc-test>
  1487. <ajc-test dir="bugs150" title="NPE in reflect implementation" pr="94167">
  1488. <compile files="PR94167.java"/>
  1489. <run class="reflect.PR94167"/>
  1490. </ajc-test>
  1491. <!-- ======================================================================================= -->
  1492. <!-- annotated aspect members -->
  1493. <!-- ======================================================================================= -->
  1494. <ajc-test dir="java5/annotations/aspectMembers" title="annotated annotations (@Target)">
  1495. <compile files="a/Annotations.java,a/Foo.java" options="-1.5">
  1496. <message kind="error" line="16" text="The annotation @MethodAnnotation is disallowed for this location"/>
  1497. </compile>
  1498. </ajc-test>
  1499. <ajc-test dir="java5/annotations/aspectMembers" title="simple annotated aspect members">
  1500. <compile files="a/Annotations.java,a/AnnotatedAspect.aj" options="-1.5">
  1501. <message kind="warning" line="4" text="annotated type"/>
  1502. <message kind="warning" line="6" text="annotated field"/>
  1503. <message kind="warning" line="8" text="annotated method"/>
  1504. <message kind="warning" line="11" text="annotated constructor"/>
  1505. </compile>
  1506. </ajc-test>
  1507. <ajc-test dir="java5/annotations/aspectMembers" title="simple annotated aspect members with bad target">
  1508. <compile files="a/Annotations.java,a/AnnotatedAspect02.aj" options="-1.5">
  1509. <message kind="error" line="3" text="The annotation @MethodAnnotation is disallowed for this location"/>
  1510. <message kind="error" line="6" text="The annotation @TypeAnnotation is disallowed for this location"/>
  1511. <message kind="error" line="8" text="The annotation @FieldAnnotation is disallowed for this location"/>
  1512. <message kind="error" line="10" text="The annotation @AnnotationAnnotation is disallowed for this location"/>
  1513. </compile>
  1514. </ajc-test>
  1515. <ajc-test dir="java5/annotations/aspectMembers" title="annotated itds">
  1516. <compile files="a/Annotations.java,a/AnnotatedAspect03.aj" options="-1.5">
  1517. <message kind="warning" line="4" text="annotated type"/>
  1518. <message kind="warning" line="6" text="annotated field"/>
  1519. <message kind="warning" line="8" text="annotated field"/>
  1520. <message kind="warning" line="10" text="annotated method"/>
  1521. <message kind="warning" line="12" text="annotated constructor"/>
  1522. <message kind="warning" line="12" text="annotated field"/>
  1523. </compile>
  1524. </ajc-test>
  1525. <ajc-test dir="java5/annotations/aspectMembers" title="annotated itds with bad target">
  1526. <compile files="a/Annotations.java,a/AnnotatedAspect04.aj" options="-1.5">
  1527. <message kind="error" line="6" text="The annotation @ConstructorAnnotation is disallowed for this location"/>
  1528. <message kind="error" line="8" text="The annotation @FieldAnnotation is disallowed for this location"/>
  1529. <message kind="error" line="10" text="The annotation @TypeAnnotation is disallowed for this location"/>
  1530. <!-- known limitation...
  1531. <message kind="error" line="12" text="The annotation @MethodAnnotation is disallowed for this location"/>
  1532. -->
  1533. </compile>
  1534. </ajc-test>
  1535. <ajc-test dir="java5/annotations/aspectMembers" title="annotated advice">
  1536. <compile files="a/Annotations.java,a/AnnotatedAspect05.aj" options="-1.5">
  1537. <message kind="warning" line="17"/>
  1538. </compile>
  1539. <run class="a.AnnotatedAspect05"/>
  1540. </ajc-test>
  1541. <ajc-test dir="java5/annotations/aspectMembers" title="annotated advice with bad target">
  1542. <compile files="a/Annotations.java,a/AnnotatedAspect06.aj" options="-1.5">
  1543. <message kind="error" line="6" text="The annotation @ConstructorAnnotation is disallowed for this location"/>
  1544. </compile>
  1545. </ajc-test>
  1546. <ajc-test dir="java5/annotations/aspectMembers" title="annotated pointcut">
  1547. <compile files="a/Annotations.java,a/AnnotatedAspect07.aj" options="-1.5">
  1548. </compile>
  1549. </ajc-test>
  1550. <ajc-test dir="java5/annotations/aspectMembers" title="annotated declare statements">
  1551. <compile files="a/Annotations.java,a/AnnotatedAspect08.aj" options="-1.5">
  1552. </compile>
  1553. </ajc-test>
  1554. <!-- ======================================================================================= -->
  1555. <!-- ajdk examples -->
  1556. <!-- ======================================================================================= -->
  1557. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: annotating aspects chapter">
  1558. <compile files="AnnotatingAspects.aj" options="-1.5">
  1559. </compile>
  1560. </ajc-test>
  1561. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: annotating aspects chapter, ex 2">
  1562. <compile files="SuppressAj.aj" options="-1.5">
  1563. </compile>
  1564. </ajc-test>
  1565. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: annotation pattern matching">
  1566. <compile files="AnnotationPatternMatching.aj,org/xyz/OrgXYZAnnotation.java" options="-1.5">
  1567. <message kind="warning" line="25" text="@Immutable"/>
  1568. <message kind="warning" line="25" text="!@Persistent"/>
  1569. <message kind="warning" line="29" text="!@Persistent"/>
  1570. <message kind="warning" line="31" text="!@Persistent"/>
  1571. <message kind="warning" line="33" text="!@Persistent"/>
  1572. <message kind="warning" line="29" text="@Foo @Goo"/>
  1573. <message kind="warning" line="29" text="@(Foo || Goo)"/>
  1574. <message kind="warning" line="31" text="@(Foo || Goo)"/>
  1575. <message kind="warning" line="33" text="@(org.xyz..*)"/>
  1576. </compile>
  1577. </ajc-test>
  1578. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: annotation type pattern matching">
  1579. <compile files="AnnotationsInTypePatterns.aj,org/xyz/OrgXYZAnnotation.java,org/xyz/Types.java,org/abc/Types.java,anns/Immutable.java,anns/NonPersistent.java" options="-1.5">
  1580. <message kind="warning" line="23" text="(@Immutable *)"/>
  1581. <message kind="warning" line="32" text="(@Immutable *)"/>
  1582. <message kind="warning" line="3" text="(@Immutable *)"/>
  1583. <message kind="warning" line="5" text="(@Immutable *)"/>
  1584. <message kind="warning" line="8" text="(@Immutable *)"/>
  1585. <message kind="warning" line="25" text="(!@Immutable *)"/>
  1586. <message kind="warning" line="27" text="(!@Immutable *)"/>
  1587. <message kind="warning" line="29" text="(!@Immutable *)"/>
  1588. <message kind="warning" line="5" text="(!@Immutable *)"/>
  1589. <message kind="warning" line="6" text="(!@Immutable *)"/>
  1590. <message kind="warning" line="2" text="(!@Immutable *)"/>
  1591. <message kind="warning" line="2" text="(!@Immutable *)"/>
  1592. <message kind="warning" line="5" text="(!@Immutable *)"/>
  1593. <message kind="warning" line="3" text="@Immutable (org.xyz.* || org.abc.*)"/>
  1594. <message kind="warning" line="5" text="@Immutable (org.xyz.* || org.abc.*)"/>
  1595. <message kind="warning" line="8" text="@Immutable (org.xyz.* || org.abc.*)"/>
  1596. <message kind="warning" line="32" text="((@Immutable Foo+) || Goo)"/>
  1597. <message kind="warning" line="27" text="((@Immutable Foo+) || Goo)"/>
  1598. <message kind="warning" line="3" text="@(Immutable || NonPersistent) org.xyz..*"/>
  1599. <message kind="warning" line="6" text="@(Immutable || NonPersistent) org.xyz..*"/>
  1600. <message kind="warning" line="8" text="@(Immutable || NonPersistent) org.xyz..*"/>
  1601. <message kind="warning" line="8" text="@Immutable @NonPersistent org.xyz..*"/>
  1602. <message kind="warning" line="6" text="@(@Inherited *) org.xyz..*"/>
  1603. <message kind="warning" line="8" text="@(@Inherited *) org.xyz..*"/>
  1604. </compile>
  1605. </ajc-test>
  1606. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: annotations in sig patterns">
  1607. <compile files="AnnotationsInSignaturePatterns.aj,anns/Cachable.java,anns/SensitiveData.java,anns/Persisted.java,Classified.java,anns/Immutable.java,Secure.java,Catastrophic.java,Oneway.java,anns/Transaction.java,org/xyz/SignatureTypes.java" options="-1.5">
  1608. <message kind="warning" line="32" text="@SensitiveData * *"/>
  1609. <message kind="warning" line="7" text="@SensitiveData * *"/>
  1610. <message kind="warning" line="13" text="@SensitiveData * *"/>
  1611. <message kind="warning" line="7" text="@SensitiveData List org.xyz..*.*"/>
  1612. <message kind="warning" line="11" text="(@SensitiveData *) org.xyz..*.*"/>
  1613. <message kind="warning" line="13" text="(@SensitiveData *) org.xyz..*.*"/>
  1614. <message kind="warning" line="50" text="@Foo (@Goo *) (@Hoo *).*"/>
  1615. <message kind="warning" line="38" text="@Persisted @Classified * *"/>
  1616. <message kind="warning" line="44" text="@Oneway * *(..)"/>
  1617. <message kind="warning" line="18" text="@Transaction * (@Persisted org.xyz..*).*(..)"/>
  1618. <message kind="warning" line="52" text="* *.*(@Immutable *,..)"/>
  1619. <message kind="warning" line="53" text="* *.*(@Immutable *,..)"/>
  1620. <message kind="warning" line="54" text="* *.*(@Immutable *,..)"/>
  1621. <message kind="warning" line="62" text="within(@Secure *)"/>
  1622. <message kind="warning" line="63" text="within(@Secure *)"/>
  1623. <message kind="warning" line="66" text="staticinitialization(@Persisted *)"/>
  1624. <message kind="warning" line="17" text="staticinitialization(@Persisted *)"/>
  1625. <message kind="warning" line="56" text="call(@Oneway * *(..))"/>
  1626. <message kind="warning" line="28" text="execution(public (@Immutable *) org.xyz..*.*(..))"/>
  1627. <message kind="warning" line="26" text="set(@Cachable * *)"/>
  1628. <message kind="warning" line="80" text="handler(!@Catastrophic *)"/>
  1629. </compile>
  1630. </ajc-test>
  1631. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: runtime annotations">
  1632. <compile files="RuntimeTypeMatching.aj" options="-1.5">
  1633. <message kind="warning" line="121" text="@within(Foo)"/>
  1634. <message kind="warning" line="122" text="@within(Foo)"/>
  1635. </compile>
  1636. <run class="RuntimeTypeMatching">
  1637. <stdout>
  1638. <line text="This information is TOP-SECRET"/>
  1639. <line text="@target(Classified) at call(void A.a())"/>
  1640. <line text="@this(Foo) at execution(void B.b())"/>
  1641. <line text="Classified data being passed at call(void B.callA(A))"/>
  1642. <line text="Classified data being passed at execution(void B.callA(A))"/>
  1643. <line text="This information is TOP-SECRET"/>
  1644. <line text="@target(Classified) at call(Class java.lang.Object.getClass())"/>
  1645. <line text="1 @Foo()"/>
  1646. <line text="1 @Foo()"/>
  1647. <line text="1 @Classified(classification=TOP-SECRET)"/>
  1648. <line text="This information is TOP-SECRET"/>
  1649. <line text="Entering critical join point with priority 3"/>
  1650. <line text="Entering critical join point with reflectively obtained priority 3"/>
  1651. <line text="@target(Classified) at call(void A.a())"/>
  1652. <line text="@this(Foo) at execution(void B.callA(A))"/>
  1653. <line text="(Class) Transaction required at execution(void ByeByeEJB.method1())"/>
  1654. <line text="(Method) Transaction required at execution(void ByeByeEJB.method1())"/>
  1655. <line text="(Class) Transaction required at execution(void ByeByeEJB.method2())"/>
  1656. <line text="(Method) Transaction required at execution(void ByeByeEJB.method2())"/>
  1657. <line text="(Class) Transaction required at execution(void ByeByeEJB.method3())"/>
  1658. </stdout>
  1659. </run>
  1660. </ajc-test>
  1661. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: @retention checking">
  1662. <compile files="RetentionTime.aj" options="-1.5">
  1663. <message kind="error" line="8" text="Annotation type Goo does not have runtime retention"/>
  1664. <message kind="error" line="13" text="Annotation type Goo does not have runtime retention"/>
  1665. <message kind="error" line="18" text="Annotation type Goo does not have runtime retention"/>
  1666. </compile>
  1667. </ajc-test>
  1668. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: @inherited">
  1669. <compile files="AnnotationInheritance.aj" options="-1.5">
  1670. <message kind="warning" line="16" text="annotatedMethodCall()"/>
  1671. <message kind="warning" line="17" text="annotatedMethodCall()"/>
  1672. </compile>
  1673. </ajc-test>
  1674. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: deow-ann">
  1675. <compile files="DeclaresWithAnnotations.aj,org/xyz/model/Model.java" options="-1.5">
  1676. <message kind="warning" line="27" text="Expensive operation called from within performance critical section"/>
  1677. <message kind="error" line="26" text="Untrusted code should not call the model classes directly"/>
  1678. </compile>
  1679. </ajc-test>
  1680. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: decp-ann">
  1681. <compile files="DecpAnnotations.aj" options="-1.5">
  1682. </compile>
  1683. <run class="DecpAnnotations">
  1684. <stdout>
  1685. <line text="Test Foo is not secured: PASS"/>
  1686. <line text="Test Goo is secured: PASS"/>
  1687. <line text="goo credentials: none"/>
  1688. <line text="Test BankAccount is not secured: PASS"/>
  1689. <line text="Test PrivateBankAccount is not secured: PASS"/>
  1690. <line text="Test BusinessBankAccount is secured: PASS"/>
  1691. </stdout>
  1692. </run>
  1693. </ajc-test>
  1694. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: dec precedence">
  1695. <compile files="PrecedenceAnnotations.aj" options="-1.5">
  1696. </compile>
  1697. <run class="PrecedenceAnnotations">
  1698. <stdout>
  1699. <line text="@Security S2"/>
  1700. <line text="S1"/>
  1701. <line text="@Performance P2"/>
  1702. <line text="P1"/>
  1703. </stdout>
  1704. </run>
  1705. </ajc-test>
  1706. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: dec annotation">
  1707. <compile files="DeclareAnnotation.aj,org/xyz/model/Model.java" options="-1.5">
  1708. <message kind="warning" line="3" text="@BusinessDomain"/>
  1709. <message kind="warning" line="43" text="@Secured"/>
  1710. <message kind="warning" line="44" text="@Secured"/>
  1711. <message kind="warning" line="55" text="@Secured"/>
  1712. <message kind="warning" line="62" text="@Persisted"/>
  1713. <message kind="warning" line="68" text="@Persisted"/>
  1714. <message kind="warning" line="41" text="@Secured"/>
  1715. <message kind="warning" line="51" text="@Secured"/>
  1716. </compile>
  1717. <run class="DeclareAnnotation"/>
  1718. </ajc-test>
  1719. <ajc-test dir="java5/covariance/ajdk" title="ajdk: covariance">
  1720. <compile files="AJDKExamples.aj" options="-1.5">
  1721. <message kind="warning" line="43" text="call(* whoAreYou())"/>
  1722. <message kind="warning" line="44" text="call(* whoAreYou())"/>
  1723. <message kind="warning" line="43" text="call(* A.whoAreYou())"/>
  1724. <message kind="warning" line="44" text="call(* A.whoAreYou())"/>
  1725. <message kind="warning" line="43" text="call(A whoAreYou())"/>
  1726. <message kind="warning" line="44" text="call(A whoAreYou())"/>
  1727. <message kind="warning" line="44" text="call(A+ B.whoAreYou())"/>
  1728. <message kind="warning" line="44" text="call(B whoAreYou())"/>
  1729. <message kind="warning" line="44" text="call(B B.whoAreYou())"/>
  1730. </compile>
  1731. </ajc-test>
  1732. <ajc-test dir="java5/varargs/ajdk" title="ajdk: varargs">
  1733. <compile files="AJDKExamples.aj,org/xyz/Foo.java,org/xyz/Goo.java,org/xyz/Hoo.java" options="-1.5">
  1734. <message kind="warning" line="8" text="call vararg match"/>
  1735. <message kind="warning" line="14" text="execution vararg match"/>
  1736. <message kind="warning" line="5" text="init vararg match"/>
  1737. <message kind="warning" line="6" text="init vararg match"/>
  1738. <message kind="warning" line="27" text="single vararg"/>
  1739. <message kind="warning" line="28" text="single String[]"/>
  1740. <message kind="warning" line="18" text="single String[]"/>
  1741. </compile>
  1742. <run class="AJDKExamples">
  1743. <stdout>
  1744. <line text="Matched at call(void X.foo(int, String[]))"/>
  1745. </stdout>
  1746. </run>
  1747. </ajc-test>
  1748. <ajc-test dir="java5/pertypewithin/ajdk" title="ajdk: ptw">
  1749. <compile files="AJDKExamples.aj" options="-1.5"/>
  1750. <run class="org.xyz.foo.AJDKExamples">
  1751. <stdout>
  1752. <line text="true"/>
  1753. <line text="true"/>
  1754. <line text="There are 2 As"/>
  1755. <line text="There are 3 Bs"/>
  1756. </stdout>
  1757. </run>
  1758. </ajc-test>
  1759. <!-- ======================================================================================= -->
  1760. <!-- declare annotation -->
  1761. <!-- ======================================================================================= -->
  1762. <ajc-test dir="java5/annotations/declare" title="basic declare annotation parse test">
  1763. <compile files="BasicParseTest.aj" options="-1.5">
  1764. </compile>
  1765. </ajc-test>
  1766. <!-- ======================================================================================= -->
  1767. <!-- declare annotation (@type) -->
  1768. <!-- ======================================================================================= -->
  1769. <ajc-test dir="java5/annotations/declare" title="declare @type 1">
  1770. <compile files="DecaType1.java" options="-1.5"/>
  1771. <run class="DecaType1">
  1772. <stderr>
  1773. <line text="annotation is @MyAnnotation()"/>
  1774. </stderr>
  1775. </run>
  1776. </ajc-test>
  1777. <ajc-test dir="java5/annotations/declare" title="declare @type 2">
  1778. <compile files="DecaType2.java" options="-1.5,-Xlint:ignore" >
  1779. </compile>
  1780. <run class="DecaType2">
  1781. <stderr>
  1782. <line text="annotation on DecaType2 is @MyAnnotation()"/>
  1783. <line text="annotation on X is @MyAnnotation()"/>
  1784. <line text="annotation on MyAnnotation is @MyAnnotation()"/>
  1785. </stderr>
  1786. </run>
  1787. </ajc-test>
  1788. <ajc-test dir="java5/annotations/declare" title="declare @type - with matching pointcut">
  1789. <compile files="DecaType3.java" options="-1.5"/>
  1790. <run class="DecaType3">
  1791. <stderr>
  1792. <line text="hello world"/>
  1793. <line text="advice running"/>
  1794. </stderr>
  1795. </run>
  1796. </ajc-test>
  1797. <ajc-test dir="java5/annotations/declare" title="declare @type - binary weaving">
  1798. <weave classesFiles="BaseTypes.java"
  1799. aspectsFiles="DecaTypeBin1.aj,Colored.java"
  1800. options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  1801. </weave>
  1802. <run class="BaseTypes">
  1803. <stderr>
  1804. <line text="Color identified on class X"/>
  1805. <line text="A.m() running"/>
  1806. <line text="A.m() running"/>
  1807. <line text="A.m() running"/>
  1808. </stderr>
  1809. </run>
  1810. </ajc-test>
  1811. <ajc-test dir="java5/annotations/declare" title="declare @type - complex annotation - binary weaving">
  1812. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaTypeBin2.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  1813. <run class="BaseTypes">
  1814. <stderr>
  1815. <line text="ComplexAnnotation identified on execution(void A.m())"/>
  1816. <line text="A.m() running"/>
  1817. <line text="A.m() running"/>
  1818. <line text="A.m() running"/>
  1819. </stderr>
  1820. </run>
  1821. </ajc-test>
  1822. <ajc-test dir="java5/annotations/declare" title="declare @type - complex annotation - source weaving">
  1823. <compile files="BaseTypes.java,DecaTypeBin2.aj" options="-1.5"/>
  1824. <run class="BaseTypes">
  1825. <stderr>
  1826. <line text="ComplexAnnotation identified on execution(void A.m())"/>
  1827. <line text="A.m() running"/>
  1828. <line text="A.m() running"/>
  1829. <line text="A.m() running"/>
  1830. </stderr>
  1831. </run>
  1832. </ajc-test>
  1833. <ajc-test dir="java5/annotations/declare" title="declare @type - two annotations hit one type - source weaving">
  1834. <compile files="BaseTypes.java,DecaTypeBin3.aj" options="-1.5"/>
  1835. <run class="BaseTypes">
  1836. <stderr>
  1837. <line text="Color identified on execution(void A.m())"/>
  1838. <line text="Fruit identified on execution(void A.m())"/>
  1839. <line text="A.m() running"/>
  1840. <line text="A.m() running"/>
  1841. <line text="A.m() running"/>
  1842. </stderr>
  1843. </run>
  1844. </ajc-test>
  1845. <ajc-test dir="java5/annotations/declare" title="declare @type - two annotations hit one type - binary weaving">
  1846. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaTypeBin3.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  1847. <run class="BaseTypes">
  1848. <stderr>
  1849. <line text="Color identified on execution(void A.m())"/>
  1850. <line text="Fruit identified on execution(void A.m())"/>
  1851. <line text="A.m() running"/>
  1852. <line text="A.m() running"/>
  1853. <line text="A.m() running"/>
  1854. </stderr>
  1855. </run>
  1856. </ajc-test>
  1857. <ajc-test dir="java5/annotations/declare" title="declare @type - declare parents interactions (order 1) - binary weaving">
  1858. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaDecpInteractions1.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  1859. <run class="BaseTypes">
  1860. <stderr>
  1861. <line text="Marker interface identified on execution(void A.m())"/>
  1862. <line text="Color annotation identified on execution(void A.m())"/>
  1863. <line text="A.m() running"/>
  1864. <line text="Marker interface identified on execution(void A.m())"/>
  1865. <line text="A.m() running"/>
  1866. <line text="Marker interface identified on execution(void A.m())"/>
  1867. <line text="A.m() running"/>
  1868. </stderr>
  1869. </run>
  1870. </ajc-test>
  1871. <ajc-test dir="java5/annotations/declare" title="declare @type - declare parents interactions (order 1) - source weaving">
  1872. <compile files="BaseTypes.java,DecaDecpInteractions1.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  1873. <run class="BaseTypes">
  1874. <stderr>
  1875. <line text="Marker interface identified on execution(void A.m())"/>
  1876. <line text="Color annotation identified on execution(void A.m())"/>
  1877. <line text="A.m() running"/>
  1878. <line text="Marker interface identified on execution(void A.m())"/>
  1879. <line text="A.m() running"/>
  1880. <line text="Marker interface identified on execution(void A.m())"/>
  1881. <line text="A.m() running"/>
  1882. </stderr>
  1883. </run>
  1884. </ajc-test>
  1885. <ajc-test dir="java5/annotations/declare" title="declare @type - declare parents interactions (order 2) - binary weaving">
  1886. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaDecpInteractions2.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  1887. <run class="BaseTypes">
  1888. <stderr>
  1889. <line text="Marker interface identified on execution(void A.m())"/>
  1890. <line text="Color annotation identified on execution(void A.m())"/>
  1891. <line text="A.m() running"/>
  1892. <line text="Marker interface identified on execution(void A.m())"/>
  1893. <line text="A.m() running"/>
  1894. <line text="Marker interface identified on execution(void A.m())"/>
  1895. <line text="A.m() running"/>
  1896. </stderr>
  1897. </run>
  1898. </ajc-test>
  1899. <ajc-test dir="java5/annotations/declare" title="declare @type - declare parents interactions (order 2) - source weaving">
  1900. <compile files="BaseTypes.java,DecaDecpInteractions2.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  1901. <run class="BaseTypes">
  1902. <stderr>
  1903. <line text="Marker interface identified on execution(void A.m())"/>
  1904. <line text="Color annotation identified on execution(void A.m())"/>
  1905. <line text="A.m() running"/>
  1906. <line text="Marker interface identified on execution(void A.m())"/>
  1907. <line text="A.m() running"/>
  1908. <line text="Marker interface identified on execution(void A.m())"/>
  1909. <line text="A.m() running"/>
  1910. </stderr>
  1911. </run>
  1912. </ajc-test>
  1913. <ajc-test dir="java5/annotations/declare" title="declare @type - declare parents interactions (order 3) - binary weaving">
  1914. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaDecpInteractions3.aj" options="-1.5,-Xlint:ignore"/>
  1915. <run class="BaseTypes">
  1916. <stderr>
  1917. <line text="Marker interface identified on execution(void A.m())"/>
  1918. <line text="Color annotation identified on execution(void A.m())"/>
  1919. <line text="A.m() running"/>
  1920. <line text="Marker interface identified on execution(void A.m())"/>
  1921. <line text="Color annotation identified on execution(void A.m())"/>
  1922. <line text="A.m() running"/>
  1923. <line text="Marker interface identified on execution(void A.m())"/>
  1924. <line text="Color annotation identified on execution(void A.m())"/>
  1925. <line text="A.m() running"/>
  1926. </stderr>
  1927. </run>
  1928. </ajc-test>
  1929. <ajc-test dir="java5/annotations/declare" title="declare @type - declare parents interactions (order 3) - source weaving">
  1930. <compile files="BaseTypes.java,DecaDecpInteractions3.aj" options="-1.5,-Xlint:ignore"/>
  1931. <run class="BaseTypes">
  1932. <stderr>
  1933. <line text="Marker interface identified on execution(void A.m())"/>
  1934. <line text="Color annotation identified on execution(void A.m())"/>
  1935. <line text="A.m() running"/>
  1936. <line text="Marker interface identified on execution(void A.m())"/>
  1937. <line text="Color annotation identified on execution(void A.m())"/>
  1938. <line text="A.m() running"/>
  1939. <line text="Marker interface identified on execution(void A.m())"/>
  1940. <line text="Color annotation identified on execution(void A.m())"/>
  1941. <line text="A.m() running"/>
  1942. </stderr>
  1943. </run>
  1944. </ajc-test>
  1945. <ajc-test dir="java5/annotations/declare" title="declare @type - declare parents interactions (order 4) - binary weaving">
  1946. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaDecpInteractions4.aj" options="-1.5,-Xlint:ignore"/>
  1947. <run class="BaseTypes">
  1948. <stderr>
  1949. <line text="Marker interface identified on execution(void A.m())"/>
  1950. <line text="Color annotation identified on execution(void A.m())"/>
  1951. <line text="A.m() running"/>
  1952. <line text="Marker interface identified on execution(void A.m())"/>
  1953. <line text="Color annotation identified on execution(void A.m())"/>
  1954. <line text="A.m() running"/>
  1955. <line text="Marker interface identified on execution(void A.m())"/>
  1956. <line text="Color annotation identified on execution(void A.m())"/>
  1957. <line text="A.m() running"/>
  1958. </stderr>
  1959. </run>
  1960. </ajc-test>
  1961. <ajc-test dir="java5/annotations/declare" title="declare @type - declare parents interactions (order 4) - source weaving">
  1962. <compile files="BaseTypes.java,DecaDecpInteractions4.aj" options="-1.5,-Xlint:ignore"/>
  1963. <run class="BaseTypes">
  1964. <stderr>
  1965. <line text="Marker interface identified on execution(void A.m())"/>
  1966. <line text="Color annotation identified on execution(void A.m())"/>
  1967. <line text="A.m() running"/>
  1968. <line text="Marker interface identified on execution(void A.m())"/>
  1969. <line text="Color annotation identified on execution(void A.m())"/>
  1970. <line text="A.m() running"/>
  1971. <line text="Marker interface identified on execution(void A.m())"/>
  1972. <line text="Color annotation identified on execution(void A.m())"/>
  1973. <line text="A.m() running"/>
  1974. </stderr>
  1975. </run>
  1976. </ajc-test>
  1977. <ajc-test dir="java5/annotations/declare" title="declare @type - annotating an already annotated type - binary weaving">
  1978. <weave classesFiles="AnnotatedType.java" aspectsFiles="DecaTypeBin4.aj" options="-1.5,-Xlint:ignore"/>
  1979. <run class="AnnotatedType">
  1980. <stderr>
  1981. <line text="Color identified on execution(void AnnotatedType.m())"/>
  1982. <line text="Fruit identified on execution(void AnnotatedType.m())"/>
  1983. <line text="m() running"/>
  1984. </stderr>
  1985. </run>
  1986. </ajc-test>
  1987. <ajc-test dir="java5/annotations/declare" title="declare @type - annotating an already annotated type - source weaving">
  1988. <compile files="AnnotatedType.java,DecaTypeBin4.aj" options="-1.5,-Xlint:ignore"/>
  1989. <run class="AnnotatedType">
  1990. <stderr>
  1991. <line text="Color identified on execution(void AnnotatedType.m())"/>
  1992. <line text="Fruit identified on execution(void AnnotatedType.m())"/>
  1993. <line text="m() running"/>
  1994. </stderr>
  1995. </run>
  1996. </ajc-test>
  1997. <!--ajc-test dir="java5/annotations/declare" title="declare @type - annotations with different targets - binary weaving">
  1998. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaTypeBin5.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  1999. <message kind="error" line="15" text="The annotation @ColorM is disallowed for this location"/>
  2000. <message kind="error" line="16" text="The annotation @ColorC is disallowed for this location"/>
  2001. <message kind="error" line="18" text="The annotation @ColorF is disallowed for this location"/>
  2002. <message kind="error" line="19" text="The annotation @ColorP is disallowed for this location"/>
  2003. <message kind="error" line="20" text="The annotation @ColorL is disallowed for this location"/>
  2004. <message kind="error" line="21" text="The annotation @ColorPkg is disallowed for this location"/>
  2005. </weave>
  2006. <run class="BaseTypes">
  2007. <stderr>
  2008. <line text="ColorT identified on execution(void A.m())"/>
  2009. <line text="A.m() running"/>
  2010. <line text="A.m() running"/>
  2011. <line text="A.m() running"/>
  2012. </stderr>
  2013. </run>
  2014. </ajc-test-->
  2015. <ajc-test dir="java5/annotations/declare" title="declare @type - annotations with different targets - source weaving">
  2016. <compile files="BaseTypes.java,DecaTypeBin5.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  2017. <message kind="error" line="15" text="The annotation @ColorM is disallowed for this location"/>
  2018. <message kind="error" line="16" text="The annotation @ColorC is disallowed for this location"/>
  2019. <message king="error" line="17" text="A is not a valid target for annotation ColorA"/>
  2020. <message kind="error" line="18" text="The annotation @ColorF is disallowed for this location"/>
  2021. <message kind="error" line="19" text="The annotation @ColorP is disallowed for this location"/>
  2022. <message kind="error" line="20" text="The annotation @ColorL is disallowed for this location"/>
  2023. <message kind="error" line="21" text="The annotation @ColorPkg is disallowed for this location"/>
  2024. </compile>
  2025. </ajc-test>
  2026. <!--ajc-test dir="java5/annotations/declare" title="declare @type - annotations with different targets (using type patterns) - binary weaving">
  2027. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaTypeBin6.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  2028. <message kind="warning" line="15" text="A is not a valid target for annotation ColorM"/>
  2029. <message kind="warning" line="16" text="A is not a valid target for annotation ColorC"/>
  2030. <message kind="warning" line="17" text="A is not a valid target for annotation ColorL"/>
  2031. <message kind="warning" line="17" text="B is not a valid target for annotation ColorL"/>
  2032. <message kind="warning" line="17" text="C is not a valid target for annotation ColorL"/>
  2033. </weave>
  2034. <run class="BaseTypes">
  2035. <stderr>
  2036. <line text="ColorT identified on execution(void A.m())"/>
  2037. <line text="A.m() running"/>
  2038. <line text="ColorT identified on execution(void A.m())"/>
  2039. <line text="A.m() running"/>
  2040. <line text="ColorT identified on execution(void A.m())"/>
  2041. <line text="A.m() running"/>
  2042. </stderr>
  2043. </run>
  2044. </ajc-test-->
  2045. <ajc-test dir="java5/annotations/declare" title="declare @type - annotations with different targets (using type patterns) - source weaving">
  2046. <compile files="BaseTypes.java,DecaTypeBin6.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  2047. <message kind="error" line="15" text="The annotation @ColorM is disallowed for this location"/>
  2048. <message kind="error" line="16" text="The annotation @ColorC is disallowed for this location"/>
  2049. <message kind="error" line="17" text="The annotation @ColorL is disallowed for this location"/>
  2050. <message kind="error" line="18" text="The annotation @ColorF is disallowed for this location"/>
  2051. </compile>
  2052. </ajc-test>
  2053. <ajc-test dir="java5/annotations/declare" title="declare @type - complex decp decAtType interactions - binary weaving">
  2054. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaTypeBin7.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  2055. </weave>
  2056. <run class="BaseTypes">
  2057. <stderr>
  2058. <line text="Color identified on execution(void A.m())"/>
  2059. <line text="Fruit identified on execution(void A.m())"/>
  2060. <line text="Chocolate identified on execution(void A.m())"/>
  2061. <line text="M1 at execution(void A.m())"/>
  2062. <line text="M2 at execution(void A.m())"/>
  2063. <line text="M3 at execution(void A.m())"/>
  2064. <line text="A.m() running"/>
  2065. <line text="Fruit identified on execution(void B.m())"/>
  2066. <line text="Chocolate identified on execution(void B.m())"/>
  2067. <line text="M1 at execution(void B.m())"/>
  2068. <line text="M2 at execution(void B.m())"/>
  2069. <line text="M3 at execution(void B.m())"/>
  2070. <line text="B.m() running"/>
  2071. <line text="Fruit identified on execution(void C.m())"/>
  2072. <line text="Chocolate identified on execution(void C.m())"/>
  2073. <line text="M1 at execution(void C.m())"/>
  2074. <line text="M2 at execution(void C.m())"/>
  2075. <line text="M3 at execution(void C.m())"/>
  2076. <line text="C.m() running"/>
  2077. </stderr>
  2078. </run>
  2079. </ajc-test>
  2080. <ajc-test dir="java5/annotations/declare" title="declare @type - complex decp decAtType interactions - source weaving">
  2081. <compile files="BaseTypes.java,DecaTypeBin7.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  2082. <run class="BaseTypes">
  2083. <stderr>
  2084. <line text="Color identified on execution(void A.m())"/>
  2085. <line text="Fruit identified on execution(void A.m())"/>
  2086. <line text="Chocolate identified on execution(void A.m())"/>
  2087. <line text="M1 at execution(void A.m())"/>
  2088. <line text="M2 at execution(void A.m())"/>
  2089. <line text="M3 at execution(void A.m())"/>
  2090. <line text="A.m() running"/>
  2091. <line text="Fruit identified on execution(void B.m())"/>
  2092. <line text="Chocolate identified on execution(void B.m())"/>
  2093. <line text="M1 at execution(void B.m())"/>
  2094. <line text="M2 at execution(void B.m())"/>
  2095. <line text="M3 at execution(void B.m())"/>
  2096. <line text="B.m() running"/>
  2097. <line text="Fruit identified on execution(void C.m())"/>
  2098. <line text="Chocolate identified on execution(void C.m())"/>
  2099. <line text="M1 at execution(void C.m())"/>
  2100. <line text="M2 at execution(void C.m())"/>
  2101. <line text="M3 at execution(void C.m())"/>
  2102. <line text="C.m() running"/>
  2103. </stderr>
  2104. </run>
  2105. </ajc-test>
  2106. <ajc-test dir="java5/annotations/declare" title="declare @type - trying to put annotation targetting annos on normal types - source weaving">
  2107. <compile files="BaseTypes.java,DecaTypeBin8.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  2108. <message kind="error" line="8" text="A is not a valid target for annotation ColorA"/>
  2109. </compile>
  2110. </ajc-test>
  2111. <ajc-test dir="java5/annotations/declare" title="declare @type - trying to put annotation targetting annos on normal types - binary weaving">
  2112. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaTypeBin8.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  2113. <message kind="error" line="8" text="A is not a valid target for annotation ColorA"/>
  2114. </weave>
  2115. </ajc-test>
  2116. <ajc-test dir="java5/annotations/declare" title="declare @type - trying to put annotation targetting annos on normal types (uses pattern) - source weaving">
  2117. <compile files="BaseTypes.java,DecaTypeBin9.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  2118. <message kind="warning" line="8" text="A is not a valid target for annotation ColorA"/>
  2119. </compile>
  2120. </ajc-test>
  2121. <ajc-test dir="java5/annotations/declare" title="declare @type - trying to put annotation targetting annos on normal types (uses pattern) - binary weaving">
  2122. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaTypeBin9.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  2123. <message kind="warning" line="8" text="A is not a valid target for annotation ColorA"/>
  2124. </weave>
  2125. </ajc-test>
  2126. <ajc-test dir="java5/annotations/declare" title="declare @type - covering enum and class element values - source weaving">
  2127. <compile files="EnumAndClassValues.aj,FunkyAnnotations.java" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  2128. <run class="FunkyAnnotations">
  2129. <stderr>
  2130. <line text="hello world"/>
  2131. </stderr>
  2132. </run>
  2133. </ajc-test>
  2134. <ajc-test dir="java5/annotations/declare" title="declare @type - covering enum and class element values - binary weaving">
  2135. <weave aspectsFiles="EnumAndClassValues.aj" classesFiles="FunkyAnnotations.java" options="-1.5 -Xdev:Pinpoint" xlintfile="ignoreTypeNotExposed.properties"/>
  2136. <run class="FunkyAnnotations">
  2137. <stderr>
  2138. <line text="advice running: Red"/>
  2139. <line text="advice running: class java.lang.Integer"/>
  2140. <line text="method running"/>
  2141. </stderr>
  2142. </run>
  2143. </ajc-test>
  2144. <!-- ======================================================================================= -->
  2145. <!-- declare annotation (@field) -->
  2146. <!-- ======================================================================================= -->
  2147. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - simple source weaving">
  2148. <compile files="Base.java,Colored.java,AtField1.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  2149. <run class="Base">
  2150. <stderr>
  2151. <line text="Colored field access at set(int Base.publicIntField)"/>
  2152. </stderr>
  2153. </run>
  2154. </ajc-test>
  2155. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - simple binary weaving">
  2156. <weave classesFiles="Base.java,Colored.java" aspectsFiles="AtField1.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  2157. <run class="Base">
  2158. <stderr>
  2159. <line text="Colored field access at set(int Base.publicIntField)"/>
  2160. </stderr>
  2161. </run>
  2162. </ajc-test>
  2163. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - two the same on one - source weaving">
  2164. <compile files="Base.java,Colored.java,TwoOnOneField.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  2165. <message kind="warning" text="int Base.publicIntField - already has an annotation of type Colored"/>
  2166. </compile>
  2167. <run class="Base">
  2168. <stderr>
  2169. <line text="Colored field access at set(int Base.publicIntField)"/>
  2170. </stderr>
  2171. </run>
  2172. </ajc-test>
  2173. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - two the same on one - binary weaving">
  2174. <weave classesFiles="Base.java,Colored.java" aspectsFiles="TwoOnOneField.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  2175. <message kind="warning" text="int Base.publicIntField - already has an annotation of type Colored"/>
  2176. </weave>
  2177. <run class="Base">
  2178. <stderr>
  2179. <line text="Colored field access at set(int Base.publicIntField)"/>
  2180. </stderr>
  2181. </run>
  2182. </ajc-test>
  2183. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - two different on one - source weaving">
  2184. <compile files="Base.java,Colored.java,Fruit.java,TwoOnOneField2.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  2185. </compile>
  2186. <run class="Base">
  2187. <stderr>
  2188. <line text="Colored field access at set(int Base.publicIntField)"/>
  2189. <line text="Fruit field access at set(int Base.publicIntField)"/>
  2190. </stderr>
  2191. </run>
  2192. </ajc-test>
  2193. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - two different on one - binary weaving">
  2194. <weave classesFiles="Base.java,Colored.java,Fruit.java" aspectsFiles="TwoOnOneField2.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  2195. </weave>
  2196. <run class="Base">
  2197. <stderr>
  2198. <line text="Colored field access at set(int Base.publicIntField)"/>
  2199. <line text="Fruit field access at set(int Base.publicIntField)"/>
  2200. </stderr>
  2201. </run>
  2202. </ajc-test>
  2203. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - wrong target - source weaving">
  2204. <compile files="Base.java,Colored.java,WrongTarget.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  2205. <message kind="error" line="8" text="The annotation @MethodColoring is disallowed for this location"/>
  2206. <message kind="error" line="9" text="The annotation @TypeColoring is disallowed for this location"/>
  2207. </compile>
  2208. </ajc-test>
  2209. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - right target - source weaving">
  2210. <compile files="Base.java,Colored.java,RightTarget.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  2211. <run class="Base">
  2212. <stderr>
  2213. <line text="Colored field access at set(int Base.publicIntField)"/>
  2214. </stderr>
  2215. </run>
  2216. </ajc-test>
  2217. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - right target - binary weaving">
  2218. <weave classesFiles="Base.java,Colored.java" aspectsFiles="RightTarget.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  2219. <run class="Base">
  2220. <stderr>
  2221. <line text="Colored field access at set(int Base.publicIntField)"/>
  2222. </stderr>
  2223. </run>
  2224. </ajc-test>
  2225. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - recursive application - source weaving">
  2226. <compile files="Base.java,Colored.java,Fruit.java,RecursiveFields.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  2227. <run class="Base">
  2228. <stderr>
  2229. <line text="Fruit field access at set(int Base.publicIntField)"/>
  2230. </stderr>
  2231. </run>
  2232. </ajc-test>
  2233. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - recursive application - binary weaving">
  2234. <weave classesFiles="Base.java,Colored.java,Fruit.java" aspectsFiles="RecursiveFields.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  2235. <run class="Base">
  2236. <stderr>
  2237. <line text="Fruit field access at set(int Base.publicIntField)"/>
  2238. </stderr>
  2239. </run>
  2240. </ajc-test>
  2241. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - recursive application (other order) - source weaving">
  2242. <compile files="Base.java,Colored.java,Fruit.java,RecursiveFields2.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  2243. <run class="Base">
  2244. <stderr>
  2245. <line text="Fruit field access at set(int Base.publicIntField)"/>
  2246. </stderr>
  2247. </run>
  2248. </ajc-test>
  2249. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - recursive application (other order) - binary weaving">
  2250. <weave classesFiles="Base.java,Colored.java,Fruit.java" aspectsFiles="RecursiveFields2.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  2251. <run class="Base">
  2252. <stderr>
  2253. <line text="Fruit field access at set(int Base.publicIntField)"/>
  2254. </stderr>
  2255. </run>
  2256. </ajc-test>
  2257. <!-- incorrect target type for annotation on field -->
  2258. <!-- incorrect target type for annotation on method -->
  2259. <!-- two annotations on one method -->
  2260. <!-- two of the same annotation on one method - error -->
  2261. <!-- two of the same on one using pattern spec - lint -->
  2262. <!-- need some incorrect signatures in the declare @statements - e.g. declare @constructor: public Base(int): XXX; will blow things up as it uses Base rather than new -->
  2263. <!-- incorrect target type for annotation on ctor -->
  2264. <!-- two annotations on one ctor -->
  2265. <!-- two of the same annotation on one ctor - error -->
  2266. <!-- two of the same on one using pattern spec - lint -->
  2267. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @method - simple source weaving">
  2268. <compile files="Base.java,Colored.java,AtMethod1.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  2269. <run class="Base">
  2270. <stderr>
  2271. <line text="Colored method invocation at call(void Base.m1())"/>
  2272. <line text="m1() running"/>
  2273. <line text="m2() running"/>
  2274. <line text="m3() running"/>
  2275. </stderr>
  2276. </run>
  2277. </ajc-test>
  2278. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @method - simple binary weaving">
  2279. <weave classesFiles="Base.java,Colored.java" aspectsFiles="AtMethod1.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  2280. <run class="Base">
  2281. <stderr>
  2282. <line text="Colored method invocation at call(void Base.m1())"/>
  2283. <line text="m1() running"/>
  2284. <line text="m2() running"/>
  2285. <line text="m3() running"/>
  2286. </stderr>
  2287. </run>
  2288. </ajc-test>
  2289. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @constructor - simple source weaving">
  2290. <compile files="Base.java,Colored.java,AtCtor1.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  2291. <run class="Base">
  2292. <stderr>
  2293. <line text="Colored constructor invocation at call(Base(int))"/>
  2294. <line text="m1() running"/>
  2295. <line text="m2() running"/>
  2296. <line text="m3() running"/>
  2297. </stderr>
  2298. </run>
  2299. </ajc-test>
  2300. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @constructor - simple binary weaving">
  2301. <weave classesFiles="Base.java,Colored.java" aspectsFiles="AtCtor1.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  2302. <run class="Base">
  2303. <stderr>
  2304. <line text="Colored constructor invocation at call(Base(int))"/>
  2305. <line text="m1() running"/>
  2306. <line text="m2() running"/>
  2307. <line text="m3() running"/>
  2308. </stderr>
  2309. </run>
  2310. </ajc-test>
  2311. <!-- These tests verify both @method and @ctor behavior - they are so similar it is OK to have them together... -->
  2312. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @method @ctor - wrong target - source weaving">
  2313. <compile files="Base.java,Colored.java,WrongTarget.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  2314. <message kind="error" line="8" text="The annotation @MethodColoring is disallowed for this location"/>
  2315. <message kind="error" line="9" text="The annotation @TypeColoring is disallowed for this location"/>
  2316. <message kind="error" line="10" text="The annotation @MethodColoring is disallowed for this location"/>
  2317. <message kind="error" line="11" text="The annotation @TypeColoring is disallowed for this location"/>
  2318. </compile>
  2319. </ajc-test>
  2320. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @method @ctor - right target - source weaving">
  2321. <compile files="Base.java,Colored.java,RightTarget.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  2322. <run class="Base">
  2323. <stderr>
  2324. <line text="Colored ctor call at call(Base(int))"/>
  2325. <line text="Colored method call at call(void Base.m1())"/>
  2326. <line text="m1() running"/>
  2327. <line text="m2() running"/>
  2328. <line text="m3() running"/>
  2329. </stderr>
  2330. </run>
  2331. </ajc-test>
  2332. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @method @ctor - right target - binary weaving">
  2333. <weave classesFiles="Base.java,Colored.java" aspectsFiles="RightTarget.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties"/>
  2334. <run class="Base">
  2335. <stderr>
  2336. <line text="Colored ctor call at call(Base(int))"/>
  2337. <line text="Colored method call at call(void Base.m1())"/>
  2338. <line text="m1() running"/>
  2339. <line text="m2() running"/>
  2340. <line text="m3() running"/>
  2341. </stderr>
  2342. </run>
  2343. </ajc-test>
  2344. <!-- check @method/@ctor/@field recursively applying, can only happen if a pattern for one of them includes an annotation -->
  2345. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @method @ctor - two the same on one - source weaving">
  2346. <compile files="Base.java,Colored.java,TwoOnOneMember.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  2347. <message kind="warning" text="void Base.m1() - already has an annotation of type Colored"/>
  2348. <message kind="warning" text="void Base.&lt;init&gt;(int) - already has an annotation of type Colored"/>
  2349. </compile>
  2350. </ajc-test>
  2351. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @method @ctor - two the same on one - binary weaving">
  2352. <weave classesFiles="Base.java,Colored.java" aspectsFiles="TwoOnOneMember.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  2353. <message kind="warning" text="void Base.m1() - already has an annotation of type Colored"/>
  2354. <message kind="warning" text="void Base.&lt;init&gt;(int) - already has an annotation of type Colored"/>
  2355. </weave>
  2356. </ajc-test>
  2357. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @method @ctor - two different on one - source weaving">
  2358. <compile files="Base.java,Colored.java,Fruit.java,TwoOnOneMember2.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  2359. </compile>
  2360. <run class="Base">
  2361. <stderr>
  2362. <line text="Colored ctor call at Base.java:11"/>
  2363. <line text="Fruit ctor call at Base.java:11"/>
  2364. <line text="Colored method call at Base.java:15"/>
  2365. <line text="Fruit method call at Base.java:15"/>
  2366. <line text="m1() running"/>
  2367. <line text="m2() running"/>
  2368. <line text="m3() running"/>
  2369. </stderr>
  2370. </run>
  2371. </ajc-test>
  2372. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @method @ctor - two different on one - binary weaving">
  2373. <weave classesFiles="Base.java,Colored.java,Fruit.java" aspectsFiles="TwoOnOneMember2.aj" options="-1.5" xlintfile="ignoreTypeNotExposed.properties">
  2374. </weave>
  2375. <run class="Base">
  2376. <stderr>
  2377. <line text="Colored ctor call at Base.java:11"/>
  2378. <line text="Fruit ctor call at Base.java:11"/>
  2379. <line text="Colored method call at Base.java:15"/>
  2380. <line text="Fruit method call at Base.java:15"/>
  2381. <line text="m1() running"/>
  2382. <line text="m2() running"/>
  2383. <line text="m3() running"/>
  2384. </stderr>
  2385. </run>
  2386. </ajc-test>
  2387. <ajc-test dir="java5/annotations/declare" title="declare all annotations on one class - source weaving">
  2388. <compile files="DeathByAnnotations.aj" options="-1.5,-emacssym" xlintfile="ignoreTypeNotExposed.properties"/>
  2389. <run class="p.q.DeathByAnnotations"/>
  2390. </ajc-test>
  2391. <!-- ======================================================================================= -->
  2392. <!-- annotation binding with ITDs -->
  2393. <!-- ======================================================================================= -->
  2394. <ajc-test dir="java5/annotations/binding" title="simple binding annotation values where itd method is annotated">
  2395. <compile files="BindingWithAnnotatedItds1.aj" options="-1.5"/>
  2396. <run class="BindingWithAnnotatedItds1">
  2397. <stderr>
  2398. <line text="Found apple at jp execution(int A.m()) (BindingWithAnnotatedItds1.aj:8)"/>
  2399. </stderr>
  2400. </run>
  2401. </ajc-test>
  2402. <ajc-test dir="java5/annotations/binding" title="simple binding annotation values where itd field is annotated">
  2403. <compile files="BindingWithAnnotatedItds2.aj" options="-1.5"/>
  2404. <run class="BindingWithAnnotatedItds2">
  2405. <stderr>
  2406. <line text="Found banana at jp set(int A.i) (BindingWithAnnotatedItds2.aj:16)"/>
  2407. <line text="Found apple at jp set(String A.j) (BindingWithAnnotatedItds2.aj:17)"/>
  2408. <line text="Found orange at jp set(int[] A.k) (BindingWithAnnotatedItds2.aj:18)"/>
  2409. </stderr>
  2410. </run>
  2411. </ajc-test>
  2412. <ajc-test dir="java5/annotations/binding" title="simple binding annotation values where itd ctor is annotated">
  2413. <compile files="BindingWithAnnotatedItds3.aj" options="-1.5"/>
  2414. <run class="BindingWithAnnotatedItds3">
  2415. <stderr>
  2416. <line text="Found pear at jp execution(A(String)) (BindingWithAnnotatedItds3.aj:8)"/>
  2417. <line text="Found orange at jp execution(A(int)) (BindingWithAnnotatedItds3.aj:10)"/>
  2418. <line text="Found tomato at jp execution(A(boolean)) (BindingWithAnnotatedItds3.aj:12)"/>
  2419. </stderr>
  2420. </run>
  2421. </ajc-test>
  2422. <!-- ======================================================================================= -->
  2423. <!-- declare annotation targetting ITDs -->
  2424. <!-- ======================================================================================= -->
  2425. <ajc-test dir="java5/annotations/binding" title="simple binding annotation values where itd method is annotated via declare">
  2426. <compile files="BindingWithDeclaredAnnotationItds1.aj" options="-1.5,-emacssym"/>
  2427. <run class="BindingWithDeclaredAnnotationItds1">
  2428. <stderr>
  2429. <line text="Found orange at jp call(int A.m()) (BindingWithDeclaredAnnotationItds1.aj:16)"/>
  2430. <line text="Found orange at jp execution(int A.m()) (BindingWithDeclaredAnnotationItds1.aj:8)"/>
  2431. <line text="Found banana at jp call(int A.n()) (BindingWithDeclaredAnnotationItds1.aj:17)"/>
  2432. <line text="Found banana at jp execution(int A.n()) (BindingWithDeclaredAnnotationItds1.aj:10)"/>
  2433. <line text="Found tomato at jp call(int A.o()) (BindingWithDeclaredAnnotationItds1.aj:18)"/>
  2434. <line text="Found tomato at jp execution(int A.o()) (BindingWithDeclaredAnnotationItds1.aj:12)"/>
  2435. </stderr>
  2436. </run>
  2437. </ajc-test>
  2438. <ajc-test dir="java5/annotations/binding" title="simple binding annotation values where itd field is annotated via declare">
  2439. <compile files="BindingWithDeclaredAnnotationItds2.aj" options="-1.5,-emacssym"/>
  2440. <run class="BindingWithDeclaredAnnotationItds2">
  2441. <stderr>
  2442. <line text="Found orange at jp set(int A.i) (BindingWithDeclaredAnnotationItds2.aj:16)"/>
  2443. <line text="Found banana at jp set(String A.j) (BindingWithDeclaredAnnotationItds2.aj:17)"/>
  2444. <line text="Found apple at jp set(boolean[] A.k) (BindingWithDeclaredAnnotationItds2.aj:18)"/>
  2445. </stderr>
  2446. </run>
  2447. </ajc-test>
  2448. <ajc-test dir="java5/annotations/binding" title="simple binding annotation values where itd field is annotated multiple times via declare">
  2449. <compile files="BindingWithDeclaredAnnotationItds3.aj" options="-1.5,-emacssym"/>
  2450. <run class="BindingWithDeclaredAnnotationItds3">
  2451. <stderr>
  2452. <line text="Found fruit orange at jp set(int A.i) (BindingWithDeclaredAnnotationItds3.aj:13)"/>
  2453. <line text="Found drink margarita at jp set(int A.i) (BindingWithDeclaredAnnotationItds3.aj:13)"/>
  2454. </stderr>
  2455. </run>
  2456. </ajc-test>
  2457. <ajc-test dir="java5/annotations/binding" title="simple binding annotation values where itd ctor is annotated via declare">
  2458. <compile files="BindingWithDeclaredAnnotationItds4.aj" options="-1.5,-emacssym"/>
  2459. <run class="BindingWithDeclaredAnnotationItds4">
  2460. <stderr>
  2461. <line text="Found pear at jp execution(A(String)) (BindingWithDeclaredAnnotationItds4.aj:8)"/>
  2462. <line text="Found orange at jp execution(A(int)) (BindingWithDeclaredAnnotationItds4.aj:10)"/>
  2463. <line text="Found tomato at jp execution(A(boolean)) (BindingWithDeclaredAnnotationItds4.aj:12)"/>
  2464. </stderr>
  2465. </run>
  2466. </ajc-test>
  2467. <ajc-test dir="java5/suppressedWarnings" title="SuppressAjWarnings raised during matching">
  2468. <compile files="SuppressionDuringMatching.aj" options="-1.5">
  2469. </compile>
  2470. </ajc-test>
  2471. <!-- ============================================================== -->
  2472. <ajc-test dir="options/aspectpath" title="dirs on aspectpath">
  2473. <compile files="MyAspect.aj" options="-d out"/>
  2474. <compile files="MyClass.java" options="-aspectpath out">
  2475. <message kind="warning" line="3" text="a method"/>
  2476. </compile>
  2477. </ajc-test>
  2478. <!-- ============================================================== -->
  2479. <!-- Start of generics tests -->
  2480. <!-- ============================================================== -->
  2481. <ajc-test dir="java5/generics" title="ITD with parameterized type" vm="1.5">
  2482. <compile files="ITDReturningParameterizedType.aj" options="-1.5"/>
  2483. <run class="ITDReturningParameterizedType"/>
  2484. </ajc-test>
  2485. <ajc-test dir="java5/annotations/binding/bugs" title="AtArgs causes a VerifyError: Unable to pop operand off an empty stack" vm="1.5">
  2486. <compile files="Test3.java" options="-1.5"/>
  2487. <run class="Test3"/>
  2488. </ajc-test>
  2489. <ajc-test dir="java5/generics/bugs/pr91267" title="NPE using generic methods in aspects 1" vm="1.5">
  2490. <compile files="TestBug1.aj" options="-1.5"/>
  2491. <run class="TestBug1"/>
  2492. </ajc-test>
  2493. <ajc-test dir="java5/generics/bugs/pr91267" title="NPE using generic methods in aspects 2" vm="1.5">
  2494. <compile files="TestBug2.aj" options="-1.5"/>
  2495. <run class="TestBug2"/>
  2496. </ajc-test>
  2497. <ajc-test dir="java5/generics/bugs" title="Generics problem with Set" vm="1.5">
  2498. <compile files="PR91053.aj" options="-1.5"/>
  2499. <run class="PR91053"/>
  2500. </ajc-test>
  2501. <ajc-test dir="java5/generics/bugs" title="Compilation error on generic member introduction" vm="1.5">
  2502. <compile files="PR87282.aj" options="-1.5"/>
  2503. </ajc-test>
  2504. <ajc-test dir="java5/generics/bugs" title="Parameterized types on introduced fields not correctly recognized" vm="1.5">
  2505. <compile files="PR88606.aj" options="-1.5"/>
  2506. </ajc-test>
  2507. <ajc-test dir="bugs150" title="enum called Enum, annotation called Annotation, etc">
  2508. <compile files="PR90827.aj" options="-1.5"/>
  2509. </ajc-test>
  2510. <ajc-test dir="bugs150" title="Internal compiler error">
  2511. <compile files="PR86832.aj" options="-1.5"/>
  2512. </ajc-test>
  2513. <ajc-test dir="bugs150" title="Exploding compile time with if() statements in pointcut">
  2514. <compile files="PR94086.aj" options="-1.5"/>
  2515. </ajc-test>
  2516. <!-- generic abstract aspects... -->
  2517. <ajc-test dir="java5/generics/genericaspects" title="static pointcut parameterization suite">
  2518. <compile files="GenericAspectPointcuts.aj" options="-1.5">
  2519. <message kind="warning" line="62" text="kinded-returning-ok"/>
  2520. <message kind="warning" line="52" text="kinded-declaring-ok"/>
  2521. <message kind="warning" line="67" text="kinded-declaring-ok"/>
  2522. <message kind="warning" line="50" text="kinded-params-ok"/>
  2523. <message kind="warning" line="56" text="kinded-throws-ok"/>
  2524. <message kind="warning" line="64" text="and-ok"/>
  2525. <message kind="warning" line="60" text="or-ok"/>
  2526. <message kind="warning" line="64" text="or-ok"/>
  2527. <message kind="warning" line="67" text="or-ok"/>
  2528. <message kind="warning" line="1" text="not-ok"/>
  2529. <message kind="warning" line="42" text="not-ok"/>
  2530. <message kind="warning" line="72" text="not-ok"/>
  2531. <message kind="warning" line="59" text="within-ok"/>
  2532. <message kind="warning" line="64" text="withincode-ok"/>
  2533. <message kind="warning" line="53" text="handler-ok"/>
  2534. </compile>
  2535. </ajc-test>
  2536. <ajc-test dir="java5/generics/genericaspects" title="dynamic pointcut parameterization suite">
  2537. <compile files="GenericAspectRuntimePointcuts.aj" options="-1.5">
  2538. </compile>
  2539. <run class="GenericAspectRuntimePointcuts">
  2540. <stdout>
  2541. <line text="target-ok an X execution(void X.foo())"/>
  2542. <line text="@this-ok @MyAnnotation(value=my-value) execution(void X.foo())"/>
  2543. <line text="@target-ok @MyAnnotation(value=my-value) execution(void X.foo())"/>
  2544. <line text="@within-ok @MyAnnotation(value=my-value) execution(void X.foo())"/>
  2545. <line text="cflow-ok an X a Y set(Y X.y)"/>
  2546. <line text="@annotation-ok-sub @MyAnnotation(value=bar) execution(void X.bar())"/>
  2547. <line text="@annotation-ok @MyAnnotation(value=bar) execution(void X.bar())"/>
  2548. <line text="target-ok an X execution(void X.bar())"/>
  2549. <line text="@this-ok @MyAnnotation(value=my-value) execution(void X.bar())"/>
  2550. <line text="@target-ok @MyAnnotation(value=my-value) execution(void X.bar())"/>
  2551. <line text="@within-ok @MyAnnotation(value=my-value) execution(void X.bar())"/>
  2552. <line text="@args-ok @MyAnnotation(value=my-value) execution(void Y.foo(X))"/>
  2553. <line text="args-ok an X execution(void Y.foo(X))"/>
  2554. <line text="this-ok a Y execution(void Y.foo(X))"/>
  2555. <line text="@this-ok @MyAnnotation(value=on Y) execution(void Y.foo(X))"/>
  2556. <line text="@target-ok @MyAnnotation(value=on Y) execution(void Y.foo(X))"/>
  2557. <line text="@within-ok @MyAnnotation(value=on Y) execution(void Y.foo(X))"/>
  2558. <line text="@annotation-ok-sub @MyAnnotation(value=my-value) execution(X Y.bar())"/>
  2559. <line text="@annotation-ok @MyAnnotation(value=my-value) execution(X Y.bar())"/>
  2560. <line text="this-ok a Y execution(X Y.bar())"/>
  2561. <line text="@this-ok @MyAnnotation(value=on Y) execution(X Y.bar())"/>
  2562. <line text="@target-ok @MyAnnotation(value=on Y) execution(X Y.bar())"/>
  2563. <line text="@within-ok @MyAnnotation(value=on Y) execution(X Y.bar())"/>
  2564. <line text="@withincode-ok @MyAnnotation(value=my-value) get(X Y.x)"/>
  2565. </stdout>
  2566. </run>
  2567. </ajc-test>
  2568. <ajc-test dir="java5/generics/genericaspects" title="reference to pointcut in generic class">
  2569. <compile files="PointcutsInGenericClasses.aj" options="-1.5">
  2570. <message kind="warning" line="16" text="a match"/>
  2571. </compile>
  2572. </ajc-test>
  2573. <ajc-test dir="java5/generics/genericaspects" title="reference to non-parameterized pointcut in generic class">
  2574. <compile files="PointcutsInGenericClasses2.aj" options="-1.5">
  2575. <message kind="error" line="10" text="cannot use a raw type reference to refer to a pointcut in a generic type (use a parameterized reference instead)"/>
  2576. </compile>
  2577. </ajc-test>
  2578. <ajc-test dir="java5/generics/genericaspects" title="declare parents parameterized">
  2579. <compile files="DecPGenericTest.aj" options="-1.5">
  2580. <message kind="warning" line="16" text="success"/>
  2581. </compile>
  2582. </ajc-test>
  2583. <ajc-test dir="java5/generics/genericaspects" title="declare precedence parameterized">
  2584. <compile files="DecPrecedenceGenericTest.aj" options="-1.5 -Xdev:Pinpoint">
  2585. </compile>
  2586. <run class="DecPrecedenceGenericTest">
  2587. <stdout>
  2588. <line text="A1"/>
  2589. <line text="A2"/>
  2590. </stdout>
  2591. </run>
  2592. </ajc-test>
  2593. <ajc-test dir="java5/generics/genericaspects" title="declare annotation parameterized">
  2594. <compile files="DecAnnGenericTest.aj" options="-1.5">
  2595. <message kind="warning" line="18" text="@type ok"/>
  2596. <message kind="warning" line="20" text="@field ok"/>
  2597. <message kind="warning" line="22" text="@constructor ok"/>
  2598. <message kind="warning" line="24" text="@method ok"/>
  2599. </compile>
  2600. </ajc-test>
  2601. <ajc-test dir="java5/generics/genericaspects" title="multi-level generic abstract aspects">
  2602. <compile files="MultiLevelGenericTest.aj" options="-1.5">
  2603. <message kind="warning" line="23" text="base match"/>
  2604. <message kind="warning" line="23" text="middle match"/>
  2605. <message kind="warning" line="23" text="top match"/>
  2606. </compile>
  2607. </ajc-test>
  2608. <!-- generic bugs -->
  2609. <ajc-test dir="java5/generics/bugs" title="ITD method with generic arg">
  2610. <compile files="PR97763.aj" options="-1.5"/>
  2611. <run class="PR97763">
  2612. <stderr>
  2613. <line text="Number of entries=2"/>
  2614. </stderr>
  2615. </run>
  2616. </ajc-test>
  2617. <ajc-test dir="bugs150" title="NPE at ClassScope.java:660 when compiling generic class">
  2618. <compile files="PR95993.java" options="-1.5"/>
  2619. </ajc-test>
  2620. <ajc-test dir="java5/generics/bugs" title="Problems resolving type name inside generic class">
  2621. <compile files="PR95992.java" options="-1.5"/>
  2622. </ajc-test>
  2623. <ajc-test dir="bugs150" pr="100227" title="inner class with generic enclosing class">
  2624. <compile files="pr100227.aj" options="-1.5"/>
  2625. <run class="pr100227">
  2626. <stderr>
  2627. <line text="Outer.Inner.inner=2"/>
  2628. <line text="Outer.Inner.p() executing"/>
  2629. <line text="Generic_Outer.Inner.inner=4"/>
  2630. <line text="Generic_Outer.Inner.p() executing"/>
  2631. </stderr>
  2632. </run>
  2633. </ajc-test>
  2634. <ajc-test dir="bugs150" pr="100260" title="methods inherited from a generic parent">
  2635. <compile files="pr100260.aj" options="-1.5"/>
  2636. <run class="pr100260"/>
  2637. </ajc-test>
  2638. <!-- end of generic bugs -->
  2639. <!-- generic aspects -->
  2640. <ajc-test dir="java5/generics/genericaspects" title="generic aspects - 1">
  2641. <compile files="GenericAspect1.aj" options="-1.5">
  2642. <message kind="error" line="2" text="only abstract aspects can have type parameters"/>
  2643. </compile>
  2644. </ajc-test>
  2645. <ajc-test dir="java5/generics/genericaspects" title="generic aspects - 2">
  2646. <compile files="GenericAspect2.aj" options="-1.5">
  2647. <message kind="error" line="9" text="a generic super-aspect must be fully parameterized in an extends clause"/>
  2648. </compile>
  2649. </ajc-test>
  2650. <ajc-test dir="java5/generics/genericaspects" title="generic aspects - 3">
  2651. <compile files="GenericAspect3.aj" options="-1.5"/>
  2652. <run class="GenericAspect3">
  2653. <stderr>
  2654. <line text="A"/>
  2655. <line text="B"/>
  2656. </stderr>
  2657. </run>
  2658. </ajc-test>
  2659. <ajc-test dir="java5/generics/genericaspects" title="generic aspects - 4">
  2660. <compile files="ParentChildRelationship.aj" options="-1.5"/>
  2661. </ajc-test>
  2662. <ajc-test dir="java5/generics/genericaspects" title="generic aspect with declare warning using type vars">
  2663. <compile files="DeclareWarningInGenericAspect.aj" options="-1.5">
  2664. <message kind="warning" line="16" text="this method takes a T!"/>
  2665. </compile>
  2666. </ajc-test>
  2667. <ajc-test dir="java5/generics/genericaspects" title="generic aspect with execution advice using type vars">
  2668. <compile files="ExecutionAdviceInGenericAspect.aj" options="-1.5">
  2669. </compile>
  2670. <run class="ExecutionAdviceInGenericAspect">
  2671. <stdout>
  2672. <line text="I matched at execution(void C.foo(String))"/>
  2673. </stdout>
  2674. </run>
  2675. </ajc-test>
  2676. <ajc-test dir="java5/generics/genericaspects" title="generic aspect with anonymous pointcut">
  2677. <compile files="AnonymousPointcutInGenericAspect.aj" options="-1.5">
  2678. </compile>
  2679. <run class="AnonymousPointcutInGenericAspect">
  2680. <stdout>
  2681. <line text="I matched at execution(void C.foo(String))"/>
  2682. </stdout>
  2683. </run>
  2684. </ajc-test>
  2685. <ajc-test dir="java5/generics/genericaspects" title="generic aspect declare parents">
  2686. <compile files="DeclareParentsWithTypeVars.aj" options="-1.5">
  2687. </compile>
  2688. <run class="DeclareParentsWithTypeVars">
  2689. </run>
  2690. </ajc-test>
  2691. <ajc-test dir="java5/generics/genericaspects" title="generic aspect declare soft">
  2692. <compile files="DeclareSoftWithTypeVars.aj" options="-1.5">
  2693. </compile>
  2694. <run class="DeclareSoftWithTypeVars">
  2695. <stderr>
  2696. <line text="handled exception: io, io, it's off to work we go..."/>
  2697. <line text="Successfully converted to domain exception"/>
  2698. </stderr>
  2699. </run>
  2700. </ajc-test>
  2701. <!-- ajdk example -->
  2702. <ajc-test dir="java5/generics/genericaspects" title="generic aspects - 5 (ajdk)">
  2703. <compile files="Blob.java,BlobContainment.aj,ParentChildRelationship.aj" options="-1.5"/>
  2704. <run class="BlobContainment"/>
  2705. </ajc-test>
  2706. <!-- end of generic aspects -->
  2707. <!-- generic ITDs -->
  2708. <ajc-test dir="java5/generics/itds" title="ITDs on generic type">
  2709. <compile files="Parse5.java" options="-1.5">
  2710. <message kind="error" line="9"/>
  2711. <message kind="error" line="11"/>
  2712. <message kind="error" line="13"/>
  2713. <message kind="error" line="15"/>
  2714. </compile>
  2715. </ajc-test>
  2716. <ajc-test dir="java5/generics/itds" title="itd of non static member">
  2717. <compile files="A.java" options="-1.5"/>
  2718. <run class="A">
  2719. <stderr>
  2720. <line text="min(2,4)=>2"/>
  2721. <line text="max(2,4)=>4"/>
  2722. </stderr>
  2723. </run>
  2724. </ajc-test>
  2725. <ajc-test dir="java5/generics/itds" title="itd of static member">
  2726. <compile files="B.java" options="-1.5"/>
  2727. <run class="B">
  2728. <stderr>
  2729. <line text="min(2,4)=>2"/>
  2730. <line text="max(2,4)=>4"/>
  2731. </stderr>
  2732. </run>
  2733. </ajc-test>
  2734. <ajc-test dir="java5/generics/itds" title="itd using type parameter">
  2735. <compile files="C.java" options="-1.5"/>
  2736. <run class="C">
  2737. <stderr>
  2738. <line text="fillthisin..."/>
  2739. </stderr>
  2740. </run>
  2741. </ajc-test>
  2742. <ajc-test dir="java5/generics/itds" title="itd incorrectly using type parameter">
  2743. <compile files="D.java" options="-1.5"/>
  2744. <run class="D">
  2745. <stderr>
  2746. <line text="fillthisin..."/>
  2747. </stderr>
  2748. </run>
  2749. </ajc-test>
  2750. <ajc-test dir="java5/generics/itds" title="static generic method itd">
  2751. <compile files="StaticGenericMethodITD.aj" options="-1.5"/>
  2752. <run class="StaticGenericMethodITD">
  2753. <stderr>
  2754. <line text="First=10"/>
  2755. </stderr>
  2756. </run>
  2757. </ajc-test>
  2758. <ajc-test dir="java5/generics/itds" title="generic ctor itd - 1">
  2759. <compile files="GenericCtorITD1.aj" options="-1.5"/>
  2760. <run class="GenericCtorITD1"/>
  2761. </ajc-test>
  2762. <ajc-test dir="java5/generics/itds" title="generic ctor itd - 2">
  2763. <compile files="GenericCtorITD2.aj" options="-1.5"/>
  2764. <run class="GenericCtorITD2"/>
  2765. </ajc-test>
  2766. <ajc-test dir="java5/generics/itds" title="generic ctor itd - 3">
  2767. <compile files="GenericCtorITD3.aj" options="-1.5"/>
  2768. <run class="GenericCtorITD3"/>
  2769. </ajc-test>
  2770. <ajc-test dir="java5/generics/itds" title="parameterized method itd - 1">
  2771. <compile files="ParameterizedMethodITD1.aj" options="-1.5"/>
  2772. <run class="ParameterizedMethodITD1"/>
  2773. </ajc-test>
  2774. <ajc-test dir="java5/generics/itds" title="parameterized method itd - 2">
  2775. <compile files="ParameterizedMethodITD2.aj" options="-1.5">
  2776. <message kind="error" line="9" text="The method simple(List&lt;? extends Number&gt;) in the type Base is not applicable for the arguments (List&lt;A&gt;)"/>
  2777. </compile>
  2778. </ajc-test>
  2779. <ajc-test dir="java5/generics/itds" title="parameterized method itd - 3">
  2780. <compile files="ParameterizedMethodITD3.aj" options="-1.5">
  2781. <message kind="error" line="9" text="The method simple(List&lt;? super A&gt;) in the type Base is not applicable for the arguments (List&lt;B&gt;)"/>
  2782. </compile>
  2783. </ajc-test>
  2784. <ajc-test dir="java5/generics/itds" title="parameterized method itd - 4">
  2785. <compile files="ParameterizedMethodITD4.aj" options="-1.5"/>
  2786. <run class="ParameterizedMethodITD4"/>
  2787. </ajc-test>
  2788. <ajc-test dir="java5/generics/itds" title="generic method itd - 1">
  2789. <compile files="GenericMethodITD1.aj" options="-1.5"/>
  2790. <run class="GenericMethodITD1"/>
  2791. </ajc-test>
  2792. <ajc-test dir="java5/generics/itds" title="generic method itd - 2">
  2793. <compile files="GenericMethodITD2.aj" options="-1.5">
  2794. <message kind="error" line="9" text="Bound mismatch: The generic method simple(List&lt;? extends E&gt;) of type Base is not applicable for the arguments (List&lt;A&gt;). The inferred type A is not a valid substitute for the bounded parameter &lt;E extends Number&gt;"/>
  2795. </compile>
  2796. </ajc-test>
  2797. <ajc-test dir="java5/generics/itds" title="generic method itd - 3">
  2798. <compile files="GenericMethodITD3.aj" options="-1.5"/>
  2799. <run class="GenericMethodITD3"/>
  2800. </ajc-test>
  2801. <ajc-test dir="java5/generics/itds" title="generic method itd - 4">
  2802. <compile files="GenericMethodITD4.aj" options="-1.5"/>
  2803. <run class="GenericMethodITD4"/>
  2804. </ajc-test>
  2805. <ajc-test dir="java5/generics/itds" title="generic method itd - 5">
  2806. <compile files="GenericMethodITD5.aj" options="-1.5">
  2807. <message kind="error" line="10" text="The method simple(List&lt;E&gt;, List&lt;E&gt;) in the type Base is not applicable for the arguments (List&lt;A&gt;, List&lt;B&gt;)"/>
  2808. </compile>
  2809. </ajc-test>
  2810. <ajc-test dir="java5/generics/itds" title="generic method itd - 6">
  2811. <compile files="GenericMethodITD6.aj" options="-1.5"/>
  2812. <run class="GenericMethodITD6"/>
  2813. </ajc-test>
  2814. <ajc-test dir="java5/generics/itds" title="generic method itd - 7">
  2815. <compile files="GenericMethodITD7.aj" options="-1.5"/>
  2816. <run class="GenericMethodITD7"/>
  2817. </ajc-test>
  2818. <ajc-test dir="java5/generics/itds" title="generic method itd - 8">
  2819. <compile files="GenericMethodITD8.aj" options="-1.5">
  2820. <message kind="error" line="10" text="The method simple(List&lt;E&gt;, List&lt;? extends E&gt;) in the type Base is not applicable for the arguments (List&lt;Number&gt;, List&lt;String&gt;)"/>
  2821. </compile>
  2822. </ajc-test>
  2823. <ajc-test dir="java5/generics/itds" title="generic method itd - 9">
  2824. <compile files="GenericMethodITD9.aj" options="-1.5"/>
  2825. <run class="GenericMethodITD9"/>
  2826. </ajc-test>
  2827. <ajc-test dir="java5/generics/itds" title="generic method itd - 10">
  2828. <compile files="GenericMethodITD10.aj" options="-1.5">
  2829. <message kind="error" line="10" text="Bound mismatch: The generic method crazy(List&lt;R&gt;) of type Base is not applicable for the arguments (List&lt;A&gt;). The inferred type A is not a valid substitute for the bounded parameter &lt;R extends Object &amp; Comparable&lt;? super R&gt;&gt;"/>
  2830. </compile>
  2831. </ajc-test>
  2832. <ajc-test dir="java5/generics/itds" title="generic method itd - 11">
  2833. <compile files="GenericMethodITD11.aj" options="-1.5"/>
  2834. <run class="GenericMethodITD11"/>
  2835. </ajc-test>
  2836. <ajc-test dir="java5/generics/itds" title="generic method itd - 12">
  2837. <compile files="GenericMethodITD12.aj" options="-1.5">
  2838. <message kind="error" line="10" text="Bound mismatch: The generic method crazy(List&lt;R&gt;) of type Base is not applicable for the arguments (List&lt;A&gt;). The inferred type A is not a valid substitute for the bounded parameter &lt;R extends Object &amp; Foo&lt;? extends R&gt;&gt;"/>
  2839. </compile>
  2840. </ajc-test>
  2841. <ajc-test dir="java5/generics/itds" title="generic method itd - 13">
  2842. <compile files="GenericMethodITD13.aj" options="-1.5"/>
  2843. <run class="GenericMethodITD13"/>
  2844. </ajc-test>
  2845. <ajc-test dir="java5/generics/itds" title="generic method itd - 14">
  2846. <compile files="GenericMethodITD14.aj" options="-1.5">
  2847. <message kind="error" line="10" text="Bound mismatch: The generic method crazy(List&lt;R&gt;) of type Base is not applicable for the arguments (List&lt;A&gt;). The inferred type A is not a valid substitute for the bounded parameter &lt;R extends Object &amp; Foo&lt;? super R&gt;&gt;"/>
  2848. </compile>
  2849. </ajc-test>
  2850. <ajc-test dir="java5/generics/itds" title="generic method itd - 15">
  2851. <compile files="GenericMethodITD15.aj" options="-1.5"/>
  2852. <run class="GenericMethodITD15"/>
  2853. </ajc-test>
  2854. <!-- visibility -->
  2855. <ajc-test dir="java5/generics/itds/visibility" title="public itds">
  2856. <compile files="PublicITDs.aj" options="-1.5"/>
  2857. <run class="PublicITDs"/>
  2858. </ajc-test>
  2859. <ajc-test dir="java5/generics/itds/visibility" title="private itds">
  2860. <compile files="PrivateITDs.aj" options="-1.5"/>
  2861. <run class="PrivateITDs"/>
  2862. </ajc-test>
  2863. <ajc-test dir="java5/generics/itds/visibility" title="package itds">
  2864. <compile files="PackageITDs.aj" options="-1.5"/>
  2865. <run class="PackageITDs"/>
  2866. </ajc-test>
  2867. <ajc-test dir="java5/generics/itds/visibility" title="public itds with errors">
  2868. <compile files="PublicITDsErrors.aj" options="-1.5">
  2869. <message kind="error" line="13" text="The method publicMethod2(List&lt;R&gt;, List&lt;R&gt;) in the type Base is not applicable for the arguments (List&lt;Double&gt;, List&lt;Float&gt;)"/>
  2870. <message kind="error" line="15" text="The constructor Base(List&lt;Double&gt;, Map&lt;Integer,String&gt;) is undefined"/>
  2871. </compile>
  2872. </ajc-test>
  2873. <!-- targetting different types -->
  2874. <ajc-test dir="java5/generics/itds/differingTargets" title="targetting interface">
  2875. <compile files="TargettingInterface.aj" options="-1.5"/>
  2876. <run class="TargettingInterface"/>
  2877. </ajc-test>
  2878. <ajc-test dir="java5/generics/itds/differingTargets" title="targetting aspect">
  2879. <compile files="TargettingAspect.aj" options="-1.5"/>
  2880. <run class="TargettingAspect"/>
  2881. </ajc-test>
  2882. <ajc-test dir="java5/generics/itds/differingTargets" title="targetting class">
  2883. <compile files="TargettingClass.aj" options="-1.5"/>
  2884. <run class="TargettingClass"/>
  2885. </ajc-test>
  2886. <!-- sharing type variables between the ITD and the generic type -->
  2887. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 1">
  2888. <compile files="FieldA.aj" options="-1.5"/>
  2889. <run class="FieldA"/>
  2890. </ajc-test>
  2891. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 2">
  2892. <compile files="FieldB.aj" options="-1.5">
  2893. <message kind="error" line="16" text="Incorrect number of type parameters supplied. The generic type Base&lt;N,M&gt; has 2 type parameters, not 1."/>
  2894. </compile>
  2895. </ajc-test>
  2896. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 3">
  2897. <compile files="FieldC.aj" options="-1.5"/>
  2898. <run class="FieldC"/>
  2899. </ajc-test>
  2900. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 4">
  2901. <compile files="FieldD.aj" options="-1.5"/>
  2902. <run class="FieldD"/>
  2903. </ajc-test>
  2904. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 5">
  2905. <compile files="FieldE.aj" options="-1.5"/>
  2906. <run class="FieldE"/>
  2907. </ajc-test>
  2908. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 6">
  2909. <compile files="FieldF.aj" options="-1.5"/>
  2910. <run class="FieldF"/>
  2911. </ajc-test>
  2912. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 7">
  2913. <compile files="FieldG.aj" options="-1.5"/>
  2914. <run class="FieldG"/>
  2915. </ajc-test>
  2916. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 8">
  2917. <compile files="FieldH.aj" options="-1.5"/>
  2918. <run class="FieldH"/>
  2919. </ajc-test>
  2920. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 9">
  2921. <compile files="FieldI.aj" options="-1.5">
  2922. <message kind="error" line="7" text="Type mismatch: cannot convert from List&lt;String&gt; to List&lt;Integer&gt;"/>
  2923. </compile>
  2924. </ajc-test>
  2925. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -10">
  2926. <compile files="FieldJ.aj" options="-1.5"/>
  2927. <run class="FieldJ"/>
  2928. </ajc-test>
  2929. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -11">
  2930. <compile files="FieldK.aj" options="-1.5"/>
  2931. <run class="FieldK"/>
  2932. </ajc-test>
  2933. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -12">
  2934. <compile files="FieldL.aj" options="-1.5"/>
  2935. <run class="FieldL"/>
  2936. </ajc-test>
  2937. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -13">
  2938. <compile files="FieldM.aj" options="-1.5"/>
  2939. <run class="FieldM"/>
  2940. </ajc-test>
  2941. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -14">
  2942. <compile files="FieldN.aj" options="-1.5">
  2943. <message kind="error" line="11" text="Type parameters can not be specified in the ITD target type - the target type I is not generic."/>
  2944. </compile>
  2945. </ajc-test>
  2946. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -15">
  2947. <compile files="FieldO.aj" options="-1.5">
  2948. <message kind="error" line="11" text="Intertype declarations can only be made on the generic type, not on a parameterized type. The name 'String' cannot be used as a type parameter, since it refers to a real type."/>
  2949. </compile>
  2950. </ajc-test>
  2951. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -16">
  2952. <compile files="FieldP.aj" options="-1.5">
  2953. <message kind="error" line="10" text="static intertype field declarations cannot refer to type variables from the target generic type"/>
  2954. </compile>
  2955. </ajc-test>
  2956. <!-- Now intertype declared methods on generic types that use the target types type vars -->
  2957. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - A1">
  2958. <compile files="MethodA.aj" options="-1.5"/>
  2959. <run class="MethodA"/>
  2960. </ajc-test>
  2961. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - A2">
  2962. <compile files="MethodA2.aj" options="-1.5"/>
  2963. <run class="MethodA2"/>
  2964. </ajc-test>
  2965. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - A3">
  2966. <compile files="MethodA3.aj" options="-1.5"/>
  2967. <run class="MethodA3"/>
  2968. </ajc-test>
  2969. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - A4">
  2970. <compile files="MethodA4.aj" options="-1.5"/>
  2971. <run class="MethodA4"/>
  2972. </ajc-test>
  2973. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - B1">
  2974. <compile files="MethodB.aj" options="-1.5">
  2975. <message kind="error" line="16" text="Incorrect number of type parameters supplied. The generic type Base&lt;N,M&gt; has 2 type parameters, not 1."/>
  2976. </compile>
  2977. </ajc-test>
  2978. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - C1">
  2979. <compile files="MethodC.aj" options="-1.5"/>
  2980. <run class="MethodC"/>
  2981. </ajc-test>
  2982. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - D1">
  2983. <compile files="MethodD.aj" options="-1.5"/>
  2984. <run class="MethodD"/>
  2985. </ajc-test>
  2986. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - E1">
  2987. <compile files="MethodE.aj" options="-1.5"/>
  2988. <run class="MethodE"/>
  2989. </ajc-test>
  2990. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - F1">
  2991. <compile files="MethodF.aj" options="-1.5"/>
  2992. <run class="MethodF"/>
  2993. </ajc-test>
  2994. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - G1">
  2995. <compile files="MethodG.aj" options="-1.5"/>
  2996. <run class="MethodG"/>
  2997. </ajc-test>
  2998. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - H1">
  2999. <compile files="MethodH.aj" options="-1.5"/>
  3000. <run class="MethodH"/>
  3001. </ajc-test>
  3002. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - I1">
  3003. <compile files="MethodI.aj" options="-1.5">
  3004. <message kind="error" line="6" text="Type mismatch: cannot convert from List&lt;Integer&gt; to List&lt;String&gt;"/>
  3005. </compile>
  3006. </ajc-test>
  3007. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - I2">
  3008. <compile files="MethodI2.aj" options="-1.5">
  3009. <message kind="error" line="7" text="The method m(List&lt;Integer&gt;) in the type Base&lt;Integer&gt; is not applicable for the arguments (List&lt;String&gt;)"/>
  3010. </compile>
  3011. </ajc-test>
  3012. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - J1">
  3013. <compile files="MethodJ.aj" options="-1.5"/>
  3014. <run class="MethodJ"/>
  3015. </ajc-test>
  3016. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - K1">
  3017. <compile files="MethodK.aj" options="-1.5"/>
  3018. <run class="MethodK"/>
  3019. </ajc-test>
  3020. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - L1">
  3021. <compile files="MethodL.aj" options="-1.5"/>
  3022. <run class="MethodL"/>
  3023. </ajc-test>
  3024. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - M1">
  3025. <compile files="MethodM.aj" options="-1.5"/>
  3026. <run class="MethodM"/>
  3027. </ajc-test>
  3028. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - M2">
  3029. <compile files="MethodM2.aj" options="-1.5"/>
  3030. <run class="MethodM2"/>
  3031. </ajc-test>
  3032. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - N1">
  3033. <compile files="MethodN.aj" options="-1.5">
  3034. <message kind="error" line="11" text="Type parameters can not be specified in the ITD target type - the target type I is not generic."/>
  3035. </compile>
  3036. </ajc-test>
  3037. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - O1">
  3038. <compile files="MethodO.aj" options="-1.5">
  3039. <message kind="error" line="11" text="Intertype declarations can only be made on the generic type, not on a parameterized type. The name 'String' cannot be used as a type parameter, since it refers to a real type."/>
  3040. </compile>
  3041. </ajc-test>
  3042. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - O2">
  3043. <compile files="MethodO2.aj" options="-1.5">
  3044. <message kind="error" line="11" text="Intertype declarations can only be made on the generic type, not on a parameterized type. The name 'String' cannot be used as a type parameter, since it refers to a real type."/>
  3045. </compile>
  3046. </ajc-test>
  3047. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - P1">
  3048. <compile files="MethodP.aj" options="-1.5"/>
  3049. <run class="MethodP"/>
  3050. </ajc-test>
  3051. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - Q1">
  3052. <compile files="MethodQ.aj" options="-1.5"/>
  3053. <run class="MethodQ"/>
  3054. </ajc-test>
  3055. <!-- Now intertype declared constructors on generic types that use the target types type vars -->
  3056. <ajc-test dir="java5/generics/itds/sharing" title="ctor itd using type variable from target type - A1">
  3057. <compile files="CtorA.aj" options="-1.5"/>
  3058. <run class="CtorA"/>
  3059. </ajc-test>
  3060. <ajc-test dir="java5/generics/itds/sharing" title="ctor itd using type variable from target type - B1">
  3061. <compile files="CtorB.aj" options="-1.5">
  3062. <message kind="error" line="15" text="Incorrect number of type parameters supplied. The generic type Base&lt;N,M&gt; has 2 type parameters, not 1."/>
  3063. </compile>
  3064. </ajc-test>
  3065. <ajc-test dir="java5/generics/itds/sharing" title="ctor itd using type variable from target type - C1">
  3066. <compile files="CtorC.aj" options="-1.5"/>
  3067. <run class="CtorC"/>
  3068. </ajc-test>
  3069. <ajc-test dir="java5/generics/itds/sharing" title="ctor itd using type variable from target type - D1">
  3070. <compile files="CtorD.aj" options="-1.5"/>
  3071. <run class="CtorD"/>
  3072. </ajc-test>
  3073. <ajc-test dir="java5/generics/itds/sharing" title="ctor itd using type variable from target type - E1">
  3074. <compile files="CtorE.aj" options="-1.5"/>
  3075. <run class="CtorE"/>
  3076. </ajc-test>
  3077. <ajc-test dir="java5/generics/itds/sharing" title="ctor itd using type variable from target type - F1">
  3078. <compile files="CtorF.aj" options="-1.5"/>
  3079. <run class="CtorF"/>
  3080. </ajc-test>
  3081. <ajc-test dir="java5/generics/itds/sharing" title="ctor itd using type variable from target type - G1">
  3082. <compile files="CtorG.aj" options="-1.5"/>
  3083. <run class="CtorG"/>
  3084. </ajc-test>
  3085. <ajc-test dir="java5/generics/itds/sharing" title="ctor itd using type variable from target type - H1">
  3086. <compile files="CtorH.aj" options="-1.5"/>
  3087. <run class="CtorH"/>
  3088. </ajc-test>
  3089. <ajc-test dir="java5/generics/itds/sharing" title="ctor itd using type variable from target type - I1">
  3090. <compile files="CtorI.aj" options="-1.5"/>
  3091. <run class="CtorI"/>
  3092. </ajc-test>
  3093. <!-- putting it all together, fields/methods/ctors and decps -->
  3094. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - A">
  3095. <compile files="GenericAspectA.aj" options="-1.5"/>
  3096. <run class="GenericAspectA"/>
  3097. </ajc-test>
  3098. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - B">
  3099. <compile files="GenericAspectB.aj" options="-1.5"/>
  3100. <run class="GenericAspectB"/>
  3101. </ajc-test>
  3102. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - C">
  3103. <compile files="GenericAspectC.aj" options="-1.5"/>
  3104. <run class="GenericAspectC"/>
  3105. </ajc-test>
  3106. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - D">
  3107. <compile files="GenericAspectD.aj" options="-1.5"/>
  3108. <run class="GenericAspectD"/>
  3109. </ajc-test>
  3110. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - E">
  3111. <compile files="GenericAspectE.aj" options="-1.5"/>
  3112. <run class="GenericAspectE"/>
  3113. </ajc-test>
  3114. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - F">
  3115. <compile files="GenericAspectF.aj" options="-1.5"/>
  3116. <run class="GenericAspectF"/>
  3117. </ajc-test>
  3118. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - G">
  3119. <compile files="GenericAspectG.aj" options="-1.5"/>
  3120. <run class="GenericAspectG"/>
  3121. </ajc-test>
  3122. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - H">
  3123. <compile files="GenericAspectH.aj" options="-1.5">
  3124. <message kind="error" line="7" text="Type java.lang.String does not meet the specification for type parameter 1 (N extends java.lang.Number) in generic type GenericAspect$SimpleI"/>
  3125. <message kind="error" line="16" text="The method m4(String) is undefined for the type Base"/>
  3126. </compile>
  3127. </ajc-test>
  3128. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - I">
  3129. <compile files="GenericAspectI.aj" options="-1.5"/>
  3130. <run class="GenericAspectI"/>
  3131. </ajc-test>
  3132. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - J">
  3133. <compile files="GenericAspectJ.aj" options="-1.5"/>
  3134. <run class="GenericAspectJ"/>
  3135. </ajc-test>
  3136. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - K">
  3137. <compile files="GenericAspectK.aj" options="-1.5">
  3138. <message kind="error" line="16" text="The method m4(String) is undefined for the type Base"/>
  3139. </compile>
  3140. </ajc-test>
  3141. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - L">
  3142. <compile files="GenericAspectL.aj" options="-1.5"/>
  3143. <run class="GenericAspectL"/>
  3144. </ajc-test>
  3145. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - M">
  3146. <compile files="GenericAspectM.aj" options="-1.5">
  3147. <message kind="error" line="23" text="The method m0(Integer) in the type GenericAspect&lt;A,B&gt;.SimpleI&lt;Integer&gt; is not applicable for the arguments (String)"/>
  3148. <message kind="error" line="24" text="The method m1(List&lt;Integer&gt;) in the type GenericAspect&lt;A,B&gt;.SimpleI&lt;Integer&gt; is not applicable for the arguments (List&lt;String&gt;)"/>
  3149. <message kind="error" line="25" text="Type mismatch: cannot convert from String to Integer"/>
  3150. <message kind="error" line="26" text="Type mismatch: cannot convert from List&lt;String&gt; to List&lt;Integer&gt;"/>
  3151. </compile>
  3152. </ajc-test>
  3153. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - N">
  3154. <compile files="GenericAspectN.aj" options="-1.5"/>
  3155. <run class="GenericAspectN"/>
  3156. </ajc-test>
  3157. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - O">
  3158. <compile files="GenericAspectO.aj" options="-1.5">
  3159. <message kind="error" line="24" text="Cannot make a static reference to the non-static field Bottom.parent"/>
  3160. <message kind="error" line="26" text="The method add(Bottom) in the type List&lt;Bottom&gt; is not applicable for the arguments (Top)"/>
  3161. <message kind="error" line="27" text="Cannot make a static reference to the non-static field Top.children"/>
  3162. </compile>
  3163. </ajc-test>
  3164. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - P">
  3165. <compile files="GenericAspectP.aj" options="-1.5"/>
  3166. <run class="GenericAspectP"/>
  3167. </ajc-test>
  3168. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - Q">
  3169. <compile files="GenericAspectQ.aj" options="-1.5"/>
  3170. <run class="GenericAspectQ"/>
  3171. </ajc-test>
  3172. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - R">
  3173. <compile files="GenericAspectR.aj" options="-1.5"/>
  3174. <run class="GenericAspectR"/>
  3175. </ajc-test>
  3176. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - S">
  3177. <compile files="GenericAspectS.aj" options="-1.5"/>
  3178. <run class="GenericAspectS"/>
  3179. </ajc-test>
  3180. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - T">
  3181. <compile files="GenericAspectT.aj" options="-1.5"/>
  3182. </ajc-test>
  3183. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - U">
  3184. <compile files="GenericAspectU.aj" options="-1.5"/>
  3185. <run class="GenericAspectU"/>
  3186. </ajc-test>
  3187. <ajc-test dir="java5/generics/itds/sharing" title="method itd sharing type variable with generic type">
  3188. <compile files="Simple.aj" options="-1.5"/>
  3189. <run class="Simple"/>
  3190. </ajc-test>
  3191. <ajc-test dir="java5/generics/itds/sharing" title="field itd sharing type variable with generic type">
  3192. <compile files="Simple2.aj" options="-1.5"/>
  3193. <run class="Simple2"/>
  3194. </ajc-test>
  3195. <ajc-test dir="java5/generics/itds" title="non static generic method itd - 2">
  3196. <compile files="NonstaticGenericCtorITD2.aj" options="-1.5"/>
  3197. <run class="NonstaticGenericCtorITD2"/>
  3198. </ajc-test>
  3199. <ajc-test dir="java5/generics/itds" title="reusing type variable letters">
  3200. <compile files="ReusingLetters.aj" options="-1.5"/>
  3201. <run class="ReusingLetters"/>
  3202. </ajc-test>
  3203. <ajc-test dir="java5/generics/itds" title="multiple generic itds in one file">
  3204. <compile files="BizarroSignatures.aj" options="-1.5"/>
  3205. <run class="BizarroSignatures"/>
  3206. </ajc-test>
  3207. <ajc-test dir="java5/generics/itds" title="generic intertype field declaration, sharing type variable">
  3208. <compile files="FieldITDOnGenericType.aj" options="-1.5"/>
  3209. <run class="FieldITDOnGenericType">
  3210. <stderr>
  3211. <line text=">42"/>
  3212. </stderr>
  3213. </run>
  3214. </ajc-test>
  3215. <ajc-test dir="java5/generics/itds" title="Parsing generic ITDs - 1">
  3216. <compile files="Parse1.java" options="-1.5"/>
  3217. </ajc-test>
  3218. <ajc-test dir="java5/generics/itds" title="Parsing generic ITDs - 2">
  3219. <compile files="Parse2.java" options="-1.5"/>
  3220. </ajc-test>
  3221. <ajc-test dir="java5/generics/itds" title="Parsing generic ITDs - 3">
  3222. <compile files="Parse3.java" options="-1.5"/>
  3223. </ajc-test>
  3224. <ajc-test dir="java5/generics/itds" title="Parsing generic ITDs - 4">
  3225. <compile files="Parse4.java" options="-1.5"/>
  3226. </ajc-test>
  3227. <ajc-test dir="java5/generics/itds" title="Parsing generic ITDs - 5">
  3228. <compile files="Parse5.java" options="-1.5">
  3229. <message kind="error" line="11" text="Incorrect number of type parameters supplied. The generic type Parse5&lt;T,S&gt; has 2 type parameters, not 3."/>
  3230. <message kind="error" line="13" text="Incorrect number of type parameters supplied. The generic type Parse5&lt;T,S&gt; has 2 type parameters, not 1."/>
  3231. <message kind="error" line="15" text="Intertype declarations can only be made on the generic type, not on a parameterized type. The name 'String' cannot be used as a type parameter, since it refers to a real type."/>
  3232. </compile>
  3233. </ajc-test>
  3234. <ajc-test dir="java5/generics/itds" title="Parsing generic ITDs - 6">
  3235. <compile files="Parse6.java" options="-1.5"/>
  3236. </ajc-test>
  3237. <!-- end of generic ITDs -->
  3238. <!-- generic decps -->
  3239. <ajc-test dir="java5/generics/decp" title="generic decp - simple">
  3240. <compile files="Basic.aj" options="-1.5"/>
  3241. <run class="Basic"/>
  3242. </ajc-test>
  3243. <ajc-test dir="java5/generics/decp" title="generic decp - implementing two variants #1">
  3244. <compile files="Basic2.aj" options="-1.5">
  3245. <message kind="error" line="11" text="Cannot declare parent I&lt;java.lang.Integer&gt; onto type Basic2 since it already has I&lt;java.lang.String&gt; in its hierarchy"/>
  3246. </compile>
  3247. </ajc-test>
  3248. <ajc-test dir="java5/generics/decp" title="generic decp - implementing two variants #2">
  3249. <compile files="Basic2b.aj" options="-1.5">
  3250. <message kind="error" line="10" text="Cannot declare parent I&lt;java.lang.Integer&gt; onto type Basic2b since it already has I in its hierarchy"/>
  3251. </compile>
  3252. </ajc-test>
  3253. <ajc-test dir="java5/generics/decp" title="generic decp - implementing two variants #3">
  3254. <compile files="Basic2c.aj" options="-1.5">
  3255. <message kind="error" line="10" text="Cannot declare parent I onto type Basic2c since it already has I&lt;java.lang.Double&gt; in its hierarchy"/>
  3256. </compile>
  3257. </ajc-test>
  3258. <ajc-test dir="java5/generics/decp" title="generic decp - implementing two variants #4">
  3259. <compile files="Basic2d.aj" options="-1.5"/>
  3260. </ajc-test>
  3261. <ajc-test dir="java5/generics/decp/binary" title="generic decp binary - implementing two variants #1">
  3262. <weave classesFiles="Base1.java" aspectsFiles="Asp1.aj" options="-1.5,-showWeaveInfo">
  3263. <message kind="error" line="2" text="Cannot declare parent I&lt;java.lang.Integer&gt; onto type Base1 since it already has I&lt;java.lang.String&gt; in its hierarchy"/>
  3264. </weave>
  3265. </ajc-test>
  3266. <ajc-test dir="java5/generics/decp/binary" title="generic decp binary - implementing two variants #2">
  3267. <weave classesFiles="Base2.java" aspectsFiles="Asp2.aj" options="-1.5,-showWeaveInfo">
  3268. <message kind="error" line="2" text="Cannot declare parent I&lt;java.lang.Integer&gt; onto type Base2 since it already has I in its hierarchy"/>
  3269. </weave>
  3270. </ajc-test>
  3271. <ajc-test dir="java5/generics/decp/binary" title="generic decp binary - implementing two variants #3">
  3272. <weave classesFiles="Base3.java" aspectsFiles="Asp3.aj" options="-1.5,-showWeaveInfo">
  3273. <message kind="error" line="2" text="Cannot declare parent I onto type Base3 since it already has I&lt;java.lang.Double&gt; in its hierarchy"/>
  3274. </weave>
  3275. </ajc-test>
  3276. <ajc-test dir="java5/generics/decp/binary" title="generic decp binary - implementing two variants #4">
  3277. <weave classesFiles="Base4.java" aspectsFiles="Asp4.aj" options="-1.5,-showWeaveInfo"/>
  3278. </ajc-test>
  3279. <ajc-test dir="java5/generics/decp" title="generic decp - incorrect number of type parameters">
  3280. <compile files="Basic3.aj" options="-1.5">
  3281. <message kind="error" line="10" text="Type pattern does not match because the wrong number of type parameters are specified: Type I requires 1 parameter(s)"/>
  3282. </compile>
  3283. </ajc-test>
  3284. <ajc-test dir="java5/generics/decp" title="generic decp - specifying bounds">
  3285. <compile files="Basic4.aj" options="-1.5"/>
  3286. <run class="Basic4"/>
  3287. </ajc-test>
  3288. <ajc-test dir="java5/generics/decp" title="generic decp - specifying bounds but breaking them">
  3289. <compile files="Basic5.aj" options="-1.5">
  3290. <message kind="error" line="7" text="Type java.lang.String does not meet the specification for type parameter 1 (T extends java.lang.Number) in generic type I"/>
  3291. </compile>
  3292. </ajc-test>
  3293. <ajc-test dir="java5/generics/decp" title="generic decp - with parameterized on the target">
  3294. <compile files="Basic6.aj" options="-1.5,-showWeaveInfo">
  3295. <message kind="weave" text="Extending interface set for type 'Basic6' (Basic6.aj) to include 'K&lt;java.lang.Integer&gt;' (Basic6.aj)"/>
  3296. </compile>
  3297. <run class="Basic6"/>
  3298. </ajc-test>
  3299. <!-- end of generic decps -->
  3300. <!-- generics/itds and binary weaving -->
  3301. <ajc-test dir="java5/generics/itds/binaryweaving" vm="1.5" title="binary weaving ITDs - A">
  3302. <compile files="TestA_generictype.java" outjar="code.jar" options="-1.5"/>
  3303. <compile files="TestA_aspect.aj,TestA_class.java" inpath="code.jar" options="-1.5"/>
  3304. <run class="TestA_class"/>
  3305. </ajc-test>
  3306. <ajc-test dir="java5/generics/itds/binaryweaving" vm="1.5" title="binary weaving ITDs - B">
  3307. <compile files="TestB_generictype.java" outjar="code.jar" options="-1.5"/>
  3308. <compile files="TestB_aspect1.aj,TestB_aspect2.aj,TestB_class.java" inpath="code.jar" options="-1.5"/>
  3309. <run class="TestB_class"/>
  3310. </ajc-test>
  3311. <ajc-test dir="java5/generics/itds/binaryweaving" vm="1.5" title="binary weaving ITDs - 1">
  3312. <compile files="BaseClass.java" outjar="code.jar" options="-1.5"/>
  3313. <compile files="A1.aj" inpath="code.jar" options="-1.5"/>
  3314. <run class="BaseClass">
  3315. <stderr>
  3316. <line text="Advice count=1"/>
  3317. </stderr>
  3318. </run>
  3319. </ajc-test>
  3320. <ajc-test dir="java5/generics/itds/binaryweaving" vm="1.5" title="binary weaving ITDs - 2">
  3321. <compile files="BaseClass.java,A1.aj" outjar="code.jar" options="-1.5,-showWeaveInfo">
  3322. <message kind="weave" text="Type 'BaseClass' (BaseClass.java) has intertyped field from 'A1' (A1.aj:'java.util.List BaseClass.list1')"/>
  3323. <message kind="weave" text="Type 'BaseClass' (BaseClass.java:12) advised by after advice from 'A1' (A1.aj:7)"/>
  3324. </compile>
  3325. <compile files="A2.aj" inpath="code.jar" options="-1.5,-showWeaveInfo">
  3326. <message kind="weave" text="Type 'BaseClass' (BaseClass.java) has intertyped field from 'A1' (A1.aj:'java.util.List BaseClass.list1')"/>
  3327. <message kind="weave" text="Type 'BaseClass' (BaseClass.java:12) advised by after advice from 'A1' (A1.aj:7)"/>
  3328. <message kind="weave" text="Type 'BaseClass' (BaseClass.java) has intertyped field from 'A2' (A2.aj:'java.util.List BaseClass.list2')"/>
  3329. <message kind="weave" text="Type 'BaseClass' (BaseClass.java:13) advised by after advice from 'A2' (A2.aj:8)"/>
  3330. </compile>
  3331. <run class="BaseClass">
  3332. <stderr>
  3333. <line text="Advice count=2"/>
  3334. </stderr>
  3335. </run>
  3336. </ajc-test>
  3337. <ajc-test dir="java5/generics/itds/binaryweaving" vm="1.5" title="binary weaving ITDs - 3">
  3338. <compile files="BaseClass.java,A1.aj,A2.aj" outjar="code.jar" options="-1.5"/>
  3339. <compile files="A3.aj" inpath="code.jar" options="-1.5"/>
  3340. <run class="BaseClass">
  3341. <stderr>
  3342. <line text="Advice count=3"/>
  3343. </stderr>
  3344. </run>
  3345. </ajc-test>
  3346. <!-- end of generics/itds and binary weaving -->
  3347. <!-- generics/itds and bridge methods -->
  3348. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridge methods -1">
  3349. <compile files="Sub1.java,Super1.java,X1.aj,Util.java" options="-1.5"/>
  3350. <run class="X1"/>
  3351. </ajc-test>
  3352. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridge methods -1binary">
  3353. <compile files="Sub1.java,Super1.java" outjar="code.jar" options="-1.5"/>
  3354. <compile files="X1.aj,Util.java" inpath="code.jar" options ="-1.5"/>
  3355. <run class="X1"/>
  3356. </ajc-test>
  3357. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridge methods -2">
  3358. <compile files="Sub2.java,Super2.java,X2.aj,Util.java" options="-1.5"/>
  3359. <run class="X2"/>
  3360. </ajc-test>
  3361. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridge methods -2binary">
  3362. <compile files="Sub2.java,Super2.java" outjar="code.jar" options="-1.5"/>
  3363. <compile files="X2.aj,Util.java" inpath="code.jar" options ="-1.5"/>
  3364. <run class="X2"/>
  3365. </ajc-test>
  3366. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridge methods -3">
  3367. <compile files="Sub3.java,Super3.java,X3.aj,Util.java" options="-1.5"/>
  3368. <run class="X3"/>
  3369. </ajc-test>
  3370. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridge methods -3binary">
  3371. <compile files="Sub3.java,Super3.java" outjar="code.jar" options="-1.5"/>
  3372. <compile files="X3.aj,Util.java" inpath="code.jar" options ="-1.5"/>
  3373. <run class="X3"/>
  3374. </ajc-test>
  3375. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="abstract intertype methods and covariant returns">
  3376. <compile files="pr91381.aj" options="-1.5"/>
  3377. <run class="pr91381"/>
  3378. </ajc-test>
  3379. <ajc-test dir="java5/generics/itds/bridgeMethods" title="abstract intertype methods and covariant returns - error">
  3380. <compile files="pr91381_2.aj">
  3381. <message kind="error" line="15" text="The return type is incompatible with A.foo()"/>
  3382. </compile>
  3383. </ajc-test>
  3384. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridging with covariance 1 normal">
  3385. <compile files="Bridging1.aj,Util.java" options="-1.5"/>
  3386. <run class="Bridging1"/>
  3387. </ajc-test>
  3388. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridging with covariance 1 itd">
  3389. <compile files="BridgingITD1.aj,Util.java" options="-1.5"/>
  3390. <run class="BridgingITD1"/>
  3391. </ajc-test>
  3392. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="basic bridging with type vars - 1 - normal">
  3393. <compile files="Bridging2.aj,Util.java" options="-1.5"/>
  3394. <run class="Bridging2">
  3395. <stderr>
  3396. <line text="Number of methods defined for D is 2"/>
  3397. <line text="java.lang.Object D.next() [BridgeMethod]"/>
  3398. <line text="java.lang.String D.next()"/>
  3399. </stderr>
  3400. </run>
  3401. </ajc-test>
  3402. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="basic bridging with type vars - 1 - itd">
  3403. <compile files="BridgingITD2.aj,Util.java" options="-1.5"/>
  3404. <run class="BridgingITD2">
  3405. <stderr>
  3406. <line text="Number of methods defined for D is 2"/>
  3407. <line text="java.lang.Object D.next() [BridgeMethod]"/>
  3408. <line text="java.lang.String D.next()"/>
  3409. </stderr>
  3410. </run>
  3411. </ajc-test>
  3412. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="basic bridging with type vars - 2">
  3413. <compile files="Bridging3.aj,Util.java" options="-1.5"/>
  3414. <run class="Bridging3">
  3415. <stderr>
  3416. <line text="Number of methods defined for D is 2"/>
  3417. <line text="java.lang.Object D.id(java.lang.Object) [BridgeMethod]"/>
  3418. <line text="java.lang.String D.id(java.lang.String)"/>
  3419. </stderr>
  3420. </run>
  3421. </ajc-test>
  3422. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="Abstract intertype method and covariant returns" pr="91381">
  3423. <compile files="pr91381.aj" options="-1.5,-showWeaveInfo">
  3424. <message kind="weave" text="Type 'A' (pr91381.aj) has intertyped method from 'pr91381' (pr91381.aj:'java.lang.Object A.foo()')"/>
  3425. </compile>
  3426. <run class="pr91381"/>
  3427. </ajc-test>
  3428. <!-- end of generics/itds and bridge methods -->
  3429. <!-- generics and pointcuts -->
  3430. <ajc-test dir="java5/generics/pointcuts" title="handler pcd and generics / type vars">
  3431. <compile files="GenericInterface.java,HandlerPointcutTests.aj" options="-1.5">
  3432. <message kind="error" line="4" text="Syntax error on token"/>
  3433. <message kind="error" line="8" text="a parameterized type pattern may not be used in a handler pointcut expression"/>
  3434. <message kind="warning" line="8" text="no match for this type name: T"/>
  3435. <message kind="error" line="11" text="a parameterized type pattern may not be used in a handler pointcut expression"/>
  3436. </compile>
  3437. </ajc-test>
  3438. <ajc-test dir="java5/generics/pointcuts" title="pointcuts that dont allow type vars">
  3439. <compile files="PointcutsThatDontAllowTypeVars.aj" options="-1.5">
  3440. <message kind="error" line="3" text="Syntax error on token"/>
  3441. <message kind="error" line="5" text="Syntax error on token"/>
  3442. <message kind="error" line="7" text="Syntax error on token"/>
  3443. <message kind="error" line="9" text="Syntax error on token"/>
  3444. <message kind="error" line="11" text="Syntax error on token"/>
  3445. <message kind="error" line="13" text="Syntax error on token"/>
  3446. <message kind="error" line="15" text="Syntax error on token"/>
  3447. <message kind="error" line="17" text="Syntax error on token"/>
  3448. <message kind="error" line="19" text="Syntax error on token"/>
  3449. <message kind="error" line="21" text="Syntax error on token"/>
  3450. <message kind="error" line="23" text="Syntax error on token"/>
  3451. <message kind="error" line="25" text="Syntax error on token"/>
  3452. <message kind="error" line="27" text="Syntax error on token"/>
  3453. </compile>
  3454. </ajc-test>
  3455. <ajc-test dir="java5/generics/pointcuts" title="annotation pcds with parameterized types">
  3456. <compile files="ParameterizedTypesInAtPCDs.aj" options="-1.5">
  3457. <message kind="error" line="3" text="Syntax error on token"/>
  3458. <message kind="error" line="5" text="Syntax error on token"/>
  3459. <message kind="error" line="7" text="Syntax error on token"/>
  3460. <message kind="error" line="9" text="Syntax error on token"/>
  3461. <message kind="error" line="11" text="Syntax error on token"/>
  3462. <message kind="error" line="13" text="Syntax error on token"/>
  3463. </compile>
  3464. </ajc-test>
  3465. <ajc-test dir="java5/generics/pointcuts" title="annotation patterns with parameterized types">
  3466. <compile files="ParameterizedTypesInAnnotationPatterns.aj" options="-1.5">
  3467. <message kind="error" line="5" text="is not an annotation type"/>
  3468. </compile>
  3469. </ajc-test>
  3470. <ajc-test dir="java5/generics/pointcuts" title="staticinitialization and parameterized types">
  3471. <compile files="GenericInterface.java,GenericImplementingClass.java,StaticInitializationWithParameterizedTypes.aj" options="-1.5">
  3472. <message kind="error" line="4" text="no static initialization join points for parameterized types, use raw type instead"/>
  3473. <message kind="error" line="6" text="no static initialization join points for parameterized types, use raw type instead"/>
  3474. <message kind="error" line="9" text="no static initialization join points for parameterized types, use raw type instead"/>
  3475. <message kind="error" line="11" text="no static initialization join points for parameterized types, use raw type instead"/>
  3476. <message kind="error" line="14" text="no static initialization join points for parameterized types, use raw type instead"/>
  3477. </compile>
  3478. </ajc-test>
  3479. <ajc-test dir="java5/generics/pointcuts" title="staticinitialization and parameterized type matching">
  3480. <compile files="GenericInterface.java,GenericImplementingClass.java,ConcreteImplementingClass.java,ConcreteExtendingClass.java,StaticInitializationWithParameterizedTypesMatching.aj" options="-1.5">
  3481. <message kind="warning" line="1" text="clinit(GenericInterface&lt;Double&gt;+)"/>
  3482. <message kind="warning" line="3" text="clinit(GenericInterface&lt;Double&gt;+)"/>
  3483. <message kind="warning" line="3" text="clinit(GenericImplementingClass&lt;Double&gt;+)"/>
  3484. <message kind="warning" line="15" text="Type java.lang.String does not meet the specification for type parameter 1 (N extends java.lang.Number) in generic type GenericInterface"/>
  3485. <message kind="warning" line="19" text="Type pattern does not match because the wrong number of type parameters are specified: Type GenericInterface requires 1 parameter(s)"/>
  3486. </compile>
  3487. </ajc-test>
  3488. <ajc-test dir="java5/generics/pointcuts" title="staticinitialization with generic types">
  3489. <compile files="GenericInterface.java,GenericImplementingClass.java,StaticInitializationWithGenericTypes.aj" options="-1.5">
  3490. <message kind="warning" line="1" text="one generic param, correct bounds"/>
  3491. <message kind="warning" line="1" text="doesn't matter what type variable name you use"/>
  3492. <message kind="warning" line="1" text="works with classes too"/>
  3493. <message kind="warning" line="4" text="Type T does not meet the specification for type parameter 1 (N extends java.lang.Number) in generic type GenericInterface"/>
  3494. <message kind="warning" line="20" text="Type pattern does not match because the wrong number of type parameters are specified: Type GenericImplementingClass requires 1 parameter(s)"/>
  3495. <message kind="warning" line="24" text="Type N extends java.lang.Number &amp; java.lang.Comparable does not meet the specification for type parameter 1 (N extends java.lang.Number) in generic type GenericImplementingClass"/>
  3496. </compile>
  3497. </ajc-test>
  3498. <ajc-test dir="java5/generics/pointcuts" title="staticinitialization with generic types - advanced">
  3499. <compile files="StaticInitializationWithGenericTypesAdvanced.aj" options="-1.5">
  3500. <message kind="warning" line="76" text="simple match"/>
  3501. <message kind="warning" line="76" text="matches since R and R extends Object are equivalent"/>
  3502. <message kind="warning" line="63" text="raw type should match"/>
  3503. <message kind="warning" line="63" text="matches all bounds"/>
  3504. <message kind="warning" line="63" text="still matches with interfaces specified in a different order"/>
  3505. <message kind="warning" line="69" text="matches with type variable inter-dependencies"/>
  3506. <message kind="warning" line="76" text="matches any generic type with one unbound type var"/>
  3507. <message kind="warning" line="82" text="any generic type with one type var bound to Number or subtype"/>
  3508. <message kind="warning" line="63" text="matches a generic type with any upper bound and i/f bounds"/>
  3509. <message kind="warning" line="76" text="matches a generic type with any upper bound and i/f bounds"/>
  3510. <message kind="warning" line="82" text="matches a generic type with any upper bound and i/f bounds"/>
  3511. <message kind="warning" line="19" text="Type X does not meet the specification for type parameter 1 (T extends java.lang.Number &amp; java.lang.Comparable &amp; java.io.Serializable) in generic type ClassWithInterfaceBounds"/>
  3512. <message kind="warning" line="23" text="Type Y extends java.lang.Number does not meet the specification for type parameter 1 (T extends java.lang.Number &amp; java.lang.Comparable &amp; java.io.Serializable) in generic type ClassWithInterfaceBounds"/>
  3513. <message kind="warning" line="27" text="Type Z extends java.lang.Number &amp; java.lang.Comparable does not meet the specification for type parameter 1 (T extends java.lang.Number &amp; java.lang.Comparable &amp; java.io.Serializable) in generic type ClassWithInterfaceBounds"/>
  3514. </compile>
  3515. </ajc-test>
  3516. <ajc-test dir="java5/generics/pointcuts" title="within pcd with various parameterizations and generic types - errors">
  3517. <compile files="WithinPointcutMatching.aj" options="-1.5">
  3518. <message kind="warning" line="4" text="no match for this type name: T"/>
  3519. <message kind="error" line="4" text="parameterized type pattern not supported by 'within', use a raw type pattern instead"/>
  3520. <message kind="error" line="5" text="parameterized type pattern not supported by 'within', use a raw type pattern instead"/>
  3521. <message kind="error" line="6" text="parameterized type pattern not supported by 'within', use a raw type pattern instead"/>
  3522. </compile>
  3523. </ajc-test>
  3524. <ajc-test dir="java5/generics/pointcuts" title="within pcd with various parameterizations and generic types - warnings">
  3525. <compile files="WithinPointcutMatchingWarnings.aj" options="-1.5">
  3526. <message kind="warning" line="16" text="matched set correctly"/>
  3527. <message kind="warning" line="18" text="matched execution correctly"/>
  3528. <message kind="warning" line="24" text="init matched correctly"/>
  3529. <message kind="warning" line="32" text="matched parameterization ok"/>
  3530. </compile>
  3531. </ajc-test>
  3532. <ajc-test dir="java5/generics/pointcuts" title="this and target with various parameterizations and generic types - errors">
  3533. <compile files="ThisAndTargetPointcutMatching.aj" options="-1.5">
  3534. <message kind="warning" line="4" text="no match for this type name: T"/>
  3535. <message kind="warning" line="5" text="no match for this type name: T"/>
  3536. <message kind="error" line="4" text="parameterized types not supported for this and target pointcuts (erasure limitation)"/>
  3537. <message kind="error" line="5" text="parameterized types not supported for this and target pointcuts (erasure limitation)"/>
  3538. <message kind="error" line="6" text="parameterized types not supported for this and target pointcuts (erasure limitation)"/>
  3539. <message kind="error" line="7" text="parameterized types not supported for this and target pointcuts (erasure limitation)"/>
  3540. </compile>
  3541. </ajc-test>
  3542. <ajc-test dir="java5/generics/pointcuts" title="this and target with various parameterizations and generic types - runtime">
  3543. <compile files="ThisAndTargetPointcutMatchingRuntime.aj" options="-1.5">
  3544. </compile>
  3545. <run class="ThisAndTargetPointcutMatchingRuntime">
  3546. <stdout>
  3547. <line text="set and this matched ok"/>
  3548. <line text="set and target matched ok"/>
  3549. <line text="call and target matched ok"/>
  3550. <line text="execution and this matched ok"/>
  3551. <line text="execution and target matched ok"/>
  3552. <line text="parameterized call and target matched ok"/>
  3553. <line text="parameterized call and this matched ok"/>
  3554. <line text="parameterized call and target matched ok"/>
  3555. </stdout>
  3556. </run>
  3557. </ajc-test>
  3558. <ajc-test dir="java5/generics/pointcuts" title="get and set with various parameterizations and generic types - errors">
  3559. <compile files="GetAndSetPointcutMatching.aj" options="-1.5">
  3560. <message kind="warning" line="4" text="no match for this type name: T"/>
  3561. <message kind="warning" line="5" text="no match for this type name: T"/>
  3562. <message kind="error" line="4" text="can't use parameterized type patterns for the declaring type of a get or set pointcut expression (use the raw type instead)"/>
  3563. <message kind="error" line="5" text="can't use parameterized type patterns for the declaring type of a get or set pointcut expression (use the raw type instead)"/>
  3564. <message kind="error" line="6" text="can't use parameterized type patterns for the declaring type of a get or set pointcut expression (use the raw type instead)"/>
  3565. <message kind="error" line="7" text="can't use parameterized type patterns for the declaring type of a get or set pointcut expression (use the raw type instead)"/>
  3566. <message kind="error" line="8" text="can't use parameterized type patterns for the declaring type of a get or set pointcut expression (use the raw type instead)"/>
  3567. </compile>
  3568. </ajc-test>
  3569. <ajc-test dir="java5/generics/pointcuts" title="get and set with various parameterizations and generic declaring types">
  3570. <compile files="GetAndSetPointcutMatchingDeclaringType.aj" options="-1.5">
  3571. <message kind="warning" line="15" text="generic/param get matching ok"/>
  3572. <message kind="warning" line="33" text="generic/param get matching ok"/>
  3573. <message kind="warning" line="12" text="generic/param set matching ok"/>
  3574. <message kind="warning" line="32" text="generic/param set matching ok"/>
  3575. </compile>
  3576. </ajc-test>
  3577. <ajc-test dir="java5/generics/pointcuts" title="get and set with various parameterizations and generic field types">
  3578. <compile files="GetAndSetPointcutMatchingFieldType.aj" options="-1.5">
  3579. <message kind="warning" line="13" text="raw field type matching in get ok"/>
  3580. <message kind="warning" line="14" text="raw field type matching in set ok"/>
  3581. <message kind="warning" line="49" text="erasure matching in get ok"/>
  3582. <message kind="warning" line="45" text="erasure matching in set ok"/>
  3583. <message kind="warning" line="53" text="erasure matching in get with params ok"/>
  3584. <message kind="warning" line="46" text="erasure matching in set with params ok"/>
  3585. <message kind="warning" line="72" text="parameterized type matching in set ok"/>
  3586. <message kind="warning" line="73" text="parameterized type matching in get ok"/>
  3587. <message kind="warning" line="74" text="parameterized type matching in set ok x2"/>
  3588. <message kind="warning" line="75" text="parameterized type matching in get ok x2"/>
  3589. <message kind="warning" line="83" text="wildcard set matching ok"/>
  3590. <message kind="warning" line="84" text="wildcard get matching ok"/>
  3591. <message kind="warning" line="85" text="wildcard extends set matching ok"/>
  3592. <message kind="warning" line="86" text="wildcard extends get matching ok"/>
  3593. <message kind="warning" line="87" text="wildcard super set matching ok"/>
  3594. <message kind="warning" line="88" text="wildcard super get matching ok"/>
  3595. <message kind="warning" line="73" text="the really wild show"/>
  3596. <message kind="warning" line="84" text="the really wild show"/>
  3597. <message kind="warning" line="86" text="the really wild show"/>
  3598. <message kind="warning" line="88" text="the really wild show"/>
  3599. <message kind="warning" line="53" text="the really wild show"/>
  3600. </compile>
  3601. </ajc-test>
  3602. <ajc-test dir="java5/generics/pointcuts" title="init and preinit with parameterized declaring types">
  3603. <compile files="InitializationPointcutMatching.aj" options="-1.5">
  3604. <message kind="warning" line="4" text="no match for this type name: T"/>
  3605. <message kind="warning" line="5" text="no match for this type name: T"/>
  3606. <message kind="error" line="4" text="no [pre]initialization join points for parameterized types, use raw type instead"/>
  3607. <message kind="error" line="5" text="no [pre]initialization join points for parameterized types, use raw type instead"/>
  3608. <message kind="error" line="6" text="no [pre]initialization join points for parameterized types, use raw type instead"/>
  3609. <message kind="error" line="7" text="no [pre]initialization join points for parameterized types, use raw type instead"/>
  3610. <message kind="error" line="8" text="no [pre]initialization join points for parameterized types, use raw type instead"/>
  3611. <message kind="error" line="9" text="invalid throws pattern: a generic class may not be a direct or indirect subclass of Throwable"/>
  3612. </compile>
  3613. </ajc-test>
  3614. <ajc-test dir="java5/generics/pointcuts" title="init and preinit with raw declaring type pattern">
  3615. <compile files="InitializationPointcutMatchingDeclaringType.aj" options="-1.5">
  3616. <message kind="warning" line="10" text="generic/param init matching ok"/>
  3617. <message kind="warning" line="10" text="generic/param preinit matching ok"/>
  3618. </compile>
  3619. </ajc-test>
  3620. <ajc-test dir="java5/generics/pointcuts" title="init and preinit with parameterized parameter types">
  3621. <compile files="InitializationPointcutMatchingParamTypes.aj" options="-1.5">
  3622. <message kind="warning" line="36" text="raw param type matching in init ok"/>
  3623. <message kind="warning" line="36" text="raw param type matching in preinit ok"/>
  3624. <message kind="warning" line="37" text="erasure matching in init ok"/>
  3625. <message kind="warning" line="37" text="erasure matching in preinit ok"/>
  3626. <message kind="warning" line="38" text="erasure matching in init with params ok"/>
  3627. <message kind="warning" line="38" text="erasure matching in preinit with params ok"/>
  3628. <message kind="warning" line="48" text="parameterized type matching in init ok"/>
  3629. <message kind="warning" line="48" text="parameterized type matching in preinit ok"/>
  3630. <message kind="warning" line="49" text="parameterized type matching in init ok x2"/>
  3631. <message kind="warning" line="49" text="parameterized type matching in preinit ok x2"/>
  3632. <message kind="warning" line="50" text="wildcard init matching ok"/>
  3633. <message kind="warning" line="50" text="wildcard preinit matching ok"/>
  3634. <message kind="warning" line="51" text="wildcard extends init matching ok"/>
  3635. <message kind="warning" line="51" text="wildcard extends preinit matching ok"/>
  3636. <message kind="warning" line="52" text="wildcard super init matching ok"/>
  3637. <message kind="warning" line="52" text="wildcard super preinit matching ok"/>
  3638. <message kind="warning" line="48" text="the really wild show"/>
  3639. <message kind="warning" line="50" text="the really wild show"/>
  3640. <message kind="warning" line="51" text="the really wild show"/>
  3641. <message kind="warning" line="52" text="the really wild show"/>
  3642. </compile>
  3643. </ajc-test>
  3644. <ajc-test dir="java5/generics/pointcuts" title="withincode with various parameterizations and generic types - errors">
  3645. <compile files="WithincodePointcutMatching.aj" options="-1.5">
  3646. <message kind="warning" line="4" text="no match for this type name: T"/>
  3647. <message kind="error" line="4" text="can't use parameterized type patterns for the declaring type of a withincode pointcut expression (use the raw type instead)"/>
  3648. <message kind="error" line="5" text="can't use parameterized type patterns for the declaring type of a withincode pointcut expression (use the raw type instead)"/>
  3649. <message kind="error" line="6" text="invalid throws pattern: a generic class may not be a direct or indirect subclass of Throwable"/>
  3650. </compile>
  3651. </ajc-test>
  3652. <ajc-test dir="java5/generics/pointcuts" title="withincode with various parameterizations and generic types - matching">
  3653. <compile files="WithinCodePointcutMatchingParamAndReturnTypes.aj" options="-1.5">
  3654. <message kind="warning" line="35" text="raw param type matching in withincode ok"/>
  3655. <message kind="warning" line="36" text="raw param type matching in withincode ok"/>
  3656. <message kind="warning" line="67" text="raw return type matching in withincode ok"/>
  3657. <message kind="warning" line="38" text="erasure type matching in withincode ok"/>
  3658. <message kind="warning" line="39" text="erasure type matching in withincode ok"/>
  3659. <message kind="warning" line="42" text="erasure type matching in withincode ok"/>
  3660. <message kind="warning" line="62" text="withincode and parameterized method ok"/>
  3661. <message kind="warning" line="62" text="withincode and generic interface ok"/>
  3662. <message kind="warning" line="65" text="withincode and interface control test"/>
  3663. <message kind="warning" line="35" text="match on parameterized args"/>
  3664. <message kind="warning" line="36" text="match on parameterized args"/>
  3665. <message kind="warning" line="67" text="match on parameterized return type"/>
  3666. </compile>
  3667. </ajc-test>
  3668. <ajc-test dir="java5/generics/pointcuts" title="withincode with overriding of inherited generic members">
  3669. <compile files="WithinCodeOverriding.aj" options="-1.5">
  3670. <message kind="warning" line="37" text="wildcard declaring type match on erasure"/>
  3671. <message kind="warning" line="50" text="wildcard declaring type match on erasure"/>
  3672. <message kind="warning" line="63" text="wildcard declaring type match on erasure"/>
  3673. <message kind="warning" line="37" text="base declaring type match on erasure"/>
  3674. <message kind="warning" line="50" text="base declaring type match on erasure"/>
  3675. <message kind="warning" line="63" text="base declaring type match on erasure"/>
  3676. <message kind="warning" line="50" text="sub type match on erasure"/>
  3677. <message kind="warning" line="63" text="parameterized match on erasure"/>
  3678. <message kind="warning" line="80" text="erasure match on base interface"/>
  3679. <message kind="warning" line="80" text="wildcard match on erasure"/>
  3680. <message kind="warning" line="80" text="parameterized match"/>
  3681. </compile>
  3682. </ajc-test>
  3683. <ajc-test dir="java5/generics/pointcuts" title="execution pcd with raw type matching">
  3684. <compile files="GenericInterface.java,ConcreteImplementingClass.java,GenericImplementingClass.java,RawTypeMatching.aj" options="-1.5">
  3685. <message kind="warning" line="4" text="execution(* GenericInterface.*(..))"/>
  3686. <message kind="warning" line="5" text="execution(* GenericInterface.*(..))"/>
  3687. </compile>
  3688. </ajc-test>
  3689. <ajc-test dir="java5/generics/pointcuts" title="execution pcd with raw signature matching">
  3690. <compile files="GenericInterface.java,ConcreteImplementingClass.java,GenericImplementingClass.java,RawSignatureMatching.aj" options="-1.5">
  3691. <message kind="warning" line="4" text="execution(* GenericInterface.asInt(Number))"/>
  3692. <message kind="warning" line="5" text="execution(* GenericInterface.asInt(Number))"/>
  3693. </compile>
  3694. </ajc-test>
  3695. <ajc-test dir="java5/generics/pointcuts" title="execution with various parameterizations and generic types - errors">
  3696. <compile files="ExecutionPointcutMatchingErrorCases.aj" options="-1.5">
  3697. <message kind="warning" line="4" text="no match for this type name: T"/>
  3698. <message kind="error" line="4" text="can't use parameterized type patterns for the declaring type of an execution pointcut expression (use the raw type instead)"/>
  3699. <message kind="error" line="5" text="can't use parameterized type patterns for the declaring type of an execution pointcut expression (use the raw type instead)"/>
  3700. <message kind="error" line="6" text="invalid throws pattern: a generic class may not be a direct or indirect subclass of Throwable"/>
  3701. </compile>
  3702. </ajc-test>
  3703. <ajc-test dir="java5/generics/pointcuts" title="execution with various parameterizations and generic types - matching">
  3704. <compile files="ExecutionPointcutMatchingParamAndReturnTypes.aj" options="-1.5">
  3705. <message kind="warning" line="35" text="raw param type matching in execution ok"/>
  3706. <message kind="warning" line="67" text="raw return type matching in execution ok"/>
  3707. <message kind="warning" line="38" text="erasure type matching in execution ok"/>
  3708. <message kind="warning" line="42" text="erasure type matching in execution ok"/>
  3709. <message kind="warning" line="61" text="execution and parameterized method ok"/>
  3710. <message kind="warning" line="61" text="execution and generic interface ok"/>
  3711. <message kind="warning" line="65" text="execution and interface control test"/>
  3712. <message kind="warning" line="35" text="match on parameterized args"/>
  3713. <message kind="warning" line="67" text="match on parameterized return type"/>
  3714. </compile>
  3715. </ajc-test>
  3716. <ajc-test dir="java5/generics/pointcuts" title="execution with overriding of inherited generic members">
  3717. <compile files="ExecutionOverriding.aj" options="-1.5">
  3718. <message kind="warning" line="36" text="wildcard declaring type match on erasure"/>
  3719. <message kind="warning" line="49" text="wildcard declaring type match on erasure"/>
  3720. <message kind="warning" line="62" text="wildcard declaring type match on erasure"/>
  3721. <message kind="warning" line="36" text="base declaring type match on erasure"/>
  3722. <message kind="warning" line="49" text="base declaring type match on erasure"/>
  3723. <message kind="warning" line="62" text="base declaring type match on erasure"/>
  3724. <message kind="warning" line="49" text="sub type match on erasure"/>
  3725. <message kind="warning" line="62" text="parameterized match on erasure"/>
  3726. <message kind="warning" line="79" text="erasure match on base interface"/>
  3727. <message kind="warning" line="79" text="wildcard match on erasure"/>
  3728. <message kind="warning" line="79" text="parameterized match"/>
  3729. </compile>
  3730. </ajc-test>
  3731. <ajc-test dir="java5/generics/pointcuts" title="execution pcd with generic declaring type and erased parameter types">
  3732. <compile files="GenericInterface.java,ConcreteImplementingClass.java,GenericImplementingClass.java,GenericDeclaringTypeWithParameterErasure.aj" options="-1.5">
  3733. </compile>
  3734. </ajc-test>
  3735. <ajc-test dir="java5/generics/pointcuts" title="execution pcd with generic signature matching">
  3736. <compile files="GenericInterface.java,ConcreteImplementingClass.java,GenericImplementingClass.java,GenericSignatureMatching.aj" options="-1.5">
  3737. <message kind="warning" line="4" text="execution&lt;T&gt;(* GenericInterface&lt;T extends Number&gt;.asInt(T))"/>
  3738. <message kind="warning" line="5" text="execution&lt;T&gt;(* GenericInterface&lt;T extends Number&gt;.asInt(T))"/>
  3739. </compile>
  3740. </ajc-test>
  3741. <ajc-test dir="java5/generics/pointcuts" title="call with various parameterizations and generic types - errors">
  3742. <compile files="CallPointcutMatchingErrorCases.aj" options="-1.5">
  3743. <message kind="warning" line="4" text="no match for this type name: T"/>
  3744. <message kind="error" line="4" text="can't use parameterized type patterns for the declaring type of a call pointcut expression (use the raw type instead)"/>
  3745. <message kind="error" line="5" text="can't use parameterized type patterns for the declaring type of a call pointcut expression (use the raw type instead)"/>
  3746. <message kind="error" line="6" text="invalid throws pattern: a generic class may not be a direct or indirect subclass of Throwable"/>
  3747. </compile>
  3748. </ajc-test>
  3749. <ajc-test dir="java5/generics/pointcuts" title="call with various parameterizations and generic types - matching">
  3750. <compile files="CallPointcutMatchingParamAndReturnTypes.aj" options="-1.5">
  3751. <message kind="warning" line="7" text="raw param type matching in call ok"/>
  3752. <message kind="warning" line="8" text="raw return type matching in call ok"/>
  3753. <message kind="warning" line="9" text="erasure type matching in call ok"/>
  3754. <message kind="warning" line="10" text="erasure type matching in call ok"/>
  3755. <message kind="warning" line="11" text="call and parameterized method ok"/>
  3756. <message kind="warning" line="11" text="call and generic interface ok"/>
  3757. <message kind="warning" line="12" text="call and interface control test"/>
  3758. <message kind="warning" line="7" text="match on parameterized args"/>
  3759. <message kind="warning" line="8" text="match on parameterized return type"/>
  3760. </compile>
  3761. </ajc-test>
  3762. <ajc-test dir="java5/generics/pointcuts" title="call with overriding of inherited generic members">
  3763. <compile files="CallOverriding.aj" options="-1.5">
  3764. <message kind="warning" line="8" text="wildcard declaring type match on erasure"/>
  3765. <message kind="warning" line="9" text="wildcard declaring type match on erasure"/>
  3766. <message kind="warning" line="10" text="wildcard declaring type match on erasure"/>
  3767. <message kind="warning" line="8" text="base declaring type match on erasure"/>
  3768. <message kind="warning" line="9" text="base declaring type match on erasure"/>
  3769. <message kind="warning" line="10" text="base declaring type match on erasure"/>
  3770. <message kind="warning" line="9" text="sub type match on erasure"/>
  3771. <message kind="warning" line="10" text="parameterized match on erasure"/>
  3772. <message kind="warning" line="87" text="erasure match on base interface"/>
  3773. <message kind="warning" line="87" text="wildcard match on erasure"/>
  3774. <message kind="warning" line="87" text="parameterized match"/>
  3775. </compile>
  3776. </ajc-test>
  3777. <ajc-test dir="java5/generics/pointcuts" title="call with bridge methods">
  3778. <compile files="CallWithBridgeMethods.aj" options="-1.5">
  3779. <message kind="warning" line="23" text="should match call to bridge method on L23, this is a real call!"/>
  3780. </compile>
  3781. </ajc-test>
  3782. <ajc-test dir="java5/generics/pointcuts" title="args with raw type and generic / parameterized sigs">
  3783. <compile files="RawArgs.aj" options="-1.5">
  3784. </compile>
  3785. <run class="RawArgs">
  3786. <stdout>
  3787. <line text="args(List) match at call(void Generic.foo(List))"/>
  3788. <line text="args(List) match at call(void Generic.bar(List))"/>
  3789. <line text="args(List) match at call(void Generic.tada(List))"/>
  3790. <line text="args(List) match at call(void Generic.tada(List))"/>
  3791. <line text="args(List) match at call(void Generic.tada(List))"/>
  3792. </stdout>
  3793. </run>
  3794. </ajc-test>
  3795. <ajc-test dir="java5/generics/pointcuts" title="args with parameterized type and generic / parameterized sigs">
  3796. <compile files="ArgsParameterized.aj" options="-1.5">
  3797. <message kind="warning" line="28" text="unchecked match of List&lt;String&gt; with List"/>
  3798. </compile>
  3799. <run class="ArgsParameterized">
  3800. <stdout>
  3801. <line text="args(List&lt;String&gt; matched at call(void Generic.foo(List))"/>
  3802. <line text="args(List&lt;String&gt; matched at call(void Generic.bar(List))"/>
  3803. <line text="args(List&lt;String&gt; matched at call(void Generic.tada(List))"/>
  3804. <line text="args(List&lt;String&gt; matched at call(void Generic.something(List))"/>
  3805. <line text="args(List&lt;String&gt; matched at call(void MustBeString.listit(List))"/>
  3806. </stdout>
  3807. </run>
  3808. </ajc-test>
  3809. <ajc-test dir="java5/generics/pointcuts" title="args with parameterized type and wildcards">
  3810. <compile files="ArgsParameterizedWithWildcards.aj" options="-1.5">
  3811. <message kind="warning" line="10" text="unchecked match of List&lt;Double&gt; with List when argument is an instance of List"/>
  3812. <message kind="warning" line="10" text="unchecked match of List&lt;Double&gt; with List&lt;? extends Double&gt; when argument is an instance of List"/>
  3813. <message kind="warning" line="10" text="unchecked match of List&lt;Double&gt; with List&lt;? extends Number&gt; when argument is an instance of List"/>
  3814. <message kind="warning" line="10" text="unchecked match of List&lt;Double&gt; with List&lt;?&gt; when argument is an instance of List"/>
  3815. </compile>
  3816. <run class="ArgsParameterizedWithWildcards">
  3817. <stdout>
  3818. <line text="List&lt;Double&gt; matched at execution(void C.rawList(List))"/>
  3819. <line text="List&lt;Double&gt; matched at execution(void C.listOfSomething(List))"/>
  3820. <line text="List&lt;Double&gt; matched at execution(void C.listOfSomeNumber(List))"/>
  3821. <line text="List&lt;Double&gt; matched at execution(void C.listOfDouble(List))"/>
  3822. <line text="List&lt;Double&gt; matched at execution(void C.listOfSomeDouble(List))"/>
  3823. </stdout>
  3824. </run>
  3825. </ajc-test>
  3826. <ajc-test dir="java5/generics/pointcuts" title="args with generic wildcard">
  3827. <compile files="ArgsListOfSomething.aj" options="-1.5">
  3828. </compile>
  3829. <run class="ArgsListOfSomething">
  3830. <stdout>
  3831. <line text="List&lt;?&gt; matches execution(void ArgsListOfSomething.rawList(List))"/>
  3832. <line text="List&lt;?&gt; matches execution(void ArgsListOfSomething.listOfString(List))"/>
  3833. <line text="List&lt;?&gt; matches execution(void ArgsListOfSomething.listOfSomething(List))"/>
  3834. <line text="List&lt;?&gt; matches execution(void ArgsListOfSomething.listOfSomethingExtends(List))"/>
  3835. <line text="List&lt;?&gt; matches execution(void ArgsListOfSomething.listOfSomethingSuper(List))"/>
  3836. <line text="wild map matches execution(void ArgsListOfSomething.mapit(Map))"/>
  3837. <line text="exact wild map matches execution(void ArgsListOfSomething.mapit(Map))"/>
  3838. <line text="super type exact matches execution(void ArgsListOfSomething.setOf(HashSet))"/>
  3839. <line text="super wild type matches execution(void ArgsListOfSomething.setOf(HashSet))"/>
  3840. </stdout>
  3841. </run>
  3842. </ajc-test>
  3843. <ajc-test dir="java5/generics/pointcuts" title="args with generic wildcard extends">
  3844. <compile files="ArgsListOfSomethingExtends.aj" options="-1.5">
  3845. <message kind="warning" line="27" text="unchecked match of List&lt;? extends Number&gt; with List"/>
  3846. <message kind="warning" line="27" text="unchecked match of List&lt;? extends Number&gt; with List&lt;?&gt;"/>
  3847. </compile>
  3848. <run class="ArgsListOfSomethingExtends">
  3849. <stdout>
  3850. <line text="List&lt;? extends Number&gt; matches execution(void ArgsListOfSomethingExtends.rawList(List))"/>
  3851. <line text="List&lt;? extends Number&gt; matches execution(void ArgsListOfSomethingExtends.listOfNumber(List))"/>
  3852. <line text="List&lt;? extends Number&gt; matches execution(void ArgsListOfSomethingExtends.listOfDouble(List))"/>
  3853. <line text="List&lt;? extends Number&gt; matches execution(void ArgsListOfSomethingExtends.listOfSomething(List))"/>
  3854. <line text="List&lt;? extends Number&gt; matches execution(void ArgsListOfSomethingExtends.listOfSomethingExtends(List))"/>
  3855. </stdout>
  3856. </run>
  3857. </ajc-test>
  3858. <ajc-test dir="java5/generics/pointcuts" title="args with generic wildcard super">
  3859. <compile files="ArgsListOfSomethingSuper.aj" options="-1.5">
  3860. <message kind="warning" line="32" text="unchecked match of List&lt;? super Number&gt; with List"/>
  3861. <message kind="warning" line="32" text="unchecked match of List&lt;? super Number&gt; with List&lt;?&gt;"/>
  3862. <message kind="warning" line="32" text="unchecked match of List&lt;? super Number&gt; with List&lt;? extends Number&gt;"/>
  3863. </compile>
  3864. <run class="ArgsListOfSomethingSuper">
  3865. <stdout>
  3866. <line text="List&lt;? super Number&gt; matches execution(void ArgsListOfSomethingSuper.rawList(List))"/>
  3867. <line text="List&lt;? super Number&gt; matches execution(void ArgsListOfSomethingSuper.listOfObject(List))"/>
  3868. <line text="List&lt;? super Number&gt; matches execution(void ArgsListOfSomethingSuper.listOfNumber(List))"/>
  3869. <line text="List&lt;? super Number&gt; matches execution(void ArgsListOfSomethingSuper.listOfSomething(List))"/>
  3870. <line text="List&lt;? super Number&gt; matches execution(void ArgsListOfSomethingSuper.listOfSomethingSuper(List))"/>
  3871. <line text="List&lt;? super Number&gt; matches execution(void ArgsListOfSomethingSuper.listOfSomethingExtendsNumber(List))"/>
  3872. </stdout>
  3873. </run>
  3874. </ajc-test>
  3875. <ajc-test dir="java5/generics/pointcuts" title="generic method matching">
  3876. <compile files="GenericMethods.aj" options="-1.5">
  3877. <message kind="warning" line="19" text="static generic method match"/>
  3878. <message kind="warning" line="34" text="static generic method match"/>
  3879. <message kind="warning" line="24" text="instance generic method match"/>
  3880. <message kind="warning" line="39" text="instance generic method match"/>
  3881. </compile>
  3882. </ajc-test>
  3883. <ajc-test dir="java5/generics/pointcuts" title="generic wildcards in signature matching">
  3884. <compile files="GenericWildcardsInSignatureMatching.aj" options="-1.5">
  3885. <message kind="warning" line="5" text="set of a list"/>
  3886. <message kind="warning" line="7" text="exact nested wildcard match"/>
  3887. <message kind="warning" line="7" text="wildcard nested wildcard match"/>
  3888. <message kind="warning" line="11" text="super"/>
  3889. <message kind="warning" line="15" text="super wild match"/>
  3890. </compile>
  3891. </ajc-test>
  3892. <!-- end of generics and pointcuts tests -->
  3893. <ajc-test dir="java5/generics/afterAdvice" title="after throwing with parameterized throw type">
  3894. <compile files="AfterThrowing.aj" options="-1.5">
  3895. <message kind="error" line="6" text="cannot convert from List&lt;String&gt; to Throwable"/>
  3896. </compile>
  3897. </ajc-test>
  3898. <ajc-test dir="java5/generics/afterAdvice" title="after returning with raw type and generic / parameterized sigs">
  3899. <compile files="AfterReturningRawType.aj" options="-1.5">
  3900. </compile>
  3901. <run class="AfterReturningRawType">
  3902. <stdout>
  3903. <line text="returning(List) match at call(List Generic.foo(List))"/>
  3904. <line text="returning(List) match at call(List Generic.bar(List))"/>
  3905. <line text="returning(List) match at call(List Generic.tada(List))"/>
  3906. <line text="returning(List) match at call(List Generic.tada(List))"/>
  3907. <line text="returning(List) match at call(List Generic.tada(List))"/>
  3908. </stdout>
  3909. </run>
  3910. </ajc-test>
  3911. <ajc-test dir="java5/generics/afterAdvice" title="after returning with parameterized type and generic / parameterized sigs">
  3912. <compile files="AfterReturningParameterized.aj" options="-1.5">
  3913. <message kind="warning" line="28" text="unchecked match of List&lt;String&gt; with List"/>
  3914. </compile>
  3915. <run class="AfterReturningParameterized">
  3916. <stdout>
  3917. <line text="returning(List&lt;String&gt; matched at call(List Generic.foo(List))"/>
  3918. <line text="returning(List&lt;String&gt; matched at call(List Generic.bar(List))"/>
  3919. <line text="returning(List&lt;String&gt; matched at call(List Generic.tada(List))"/>
  3920. <line text="returning(List&lt;String&gt; matched at call(List Generic.something(List))"/>
  3921. <line text="returning(List&lt;String&gt; matched at call(List MustBeString.listit(List))"/>
  3922. </stdout>
  3923. </run>
  3924. </ajc-test>
  3925. <ajc-test dir="java5/generics/afterAdvice" title="after returning with parameterized type and wildcards">
  3926. <compile files="AfterReturningParameterizedWithWildcards.aj" options="-1.5">
  3927. <message kind="warning" line="10" text="unchecked match of List&lt;Double&gt; with List when argument is an instance of List"/>
  3928. <message kind="warning" line="10" text="unchecked match of List&lt;Double&gt; with List&lt;? extends Double&gt; when argument is an instance of List"/>
  3929. <message kind="warning" line="10" text="unchecked match of List&lt;Double&gt; with List&lt;? extends Number&gt; when argument is an instance of List"/>
  3930. <message kind="warning" line="10" text="unchecked match of List&lt;Double&gt; with List&lt;?&gt; when argument is an instance of List"/>
  3931. </compile>
  3932. <run class="AfterReturningParameterizedWithWildcards">
  3933. <stdout>
  3934. <line text="List&lt;Double&gt; matched at call(List C.rawList(List))"/>
  3935. <line text="List&lt;Double&gt; matched at call(List C.listOfSomething(List))"/>
  3936. <line text="List&lt;Double&gt; matched at call(List C.listOfSomeNumber(List))"/>
  3937. <line text="List&lt;Double&gt; matched at call(List C.listOfDouble(List))"/>
  3938. <line text="List&lt;Double&gt; matched at call(List C.listOfSomeDouble(List))"/>
  3939. </stdout>
  3940. </run>
  3941. </ajc-test>
  3942. <ajc-test dir="java5/generics/afterAdvice" title="after returning with generic wildcard">
  3943. <compile files="AfterReturningListOfSomething.aj" options="-1.5">
  3944. </compile>
  3945. <run class="AfterReturningListOfSomething">
  3946. <stdout>
  3947. <line text="List&lt;?&gt; matches execution(List AfterReturningListOfSomething.rawList(List))"/>
  3948. <line text="List&lt;?&gt; matches execution(List AfterReturningListOfSomething.listOfString(List))"/>
  3949. <line text="List&lt;?&gt; matches execution(List AfterReturningListOfSomething.listOfSomething(List))"/>
  3950. <line text="List&lt;?&gt; matches execution(List AfterReturningListOfSomething.listOfSomethingExtends(List))"/>
  3951. <line text="List&lt;?&gt; matches execution(List AfterReturningListOfSomething.listOfSomethingSuper(List))"/>
  3952. <line text="wild map matches execution(Map AfterReturningListOfSomething.mapit(Map))"/>
  3953. <line text="exact wild map matches execution(Map AfterReturningListOfSomething.mapit(Map))"/>
  3954. <line text="super type exact matches execution(HashSet AfterReturningListOfSomething.setOf(HashSet))"/>
  3955. <line text="super wild type matches execution(HashSet AfterReturningListOfSomething.setOf(HashSet))"/>
  3956. </stdout>
  3957. </run>
  3958. </ajc-test>
  3959. <ajc-test dir="java5/generics/afterAdvice" title="after returning with generic wildcard extends">
  3960. <compile files="AfterReturningListOfSomethingExtends.aj" options="-1.5">
  3961. <message kind="warning" line="27" text="unchecked match of List&lt;? extends Number&gt; with List"/>
  3962. <message kind="warning" line="27" text="unchecked match of List&lt;? extends Number&gt; with List&lt;?&gt;"/>
  3963. </compile>
  3964. <run class="AfterReturningListOfSomethingExtends">
  3965. <stdout>
  3966. <line text="List&lt;? extends Number&gt; matches execution(List AfterReturningListOfSomethingExtends.rawList(List))"/>
  3967. <line text="List&lt;? extends Number&gt; matches execution(List AfterReturningListOfSomethingExtends.listOfNumber(List))"/>
  3968. <line text="List&lt;? extends Number&gt; matches execution(List AfterReturningListOfSomethingExtends.listOfDouble(List))"/>
  3969. <line text="List&lt;? extends Number&gt; matches execution(List AfterReturningListOfSomethingExtends.listOfSomething(List))"/>
  3970. <line text="List&lt;? extends Number&gt; matches execution(List AfterReturningListOfSomethingExtends.listOfSomethingExtends(List))"/>
  3971. </stdout>
  3972. </run>
  3973. </ajc-test>
  3974. <ajc-test dir="java5/generics/afterAdvice" title="after returning with generic wildcard super">
  3975. <compile files="AfterReturningListOfSomethingSuper.aj" options="-1.5">
  3976. <message kind="warning" line="32" text="unchecked match of List&lt;? super Number&gt; with List"/>
  3977. <message kind="warning" line="32" text="unchecked match of List&lt;? super Number&gt; with List&lt;?&gt;"/>
  3978. <message kind="warning" line="32" text="unchecked match of List&lt;? super Number&gt; with List&lt;? extends Number&gt;"/>
  3979. </compile>
  3980. <run class="AfterReturningListOfSomethingSuper">
  3981. <stdout>
  3982. <line text="List&lt;? super Number&gt; matches execution(List AfterReturningListOfSomethingSuper.rawList(List))"/>
  3983. <line text="List&lt;? super Number&gt; matches execution(List AfterReturningListOfSomethingSuper.listOfObject(List))"/>
  3984. <line text="List&lt;? super Number&gt; matches execution(List AfterReturningListOfSomethingSuper.listOfNumber(List))"/>
  3985. <line text="List&lt;? super Number&gt; matches execution(List AfterReturningListOfSomethingSuper.listOfSomething(List))"/>
  3986. <line text="List&lt;? super Number&gt; matches execution(List AfterReturningListOfSomethingSuper.listOfSomethingSuper(List))"/>
  3987. <line text="List&lt;? super Number&gt; matches execution(List AfterReturningListOfSomethingSuper.listOfSomethingExtendsNumber(List))"/>
  3988. </stdout>
  3989. </run>
  3990. </ajc-test>
  3991. <ajc-test title="ajdk notebook: erasure matching examples" dir="java5/generics/ajdk">
  3992. <compile files="ErasureMatching.aj" options="-1.5">
  3993. <message kind="warning" line="18" text="static generic method match"/>
  3994. <message kind="warning" line="21" text="instance generic method match"/>
  3995. <message kind="warning" line="31" text="method in generic type match"/>
  3996. <message kind="warning" line="28" text="field in generic type match"/>
  3997. </compile>
  3998. </ajc-test>
  3999. <ajc-test title="ajdk notebook: simple parameterized type matching examples" dir="java5/generics/ajdk">
  4000. <compile files="SimpleParameterizedTypeExamples.aj" options="-1.5">
  4001. <message kind="warning" line="34" text="get myStrings 1"/>
  4002. <message kind="warning" line="34" text="get myStrings 2"/>
  4003. <message kind="warning" line="38" text="get myStrings 1"/>
  4004. <message kind="warning" line="38" text="get myStrings 2"/>
  4005. <message kind="warning" line="35" text="get myFloats 1"/>
  4006. <message kind="warning" line="35" text="get myFloats 2"/>
  4007. <message kind="warning" line="35" text="get myFloats 3"/>
  4008. <message kind="warning" line="34" text="getter 1"/>
  4009. <message kind="warning" line="35" text="getter 1"/>
  4010. <message kind="warning" line="34" text="getter 2"/>
  4011. <message kind="warning" line="35" text="getter 2"/>
  4012. <message kind="warning" line="34" text="getter 3"/>
  4013. <message kind="warning" line="35" text="getter 4"/>
  4014. <message kind="warning" line="25" text="call 1"/>
  4015. <message kind="warning" line="25" text="call 2"/>
  4016. </compile>
  4017. </ajc-test>
  4018. <ajc-test title="ajdk notebook: mixed parameterized types and generic methods" dir="java5/generics/ajdk">
  4019. <compile files="MixedParameterizedAndTypeVariables.aj" options="-1.5">
  4020. <message kind="warning" line="13" text="erasure match"/>
  4021. <message kind="warning" line="13" text="mixed match"/>
  4022. <message kind="warning" line="13" text="params only match"/>
  4023. </compile>
  4024. </ajc-test>
  4025. <ajc-test title="ajdk notebook: signature matching with generic wildcards" dir="java5/generics/ajdk">
  4026. <compile files="SignatureWildcards.aj" options="-1.5">
  4027. <message kind="warning" line="13" text="any list"/>
  4028. <message kind="warning" line="15" text="any list"/>
  4029. <message kind="warning" line="17" text="any list"/>
  4030. <message kind="warning" line="13" text="only foo"/>
  4031. <message kind="warning" line="15" text="some list"/>
  4032. <message kind="warning" line="13" text="any list with upper bound"/>
  4033. <message kind="warning" line="15" text="any list with upper bound"/>
  4034. </compile>
  4035. </ajc-test>
  4036. <ajc-test title="ajdk notebook: bridge method examples" dir="java5/generics/ajdk">
  4037. <compile files="BridgeMethodExamples.aj" options="-1.5">
  4038. <message kind="warning" line="17" text="double match"/>
  4039. <message kind="warning" line="25" text="double match"/>
  4040. <message kind="warning" line="9" text="match"/>
  4041. <message kind="warning" line="11" text="match"/>
  4042. </compile>
  4043. </ajc-test>
  4044. <ajc-test title="ajdk notebook: args examples" dir="java5/generics/ajdk">
  4045. <compile files="ArgsExamples.aj" options="-1.5">
  4046. <message kind="warning" line="15" text="unchecked match of List&lt;Double&gt; with List&lt;? extends Number&gt; when argument is an instance of List at join point method-execution(void C.goo(List&lt;? extends Number&gt;)) [Xlint:uncheckedArgument]"/>
  4047. <message kind="warning" line="53" text="unchecked match"/>
  4048. </compile>
  4049. <run class="ArgsExamples">
  4050. <stdout>
  4051. <line text="args(List)"/>
  4052. <line text="args List of String"/>
  4053. <line text="args(List)"/>
  4054. <line text="args List of Double"/>
  4055. <line text="args(List)"/>
  4056. <line text="args List of Double"/>
  4057. </stdout>
  4058. </run>
  4059. </ajc-test>
  4060. <ajc-test title="ajdk notebook: after returning examples" dir="java5/generics/ajdk">
  4061. <compile files="AfterReturningExamples.aj" options="-1.5">
  4062. <message kind="warning" line="20" text="unchecked match of List&lt;Double&gt; with List&lt;? extends Number&gt;"/>
  4063. </compile>
  4064. <run class="AfterReturningExamples">
  4065. <stdout>
  4066. <line text="execution(List C.foo(List))"/>
  4067. <line text="raw s1"/>
  4068. <line text="raw s2"/>
  4069. <line text="execution(List C.bar(List))"/>
  4070. <line text="raw 5.0"/>
  4071. <line text="raw 10.0"/>
  4072. <line text="a1 5.0"/>
  4073. <line text="a1 10.0"/>
  4074. <line text="a2 5.0"/>
  4075. <line text="a2 10.0"/>
  4076. <line text="a3 5.0"/>
  4077. <line text="a3 10.0"/>
  4078. <line text="execution(List C.goo(List))"/>
  4079. <line text="raw 5.0"/>
  4080. <line text="raw 10.0"/>
  4081. <line text="a1 5.0"/>
  4082. <line text="a1 10.0"/>
  4083. <line text="a3 5.0"/>
  4084. <line text="a3 10.0"/>
  4085. </stdout>
  4086. </run>
  4087. </ajc-test>
  4088. <ajc-test title="ajdk notebook: args and wildcards examples" dir="java5/generics/ajdk">
  4089. <compile files="WildcardArgsExamples.aj" options="-1.5">
  4090. <message kind="warning" line="6" text="unchecked match of List&lt;? extends Number&gt; with List"/>
  4091. </compile>
  4092. <run class="WildcardArgsExamples">
  4093. <stdout>
  4094. <line text="advice match at call(void C.foo(Object))"/>
  4095. <line text="advice match at call(void C.foo(Object))"/>
  4096. <line text="advice match 2 at call(void C.goo1(List))"/>
  4097. <line text="advice match 2 at call(void C.goo2(List))"/>
  4098. <line text="advice match 2 at call(void C.goo4(List))"/>
  4099. </stdout>
  4100. </run>
  4101. </ajc-test>
  4102. <ajc-test title="ajdk notebook: pointcut in generic class example" dir="java5/generics/ajdk">
  4103. <compile files="PointcutInGenericClassExample.aj" options="-1.5">
  4104. <message kind="warning" line="23" text="parameterized with C"/>
  4105. <message kind="warning" line="29" text="parameterized with D"/>
  4106. </compile>
  4107. </ajc-test>
  4108. <!-- ============================================================== -->
  4109. <!-- End of generics tests -->
  4110. <!-- ============================================================== -->
  4111. <ajc-test dir="bugs150/pr98901" title="public method with declare @method">
  4112. <compile files="Case01.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4113. <run class="B01">
  4114. <stdout>
  4115. <line text="@anInterface()"/>
  4116. </stdout>
  4117. </run>
  4118. </ajc-test>
  4119. <ajc-test dir="bugs150" title="Compiler error due to a wrong exception check in try blocks">
  4120. <compile files="pr82989.aj" options="-1.5"/>
  4121. </ajc-test>
  4122. <ajc-test dir="bugs150/pr98901" title="public method on the aspect that declares @method on it">
  4123. <compile files="Case02.aj" options="-1.5 -Xlint:error"/>
  4124. <run class="B02">
  4125. <stdout>
  4126. <line text="@anInterface()"/>
  4127. </stdout>
  4128. </run>
  4129. </ajc-test>
  4130. <ajc-test dir="bugs150/pr98901" title="public annotated method">
  4131. <compile files="Case03.aj" options="-1.5 -Xlint:error"/>
  4132. <run class="B03">
  4133. <stdout>
  4134. <line text="@anInterface()"/>
  4135. </stdout>
  4136. </run>
  4137. </ajc-test>
  4138. <ajc-test dir="bugs150/pr98901" title="public ITD method with declare @method">
  4139. <compile files="Case04.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4140. <run class="B04">
  4141. <stdout>
  4142. <line text="@anInterface()"/>
  4143. </stdout>
  4144. </run>
  4145. </ajc-test>
  4146. <ajc-test dir="bugs150/pr98901" title="public annotated ITD method">
  4147. <compile files="Case05.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4148. <run class="B05">
  4149. <stdout>
  4150. <line text="@anInterface()"/>
  4151. </stdout>
  4152. </run>
  4153. </ajc-test>
  4154. <ajc-test dir="bugs150/pr98901" title="public ITD-on-itself method with declare @method">
  4155. <compile files="Case06.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4156. <run class="B06">
  4157. <stdout>
  4158. <line text="@anInterface()"/>
  4159. </stdout>
  4160. </run>
  4161. </ajc-test>
  4162. <ajc-test dir="bugs150/pr98901" title="public annotated ITD-on-itself method">
  4163. <compile files="Case07.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4164. <run class="B07">
  4165. <stdout>
  4166. <line text="@anInterface()"/>
  4167. </stdout>
  4168. </run>
  4169. </ajc-test>
  4170. <ajc-test dir="bugs150/pr98901" title="public method on an Interface with declare @method">
  4171. <compile files="Case08.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4172. <run class="B08">
  4173. <stdout>
  4174. <line text="@anInterface()"/>
  4175. </stdout>
  4176. </run>
  4177. </ajc-test>
  4178. <ajc-test dir="bugs150/pr98901" title="public annotated method on an Interface">
  4179. <compile files="Case09.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4180. <run class="B09">
  4181. <stdout>
  4182. <line text="@anInterface()"/>
  4183. </stdout>
  4184. </run>
  4185. </ajc-test>
  4186. <ajc-test dir="bugs150/pr98901" title="public ITD method onto an Interface with declare @method">
  4187. <compile files="Case10.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4188. <run class="B10">
  4189. <stdout>
  4190. <line text="@anInterface()"/>
  4191. </stdout>
  4192. </run>
  4193. </ajc-test>
  4194. <ajc-test dir="bugs150/pr98901" title="public annotated ITD method onto an Interface">
  4195. <compile files="Case11.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4196. <run class="B11">
  4197. <stdout>
  4198. <line text="@anInterface()"/>
  4199. </stdout>
  4200. </run>
  4201. </ajc-test>
  4202. <ajc-test dir="bugs150/pr98901" title="public abstract method with declare @method">
  4203. <compile files="Case12.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4204. <run class="B12">
  4205. <stdout>
  4206. <line text="@anInterface()"/>
  4207. </stdout>
  4208. </run>
  4209. </ajc-test>
  4210. <ajc-test dir="bugs150/pr98901" title="public abstract method on the aspect that declares @method on it">
  4211. <compile files="Case13.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4212. <run class="B13">
  4213. <stdout>
  4214. <line text="@anInterface()"/>
  4215. </stdout>
  4216. </run>
  4217. </ajc-test>
  4218. <ajc-test dir="bugs150/pr98901" title="public abstract annotated method">
  4219. <compile files="Case14.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4220. <run class="B14">
  4221. <stdout>
  4222. <line text="@anInterface()"/>
  4223. </stdout>
  4224. </run>
  4225. </ajc-test>
  4226. <ajc-test dir="bugs150/pr98901" title="public abstract ITD method with declare @method">
  4227. <compile files="Case15.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4228. <run class="B15">
  4229. <stdout>
  4230. <line text="@anInterface()"/>
  4231. </stdout>
  4232. </run>
  4233. </ajc-test>
  4234. <ajc-test dir="bugs150/pr98901" title="public abstract annotated ITD method">
  4235. <compile files="Case16.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4236. <run class="B16">
  4237. <stdout>
  4238. <line text="@anInterface()"/>
  4239. </stdout>
  4240. </run>
  4241. </ajc-test>
  4242. <ajc-test dir="bugs150/pr98901" title="public abstract ITD-on-itself method with declare @method">
  4243. <compile files="Case17.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4244. <run class="B17">
  4245. <stdout>
  4246. <line text="@anInterface()"/>
  4247. </stdout>
  4248. </run>
  4249. </ajc-test>
  4250. <ajc-test dir="bugs150/pr98901" title="public abstract annotated ITD-on-itself method">
  4251. <compile files="Case18.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4252. <run class="B18">
  4253. <stdout>
  4254. <line text="@anInterface()"/>
  4255. </stdout>
  4256. </run>
  4257. </ajc-test>
  4258. <ajc-test dir="bugs150/pr98901" title="public abstract method on an Interface with declare @method">
  4259. <compile files="Case19.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4260. <run class="B19">
  4261. <stdout>
  4262. <line text="@anInterface()"/>
  4263. </stdout>
  4264. </run>
  4265. </ajc-test>
  4266. <ajc-test dir="bugs150/pr98901" title="public abstract annotated method on an Interface">
  4267. <compile files="Case20.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4268. <run class="B20">
  4269. <stdout>
  4270. <line text="@anInterface()"/>
  4271. </stdout>
  4272. </run>
  4273. </ajc-test>
  4274. <ajc-test dir="bugs150/pr98901" title="public abstract ITD method onto an Interface with declare @method">
  4275. <compile files="Case21.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4276. <run class="B21">
  4277. <stdout>
  4278. <line text="@anInterface()"/>
  4279. </stdout>
  4280. </run>
  4281. </ajc-test>
  4282. <ajc-test dir="bugs150/pr98901" title="public abstract annotated ITD method onto an Interface">
  4283. <compile files="Case22.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4284. <run class="B22">
  4285. <stdout>
  4286. <line text="@anInterface()"/>
  4287. </stdout>
  4288. </run>
  4289. </ajc-test>
  4290. <ajc-test dir="bugs150/pr98901" title="public field with declare @field">
  4291. <compile files="Case23.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4292. <run class="B23">
  4293. <stdout>
  4294. <line text="@anInterface()"/>
  4295. </stdout>
  4296. </run>
  4297. </ajc-test>
  4298. <ajc-test dir="bugs150/pr98901" title="public field on the aspect that declares @field on it">
  4299. <compile files="Case24.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4300. <run class="B24">
  4301. <stdout>
  4302. <line text="@anInterface()"/>
  4303. </stdout>
  4304. </run>
  4305. </ajc-test>
  4306. <ajc-test dir="bugs150/pr98901" title="public annotated field">
  4307. <compile files="Case25.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4308. <run class="B25">
  4309. <stdout>
  4310. <line text="@anInterface()"/>
  4311. </stdout>
  4312. </run>
  4313. </ajc-test>
  4314. <ajc-test dir="bugs150/pr98901" title="public ITD field with declare @field">
  4315. <compile files="Case26.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4316. <run class="B26">
  4317. <stdout>
  4318. <line text="@anInterface()"/>
  4319. </stdout>
  4320. </run>
  4321. </ajc-test>
  4322. <ajc-test dir="bugs150/pr98901" title="public annotated ITD field">
  4323. <compile files="Case27.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4324. <run class="B27">
  4325. <stdout>
  4326. <line text="@anInterface()"/>
  4327. </stdout>
  4328. </run>
  4329. </ajc-test>
  4330. <ajc-test dir="bugs150/pr98901" title="public ITD-on-itself field with declare @field">
  4331. <compile files="Case28.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4332. <run class="B28">
  4333. <stdout>
  4334. <line text="@anInterface()"/>
  4335. </stdout>
  4336. </run>
  4337. </ajc-test>
  4338. <ajc-test dir="bugs150/pr98901" title="public annotated ITD-on-itself field">
  4339. <compile files="Case29.aj" options="-1.5 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  4340. <run class="B29">
  4341. <stdout>
  4342. <line text="@anInterface()"/>
  4343. </stdout>
  4344. </run>
  4345. </ajc-test>
  4346. <ajc-test dir="bugs150" title="Unable to build shadows">
  4347. <compile files="pr109728.java" options="-1.5"/>
  4348. </ajc-test>
  4349. <ajc-test dir="bugs150/pr110788" title="bad generic decp - 1">
  4350. <compile files="Case1.java" options="-1.5">
  4351. <message kind="error" line="10" text="Cannot declare parent B&lt;java.lang.Number&gt; onto type C since it already has A&lt;java.lang.String&gt; in its hierarchy"/>
  4352. </compile>
  4353. </ajc-test>
  4354. <ajc-test dir="bugs150/pr110788" title="bad generic decp - 2">
  4355. <compile files="Case2.java" options="-1.5">
  4356. <message kind="error" line="8" text="Cannot declare parent A&lt;java.lang.Number&gt; onto type C since it already has A&lt;java.lang.String&gt; in its hierarchy"/>
  4357. </compile>
  4358. </ajc-test>
  4359. <ajc-test dir="bugs150/pr110788" title="bad generic decp - 3">
  4360. <compile files="Case3.java" options="-1.5"/>
  4361. </ajc-test>
  4362. <ajc-test dir="bugs150/pr110788" title="bad generic decp - 4">
  4363. <compile files="Case4.java" options="-1.5"/>
  4364. </ajc-test>
  4365. <ajc-test dir="bugs150/pr110927" title="cant create signature attribute">
  4366. <compile files="Case1.java" options="-1.5"/>
  4367. </ajc-test>
  4368. <ajc-test dir="bugs150/pr72834" title="broken dispatch">
  4369. <compile files="Trouble.java">
  4370. <message kind="error" line="7" text="package visible abstract inter-type declarations are not allowed"/>
  4371. <message kind="error" line="9" text="The method getName() is undefined for the type A"/>
  4372. </compile>
  4373. </ajc-test>
  4374. <ajc-test dir="bugs150/pr73856" title="missing accessor">
  4375. <compile files="MissingAccessor.java"/>
  4376. <run class="MissingAccessor"/>
  4377. </ajc-test>
  4378. <ajc-test dir="bugs150/pr90143" title="cant call super methods">
  4379. <compile files="A.aj"/>
  4380. </ajc-test>
  4381. <ajc-test dir="bugs150" title="cunning declare parents">
  4382. <compile files="pr92311.aj"/>
  4383. </ajc-test>
  4384. <ajc-test dir="bugs150" title="ITD varargs problem">
  4385. <compile files="pr110906.aj" options="-1.5"/>
  4386. <run class="pr110906">
  4387. <stdout>
  4388. <line text="a"/>
  4389. <line text="a"/>
  4390. <line text="a"/>
  4391. </stdout>
  4392. </run>
  4393. </ajc-test>
  4394. <ajc-test dir="bugs150" title="generic itds and abstract method error">
  4395. <compile files="pr102357.aj"/>
  4396. <run class="pr102357"/>
  4397. </ajc-test>
  4398. <ajc-test dir="bugs150" title="ITD varargs in constructor">
  4399. <compile files="pr111481.aj" options="-1.5"/>
  4400. <run class="pr111481">
  4401. <stdout>
  4402. <line text="a"/>
  4403. <line text="a"/>
  4404. </stdout>
  4405. </run>
  4406. </ajc-test>
  4407. <!-- generic ITDs -->
  4408. <ajc-test dir="java5/generics/itds/design" title="generic itds - design A">
  4409. <compile files="DesignA.java" options="-1.5"/>
  4410. </ajc-test>
  4411. <ajc-test dir="java5/generics/itds/design" title="generic itds - design B">
  4412. <compile files="DesignB.java" options="-1.5"/>
  4413. </ajc-test>
  4414. <ajc-test dir="java5/generics/itds/design" title="generic itds - design C">
  4415. <compile files="DesignC.java" options="-1.5"/>
  4416. </ajc-test>
  4417. </suite>