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.

ajc190_from150.xml 336KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <!-- AspectJ v1.5.0 Tests, adjusted to 1.9.0 -->
  3. <suite>
  4. <ajc-test dir="bugs150" title="abstract perthis in @AspectJ">
  5. <compile files="pr121197.aj" options="-1.9"/>
  6. </ajc-test>
  7. <ajc-test dir="bugs150" title="different numbers of type vars">
  8. <compile files="pr121575.aj" options="-1.9"/>
  9. <run class="pr121575"/>
  10. </ajc-test>
  11. <ajc-test dir="bugs150/pr121385" title="mixing aspect styles">
  12. <compile files="A.java" options="-1.9"/>
  13. <run class="A"/>
  14. </ajc-test>
  15. <ajc-test dir="java5/generics/tvars" title="different numbers of type vars - 2">
  16. <compile files="Case1.aj" options="-1.9 -showWeaveInfo">
  17. <message kind="weave" text="Join point 'method-execution(void MyClass.read(java.lang.String))' in Type 'MyClass' (Case1.aj:13) advised by before advice from 'MyAspect' (Case1.aj:5)"/>
  18. </compile>
  19. </ajc-test>
  20. <ajc-test dir="java5/generics/tvars" title="different numbers of type vars - 3">
  21. <compile files="Case2.aj" options="-1.9 -showWeaveInfo">
  22. <message kind="weave" text="Join point 'method-execution(void MyClass.read(java.lang.Number))' in Type 'MyClass' (Case2.aj:13) advised by before advice from 'MyAspect' (Case2.aj:5)"/>
  23. </compile>
  24. </ajc-test>
  25. <ajc-test dir="java5/generics/tvars" title="different numbers of type vars - 4">
  26. <compile files="Case3.aj" options="-1.9 -showWeaveInfo">
  27. <message kind="error" line="9" text="The type MyClass&lt;T,E&gt; must implement the inherited abstract method MyInterface&lt;T&gt;.read(T)"/>
  28. </compile>
  29. </ajc-test>
  30. <ajc-test dir="bugs150" title="access to private ITD from nested type">
  31. <compile files="pr118698.aj" options="-1.9"/>
  32. <run class="pr118698"/>
  33. </ajc-test>
  34. <ajc-test dir="bugs150" title="modifier overrides">
  35. <compile files="pr119749.aj" options="-1.9">
  36. <message kind="warning" line="26" text="C E.*()"/>
  37. <message kind="warning" line="25" text="D E.*()"/>
  38. <message kind="warning" line="17" text="aa @Me void m()"/>
  39. <message kind="warning" line="17" text="aa void m() throws Exception"/>
  40. <message kind="warning" line="17" text="aa * *(..) throws Exception"/>
  41. <message kind="warning" line="37" text="aa call void m() throws Exception"/>
  42. <message kind="warning" line="38" text="aa call void m() throws Exception"/>
  43. </compile>
  44. <run class="pr119749">
  45. <stdout>
  46. <line text="execution(void pr119749.C.m()): execMe[Me]"/>
  47. <line text="execution(void pr119749.C.m()): execEx"/>
  48. </stdout>
  49. </run>
  50. </ajc-test>
  51. <ajc-test dir="bugs150/pr120826" pr="120826" title="varargs NPE">
  52. <compile files="TestVarargs.java" options="-1.9"/>
  53. </ajc-test>
  54. <ajc-test dir="bugs150/pr112476/case1" title="binary weaving decp broken">
  55. <compile files="lib/A.java,lib/B.java,lib/C.java" outjar="library.jar" options="-1.9"/>
  56. <!-- library.jar on the aspectpath here just for resolution when compiling SuperC -->
  57. <compile aspectpath="library.jar" files="weaved/SuperC.java" outjar="newsuper.jar" options="-1.9"/>
  58. <compile inpath="library.jar,newsuper.jar" files="weaved/DeclareAspect.aj" options="-1.9 -showWeaveInfo">
  59. <message kind="weave" text="Setting superclass of type 'lib.C' (C.java) to 'weaved.SuperC' (DeclareAspect.aj)"/>
  60. </compile>
  61. <run class="weaved.SuperC">
  62. <stdout>
  63. <line text="Is [class lib.C] subcass of [class weaved.SuperC]? true"/>
  64. </stdout>
  65. </run>
  66. </ajc-test>
  67. <ajc-test dir="bugs150/pr114005" title="Annotated ITDFs - 1">
  68. <compile files="Declaration1.java" options="-1.9"/>
  69. <run class="Declaration1">
  70. <stdout>
  71. <line text="public java.lang.String Test.firstProperty has annotation:true"/>
  72. <line text="public java.lang.String Test.secondProperty has annotation:true"/>
  73. </stdout>
  74. </run>
  75. </ajc-test>
  76. <ajc-test dir="bugs150" pr="114495" title="parameterized pointcut and advice">
  77. <compile files="Pr114495.aj" options="-1.9">
  78. <message kind="warning" line="3" text="going()"/>
  79. </compile>
  80. <run class="Pr114495">
  81. <stdout>
  82. <line text="A.going()"/>
  83. <line text="AA.going()"/>
  84. </stdout>
  85. </run>
  86. </ajc-test>
  87. <ajc-test dir="bugs150" pr="112880" title="double parameter generic abstract type">
  88. <compile files="Pr112880.aj" options="-1.9"/>
  89. <run class="Pr112880">
  90. <stdout>
  91. <line text="method returning C1 or C2"/>
  92. <line text="method returning C1 or C2"/>
  93. </stdout>
  94. </run>
  95. </ajc-test>
  96. <ajc-test dir="bugs150/pr114005" title="Annotated ITDFs - 2">
  97. <compile files="Declaration2.java" options="-1.9"/>
  98. <run class="Declaration2">
  99. <stdout>
  100. <line text="public java.lang.String Test.firstProperty has annotation:true"/>
  101. <line text="public java.lang.String Test.secondProperty has annotation:true"/>
  102. </stdout>
  103. </run>
  104. </ajc-test>
  105. <ajc-test dir="bugs150" pr="114054" title="pertarget and negated pointcut">
  106. <compile files="Pr114054.aj" options="-1.9"/>
  107. <run class="Pr114054"/>
  108. </ajc-test>
  109. <ajc-test dir="bugs150" pr="121385" title="mixing styles">
  110. <compile files="pr121385.aj" options="-1.9"/>
  111. </ajc-test>
  112. <ajc-test dir="java5/decps" title="decps - 1">
  113. <compile files="Basic1.java" options="-1.9"/>
  114. <run class="Basic1"/>
  115. </ajc-test>
  116. <ajc-test dir="java5/decps" title="decps - 1b">
  117. <compile files="Basic1b.java" options="-1.9"/>
  118. <run class="Basic1b"/>
  119. </ajc-test>
  120. <ajc-test dir="java5/decps" title="decps - 2">
  121. <compile files="Basic2.java" options="-1.9 -showWeaveInfo">
  122. <message kind="weave" text="Join point 'method-execution(void X$I.m2())' in Type 'X' (Basic2.java:15) advised by before advice from 'X' (Basic2.java:23)"/>
  123. <message kind="weave" text="Type 'X$I' (Basic2.java) has intertyped method from 'X' (Basic2.java:'void X$I.m2()')"/>
  124. <message kind="weave" text="Extending interface set for type 'Basic2' (Basic2.java) to include 'X$I' (Basic2.java)"/>
  125. <message kind="weave" text="Type 'Basic2' (Basic2.java) has intertyped method from 'X' (Basic2.java:'void X$I.m2()')"/>
  126. <message kind="weave" text="Join point 'method-execution(void Basic2.main(java.lang.String[]))' in Type 'Basic2' (Basic2.java:2) advised by before advice from 'X' (Basic2.java:23)"/>
  127. </compile>
  128. <run class="Basic2"/>
  129. </ajc-test>
  130. <ajc-test dir="java5/decps" title="decps - 2b">
  131. <compile files="Basic2b.java" options="-1.9 -showWeaveInfo">
  132. <message kind="weave" text="Join point 'method-execution(void X$IIimpl.m2())' in Type 'X$IIimpl' (Basic2b.java:18) advised by before advice from 'X' (Basic2b.java:27)"/>
  133. <message kind="weave" text="Extending interface set for type 'Basic2b' (Basic2b.java) to include 'X$I' (Basic2b.java)"/>
  134. <message kind="weave" text="Join point 'method-execution(void Basic2b.main(java.lang.String[]))' in Type 'Basic2b' (Basic2b.java:4) advised by before advice from 'X' (Basic2b.java:27)"/>
  135. </compile>
  136. <run class="Basic2b"/>
  137. </ajc-test>
  138. <ajc-test dir="java5/decps" title="decps - 3">
  139. <compile files="Basic3.java" options="-1.9 -showWeaveInfo">
  140. <message kind="weave" text="Extending interface set for type 'Basic3' (Basic3.java) to include 'X$I' (Basic3.java)"/>
  141. <message kind="weave" text="Type 'Basic3' (Basic3.java) has intertyped method from 'X' (Basic3.java:'void X$I.m2()')"/>
  142. <message kind="weave" text="Type 'Basic3' (Basic3.java) has intertyped method from 'X' (Basic3.java:'void X$I.m3()')"/>
  143. <message kind="weave" text="Type 'Basic3' (Basic3.java) has intertyped method from 'X' (Basic3.java:'void X$I.m4()')"/>
  144. <message kind="weave" text="Join point 'method-call(void X$I.m2())' in Type 'Basic3' (Basic3.java:7) advised by before advice from 'X' (Basic3.java:29)"/>
  145. <message kind="weave" text="Join point 'method-call(void X$I.m3())' in Type 'Basic3' (Basic3.java:8) advised by before advice from 'X' (Basic3.java:29)"/>
  146. <message kind="weave" text="Join point 'method-call(void X$I.m2())' in Type 'Basic3' (Basic3.java:9) advised by before advice from 'X' (Basic3.java:29)"/>
  147. <message kind="weave" text="Join point 'method-call(void X$I.m4())' in Type 'Basic3' (Basic3.java:10) advised by before advice from 'X' (Basic3.java:29)"/>
  148. <message kind="weave" text="Type 'X$I' (Basic3.java) has intertyped method from 'X' (Basic3.java:'void X$I.m2()')"/>
  149. <message kind="weave" text="Type 'X$I' (Basic3.java) has intertyped method from 'X' (Basic3.java:'void X$I.m3()')"/>
  150. <message kind="weave" text="Type 'X$I' (Basic3.java) has intertyped method from 'X' (Basic3.java:'void X$I.m4()')"/>
  151. </compile>
  152. <run class="Basic3"/>
  153. </ajc-test>
  154. <ajc-test dir="java5/decps" title="decps - 3b">
  155. <compile files="Basic3b.java" options="-1.9 -showWeaveInfo">
  156. <message kind="weave" text="Extending interface set for type 'Basic3b' (Basic3b.java) to include 'X$I' (Basic3b.java)"/>
  157. <message kind="weave" text="Type 'Basic3b' (Basic3b.java) has intertyped method from 'X' (Basic3b.java:'void X$I.m2()')"/>
  158. <message kind="weave" text="Type 'Basic3b' (Basic3b.java) has intertyped method from 'X' (Basic3b.java:'void X$I.m3()')"/>
  159. <message kind="weave" text="Type 'Basic3b' (Basic3b.java) has intertyped method from 'X' (Basic3b.java:'void X$I.m4()')"/>
  160. <message kind="weave" text="Join point 'method-call(void X$I.m2())' in Type 'Basic3b' (Basic3b.java:7) advised by before advice from 'X' (Basic3b.java:35)"/>
  161. <message kind="weave" text="Join point 'method-call(void X$I.m3())' in Type 'Basic3b' (Basic3b.java:8) advised by before advice from 'X' (Basic3b.java:35)"/>
  162. <message kind="weave" text="Join point 'method-call(void X$I.m2())' in Type 'Basic3b' (Basic3b.java:9) advised by before advice from 'X' (Basic3b.java:35)"/>
  163. <message kind="weave" text="Join point 'method-call(void X$I.m4())' in Type 'Basic3b' (Basic3b.java:10) advised by before advice from 'X' (Basic3b.java:35)"/>
  164. </compile>
  165. <run class="Basic3b"/>
  166. </ajc-test>
  167. <ajc-test dir="java5/decps" title="decps - 3c">
  168. <compile files="Basic3c.java" options="-1.9">
  169. <message kind="error" text="@DeclareParents: defaultImpl=&quot;X$IImpl&quot; has a no argument constructor, but it is of incorrect visibility"/>
  170. </compile>
  171. </ajc-test>
  172. <ajc-test dir="bugs150/pr119570" pr="119570" title="spurious override method warning">
  173. <compile files="NodeImpl.java,INode.java,ParameterizedDP.java" options="-1.9"/>
  174. <run class="bugs.ParameterizedDP"/>
  175. </ajc-test>
  176. <ajc-test dir="bugs150/pr119570" pr="119570" title="spurious override method warning - 2">
  177. <compile files="ParameterizedDP.java,NodeImpl.java,INode.java" options="-1.9"/>
  178. <run class="bugs.ParameterizedDP"/>
  179. </ajc-test>
  180. <ajc-test dir="bugs150/pr119570" pr="119570" title="spurious override method warning - 3">
  181. <compile files="SimpleTest.java" options="-1.9"/>
  182. <run class="SimpleTest"/>
  183. </ajc-test>
  184. <ajc-test dir="bugs150/pr120521" pr="120521" title="named pointcut not resolved in pertarget pointcut">
  185. <compile files="PerTargetSubaspectError.java" options="-1.4"/>
  186. </ajc-test>
  187. <ajc-test dir="bugs150/pr119210" pr="119210" title="autoboxing around advice - 1">
  188. <compile files="TestLib.java,ThreadAspectLib.java" options="-1.9"/>
  189. <run class="TestLib">
  190. <stderr>
  191. <line text="obtaining five, got 3"/>
  192. </stderr>
  193. </run>
  194. </ajc-test>
  195. <ajc-test dir="bugs150/pr119210" pr="119210" title="autoboxing around advice - 2">
  196. <compile files="TestLib2.java,ThreadAspectLib2.java" options="-1.9"/>
  197. <run class="TestLib2">
  198. <stderr>
  199. <line text="obtaining five, got 3"/>
  200. </stderr>
  201. </run>
  202. </ajc-test>
  203. <ajc-test dir="bugs150/pr119210" pr="119210" title="autoboxing around advice - 3">
  204. <compile files="TestLib2.java,ThreadAspectLib2.java" options="-1.4">
  205. <message kind="error" line="16" text="incompatible return type applying to method-call(java.lang.Integer TestLib2.getFive())"/>
  206. <message kind="error" line="4" text="incompatible return type applying to method-call(java.lang.Integer TestLib2.getFive())"/>
  207. </compile>
  208. </ajc-test>
  209. <ajc-test dir="bugs150/pr119539" pr="119539" title="generic pertypewithin aspect - 1">
  210. <compile files="GenericPerTypeWithin.java" options="-1.9 -showWeaveInfo">
  211. <message kind="weave" text="Join point 'constructor-execution(void bugs.C.&lt;init&gt;())' in Type 'bugs.C' (GenericPerTypeWithin.java:10) advised by before advice from 'bugs.A' (GenericPerTypeWithin.java:21)"/>
  212. <message kind="weave" text="Join point 'constructor-execution(void bugs.C.&lt;init&gt;())' in Type 'bugs.C' (GenericPerTypeWithin.java:10) advised by before advice from 'bugs.A' (GenericPerTypeWithin.java:20)"/>
  213. </compile>
  214. <run class="bugs.GenericPerTypeWithin"/>
  215. </ajc-test>
  216. <ajc-test dir="bugs150/pr119539" pr="119539" title="generic pertypewithin aspect - 2">
  217. <compile files="GenericPerTypeWithin2.java" options="-1.9 -showWeaveInfo">
  218. <message kind="error" line="24" text="a generic super-aspect must be fully parameterized in an extends clause"/>
  219. </compile>
  220. </ajc-test>
  221. <ajc-test dir="bugs150/pr119539" pr="119539" title="generic pertypewithin aspect - 3">
  222. <compile files="GenericPerTypeWithin3.java" options="-1.9 -showWeaveInfo">
  223. <message kind="weave" text="Join point 'constructor-execution(void bugs.GenericPerTypeWithin3$C.&lt;init&gt;())' in Type 'bugs.GenericPerTypeWithin3$C' (GenericPerTypeWithin3.java:15) advised by before advice from 'bugs.GenericPerTypeWithin3$A' (GenericPerTypeWithin3.java:10)"/>
  224. <message kind="warning" line="15" text="Singleton.creation()"/>
  225. </compile>
  226. <run class="bugs.GenericPerTypeWithin3"/>
  227. </ajc-test>
  228. <ajc-test dir="bugs150/pr117854" pr="117854" title="broken switch transform">
  229. <compile files="BrokenSwitch.java" options="-1.9"/>
  230. <run class="BrokenSwitch"/>
  231. </ajc-test>
  232. <ajc-test dir="bugs150/pr119749" pr="119749" title="incorrect exception signature matching">
  233. <compile files="InheritedThrows.java" options="-1.9 -showWeaveInfo">
  234. <message kind="weave" text="Join point 'method-execution(void InheritedThrows$NestedClassBoth.m())' in Type 'InheritedThrows$NestedClassBoth' (InheritedThrows.java:24) advised by afterThrowing advice from 'InheritedThrows$A' (InheritedThrows.java:4)"/>
  235. <message kind="weave" text="Join point 'method-execution(void InheritedThrows$NestedClass1.m())' in Type 'InheritedThrows$NestedClass1' (InheritedThrows.java:16) advised by afterThrowing advice from 'InheritedThrows$A' (InheritedThrows.java:4)"/>
  236. </compile>
  237. </ajc-test>
  238. <ajc-test dir="bugs150/pr118599" pr="118599" title="ambiguous method when binary weaving - 1">
  239. <!-- separate compilation was failing -->
  240. <compile files="Attributable.java" outjar="foo.jar" options="-1.9"/>
  241. <compile files="AnAttributedClass.java" aspectpath="foo.jar" options="-1.9"/>
  242. </ajc-test>
  243. <ajc-test dir="bugs150/pr118599" pr="118599" title="ambiguous method when binary weaving - 2">
  244. <!-- complete compilation works -->
  245. <compile files="Attributable.java,AnAttributedClass.java" options="-1.9"/>
  246. </ajc-test>
  247. <ajc-test dir="bugs150" pr="104220" title="adviceexecution join point toString forms">
  248. <compile files="Pr104220.aj" options="-1.9"/>
  249. <run class="Pr104220">
  250. <stdout>
  251. <line text="adviceexecution"/>
  252. <line text="adviceexecution(void SomeAspect.before())"/>
  253. <line text="adviceexecution(SomeAspect.before())"/>
  254. <line text="adviceexecution(void SomeAspect.before())"/>
  255. </stdout>
  256. </run>
  257. </ajc-test>
  258. <ajc-test dir="bugs150" pr="112756" title="pointcut expression containing 'assert'">
  259. <compile files="Pr112756.aj" options="-1.9 -warn:assertIdentifier -Xdev:Pinpoint"/>
  260. </ajc-test>
  261. <ajc-test dir="bugs150/pr118781" pr="118781" title="verify error with around advice array sigs">
  262. <compile files="MyMain.java,MyAspect.java,MyClass.java" options="-1.9 -XnoInline"/>
  263. <run class="blah.MyMain"/>
  264. </ajc-test>
  265. <ajc-test dir="bugs150/pr117681" pr="117681" title="at declare parents">
  266. <compile files="Test.java,TestAspect.java,Audit.java,AuditImpl.java" options="-1.9"/>
  267. <run class="Test"/>
  268. </ajc-test>
  269. <ajc-test dir="bugs150/pr120474" pr="120474" title="Dollar classes">
  270. <compile files="$ProxyPr120474.java" options="-1.9"/>
  271. <compile files="X.aj" options="-1.4 -outxml"/>
  272. <run class="$ProxyPr120474" ltw="aop.xml">
  273. <stdout>
  274. </stdout>
  275. </run>
  276. </ajc-test>
  277. <ajc-test dir="bugs150/pr111667" pr="111667" title="lint for advice sorting">
  278. <compile files="A.java,X.java,Y.java" options="-1.9 -Xlint:warning">
  279. <message kind="warning" line="9" text="at this shadow method-execution(void A.m1()) no precedence is specified between advice applying from aspect X and aspect Y [Xlint:unorderedAdviceAtShadow]"/>
  280. </compile>
  281. </ajc-test>
  282. <ajc-test dir="bugs150/pr118326" pr="118326" title="illegal initialization - 1">
  283. <compile files="Foo.java,Bar.java" options="-1.9">
  284. <message kind="error" line="2" text="Type mismatch: cannot convert from null to int"/>
  285. <message kind="error" line="6" text="Type mismatch: cannot convert from Integer to int"/>
  286. <message kind="error" line="8" text="Type mismatch: cannot convert from String to int"/>
  287. </compile>
  288. </ajc-test>
  289. <ajc-test dir="bugs150/pr118326" pr="118326" title="illegal initialization - 2">
  290. <compile files="Foo.java,Bar.java" options="-1.9">
  291. <message kind="error" line="2" text="Type mismatch: cannot convert from null to int"/>
  292. <message kind="error" line="8" text="Type mismatch: cannot convert from String to int"/>
  293. </compile>
  294. </ajc-test>
  295. <ajc-test dir="bugs150/pr117296" pr="117296" title="self bounding generic types">
  296. <compile files="PropertySupport.java" options="-1.9"/>
  297. <run class="PropertySupport"/>
  298. </ajc-test>
  299. <ajc-test dir="bugs150" pr="113368" title="thisJoinPointStaticPart in if test">
  300. <compile files="Pr113368.aj" options="-1.9"/>
  301. <run class="Pr113368">
  302. </run>
  303. </ajc-test>
  304. <ajc-test dir="bugs150/pr87525" pr="87525" title="privilege problem with switch">
  305. <compile files="A.java,B.java" options="-1.9">
  306. <message kind="error" line="5" text="Fields accessible due to an aspect being privileged can not be used in switch statements"/>
  307. </compile>
  308. </ajc-test>
  309. <ajc-test dir="java5/reflection" title="pointcut parsing with ajc compiled pointcut references">
  310. <compile files="PointcutLibrary.aj,ReflectOnAjcCompiledPointcuts.java" options="-1.9"/>
  311. <run class="ReflectOnAjcCompiledPointcuts" classpath="../lib/bcel/bcel.jar"/>
  312. </ajc-test>
  313. <ajc-test dir="java5/reflection" title="reflection on itds">
  314. <compile files="InterTypeDeclarations.aj,ReflectOnCodeStyleITDs.java" options="-1.9 -Xlint:ignore -makeAjReflectable"/>
  315. <run class="ReflectOnCodeStyleITDs" classpath="../lib/bcel/bcel.jar">
  316. <stdout>
  317. <line text="public C.new(int, int, int)"/>
  318. <line text="C.new(int, int)"/>
  319. <line text="private C.new(int)"/>
  320. <line text="private C.new(int)"/>
  321. <line text="public C.new(int, int, int)"/>
  322. <line text="public C.new(int, int, int)"/>
  323. <line text="int C.getY()"/>
  324. <line text="int I.getY()"/>
  325. <line text="public int C.getZ()"/>
  326. <line text="public int I.getZ()"/>
  327. <line text="private int C.getX()"/>
  328. <line text="private int I.getX()"/>
  329. <line text="private int C.getX()"/>
  330. <line text="public int C.getZ()"/>
  331. <line text="public int I.getZ()"/>
  332. <line text="public int C.getZ()"/>
  333. <line text="int C.y"/>
  334. <line text="int I.y"/>
  335. <line text="public int C.z"/>
  336. <line text="public int I.z"/>
  337. <line text="private int C.x"/>
  338. <line text="private int I.x"/>
  339. <line text="private int C.x"/>
  340. <line text="public int C.z"/>
  341. <line text="public int I.z"/>
  342. <line text="public int C.z"/>
  343. </stdout>
  344. </run>
  345. </ajc-test>
  346. <ajc-test dir="java5/reflection" title="reflection on @DeclareParents">
  347. <compile files="AtAspectJDeclareParents.aj,ReflectOnAtAspectJDeclareParents.java" options="-1.9 -Xlint:ignore"/>
  348. <run class="ReflectOnAtAspectJDeclareParents" classpath="../lib/bcel/bcel.jar">
  349. <stdout>
  350. <line text="declare parents : C implements I"/>
  351. <line text="public int I.getX()"/>
  352. <line text="public void I.setX(int)"/>
  353. <line text="public int I.getX()"/>
  354. <line text="public int I.getX()"/>
  355. <line text="public void I.setX(int)"/>
  356. <line text="public int I.getX()"/>
  357. </stdout>
  358. </run>
  359. </ajc-test>
  360. <ajc-test dir="compatibility/case1" title="generating code for a 1.2.1 runtime - 1">
  361. <compile files="Simple.java" options="-1.9 -Xajruntimetarget:1.2"/>
  362. <run class="Simple" classpath="../lib/aspectj/lib/aspectjrt121.jar"/>
  363. </ajc-test>
  364. <ajc-test dir="compatibility/case2" title="generating code for a 1.2.1 runtime - 2">
  365. <compile files="TrackingErrors.aj,A.java" options="-1.9 -Xajruntimetarget:1.2 -Xlint:ignore"/>
  366. <run class="A" classpath="../lib/aspectj/lib/aspectjrt121.jar"/>
  367. </ajc-test>
  368. <ajc-test dir="java5/reflection" title="arg names in advice annotations">
  369. <compile files="AdviceWithArgs.aj" options="-1.9"/>
  370. <run class="AdviceWithArgs"/>
  371. </ajc-test>
  372. <ajc-test dir="java5/reflection" pr="114322" title="reflection on abstract ITDs (Billing example)">
  373. <compile files="ReflectBilling.java,Billing.aj" options="-1.9 -makeAjReflectable"/>
  374. <run class="ReflectBilling">
  375. <stdout>
  376. <line text="public void Customer.addCharge(long)"/>
  377. <line text="public long Local.callRate()"/>
  378. <line text="public long LongDistance.callRate()"/>
  379. <line text="public abstract long Connection.callRate()"/>
  380. <line text="public Customer Connection.payer"/>
  381. <line text="public long Customer.totalCharge"/>
  382. </stdout>
  383. </run>
  384. </ajc-test>
  385. <ajc-test dir="bugs150" pr="103157" title="returning(Object) binding">
  386. <compile files="Pr103157.aj" options="-1.4"/>
  387. <run class="Pr103157">
  388. <stdout>
  389. <line text="returning from staticinit"/>
  390. <line text="returning from preinit"/>
  391. <line text="returning from set"/>
  392. <line text="returning from cons exe"/>
  393. <line text="returning from init"/>
  394. </stdout>
  395. </run>
  396. </ajc-test>
  397. <ajc-test dir="bugs150" title="declare soft and adviceexecution" pr="103051">
  398. <compile files="Pr103051.aj" options="-1.9 -Xdev:Pinpoint"/>
  399. </ajc-test>
  400. <ajc-test dir="bugs150" title="declare soft and exclusions" pr="103097">
  401. <compile files="Pr103097.aj" options="-1.9 -Xlint:ignore"/>
  402. <run class="Pr103097"/>
  403. </ajc-test>
  404. <ajc-test dir="bugs150" title="Range problem">
  405. <compile files="pr109614.java" options="-1.4"/>
  406. <run class="pr109614"/>
  407. </ajc-test>
  408. <ajc-test dir="bugs150/pr114436" title="ClassFormatError binary weaving perthis">
  409. <compile files="SimpleTrace.aj,ConcreteSimpleTracing.aj" outjar="aspects.jar" options="-1.4"/>
  410. <compile files="TestClass.java" aspectpath="aspects.jar" options="-1.4"/>
  411. <run class="TestClass"/>
  412. </ajc-test>
  413. <ajc-test dir="bugs150/pr113066" title="possible static imports bug - 1">
  414. <compile files="Consts.java,TestNPE.java" options="-1.9"/>
  415. </ajc-test>
  416. <ajc-test dir="bugs150" title="parameterized type and around advice">
  417. <compile files="pr115250.aj" options="-1.9 -Xlint:ignore">
  418. <!-- this first error happens twice, once for each piece of around advice -->
  419. <message kind="error" line="10" text="incompatible return type applying to constructor-execution(void pr115250$C.&lt;init&gt;())"/>
  420. <message kind="error" line="17" text="incompatible return type applying to constructor-execution(void pr115250$C.&lt;init&gt;())"/>
  421. <message kind="error" line="27" text="incompatible return type applying to constructor-execution(void pr115250$C.&lt;init&gt;())"/>
  422. </compile>
  423. </ajc-test>
  424. <ajc-test dir="bugs150" title="parameterized type and around advice - 2">
  425. <compile files="pr115250_2.aj" options="-1.9 -Xlint:ignore -showWeaveInfo">
  426. <message kind="weave" text="Join point 'method-execution(pr115250_2$C pr115250_2$C.foo())' in Type 'pr115250_2$C' (pr115250_2.aj:7) advised by around advice from 'pr115250_2$A' (pr115250_2.aj:22)"/>
  427. <message kind="weave" text="Join point 'method-execution(pr115250_2$C pr115250_2$C.foo())' in Type 'pr115250_2$C' (pr115250_2.aj:7) advised by around advice from 'pr115250_2$Normal' (pr115250_2.aj:12)"/>
  428. </compile>
  429. <run class="pr115250_2">
  430. <stderr>
  431. <line text="funky advice running"/>
  432. </stderr>
  433. </run>
  434. </ajc-test>
  435. <ajc-test dir="bugs150/pr115788" title="parser exception">
  436. <compile files="AAA.java" options="-1.9">
  437. <message kind="warning" line="3" text="no match for this type name: Screen"/>
  438. </compile>
  439. </ajc-test>
  440. <ajc-test dir="bugs150/pr113066" title="possible static imports bug - 2">
  441. <compile files="Consts2.java,TestNPE2.java" options="-1.9">
  442. <message kind="error" line="2" text="The field Consts2.a.Consts2.A_CONST is not visible"/>
  443. <!-- message has changed with 3.3 compiler upgrade, it used to be this: -->
  444. <!-- message kind="error" line="2" text="The import a.Consts2.A_CONST cannot be resolved"/-->
  445. </compile>
  446. </ajc-test>
  447. <ajc-test dir="bugs150/pr113066" title="possible static imports bug - 3">
  448. <compile files="Consts3.java,TestNPE3.java" options="-1.9"/>
  449. </ajc-test>
  450. <ajc-test dir="java5/staticImports" title="import static java.lang.System.out">
  451. <compile files="StaticImport.aj" options="-1.9"/>
  452. </ajc-test>
  453. <ajc-test dir="bugs150" title="Problem with constructor ITDs">
  454. <compile files="pr112783.aj" options="-1.9"/>
  455. </ajc-test>
  456. <ajc-test dir="bugs150" title="NPE in ensureScopeSetup">
  457. <compile files="pr115038.aj" options="-1.9">
  458. <message kind="error" line="2" text="Cannot make inter-type declarations on type variables"/>
  459. </compile>
  460. </ajc-test>
  461. <ajc-test dir="bugs150" title="ITDC with no explicit cons call">
  462. <compile files="Pr62606.aj" options="-1.9">
  463. <message kind="warning" line="6" text="[Xlint:noExplicitConstructorCall]"/>
  464. </compile>
  465. </ajc-test>
  466. <ajc-test dir="java5/generics/bugs" title="using same type variable in ITD">
  467. <compile files="SameTypeVariable.aj" options="-1.9"/>
  468. </ajc-test>
  469. <ajc-test dir="bugs150" title="capturebinding wildcard problem">
  470. <compile files="pr114744.aj" options="-1.9"/>
  471. </ajc-test>
  472. <ajc-test dir="bugs150" title="Anonymous types and nome matching">
  473. <compile files="Pr73050.aj" outjar="jar1.jar" options="-1.9">
  474. <message kind="warning" line="16" text="anonymous types should be matched by a * wild card"/>
  475. </compile>
  476. <compile inpath="jar1.jar" options="-1.9">
  477. <message kind="warning" line="0" text="anonymous types should be matched by a * wild card"/>
  478. </compile>
  479. </ajc-test>
  480. <ajc-test dir="bugs150/pr86903" title="bcelrenderer bad">
  481. <compile files="GenericService.java,Service.java,Main.java,BadWormhole.java" options="-1.9"/>
  482. <run class="Main"/>
  483. </ajc-test>
  484. <ajc-test dir="bugs150/pr114343" title="field-get, generics and around advice">
  485. <compile files="Test.java,Test1.java,Test2.java,TestAspect.aj" options="-1.9">
  486. <message kind="warning" line="7" text="unchecked conversion when advice applied at shadow field-get(java.util.Set Test1.intsSet), expected java.util.Set&lt;java.lang.Integer&gt; but advice uses java.util.Set"/>
  487. <message kind="warning" line="8" text="unchecked conversion when advice applied at shadow field-get(java.util.Set Test2.doubSet), expected java.util.Set&lt;java.lang.Double&gt; but advice uses java.util.Set"/>
  488. </compile>
  489. <run class="TestAspect"/>
  490. </ajc-test>
  491. <ajc-test dir="bugs150/pr113947/case1" title="maws generic aspect - 1">
  492. <compile files="AbstractListSupport.java,AnotherItem.java,Item.java,LinkedList.java,LinkedListItem.java,ListItem.java,StringList.java" options="-1.9">
  493. <message kind="error" line="6" text="Cannot make inter-type declarations on type variables"/>
  494. <message kind="error" line="8" text="Cannot make inter-type declarations on type variables"/>
  495. <message kind="error" line="12" text="Cannot make inter-type declarations on type variables"/>
  496. </compile>
  497. </ajc-test>
  498. <ajc-test dir="bugs150" title="aspectOf and generic aspects">
  499. <compile files="pr115237.aj" options="-1.9"/>
  500. <run class="pr115237"/>
  501. </ajc-test>
  502. <ajc-test dir="bugs150/pr114343/case2" title="field-get, generics and around advice - 2">
  503. <compile files="Test.java,TTT.java,TestAspect.java" options="-1.9"/>
  504. <run class="TestAspect">
  505. <stderr>
  506. <line text="TestAspect.main: Calling foo"/>
  507. <line text="Creating Test&lt;Integer&gt; instance"/>
  508. <line text="Calling toArray"/>
  509. <line text="In around advice"/>
  510. <line text="In toArray()"/>
  511. <line text="done"/>
  512. <line text="TestAspect.main: done"/>
  513. </stderr>
  514. </run>
  515. </ajc-test>
  516. <ajc-test dir="bugs150/pr114343/case3" title="field-get, generics and around advice - 3">
  517. <compile files="Test.java,TTT.java,TestAspect.java" options="-1.9"/>
  518. <run class="TestAspect">
  519. <stderr>
  520. <line text="TestAspect.main: Calling foo"/>
  521. <line text="Creating Test&lt;Integer&gt; instance"/>
  522. <line text="Calling toArray"/>
  523. <line text="In around advice"/>
  524. <line text="In toArray()"/>
  525. <line text="done"/>
  526. <line text="Creating Test&lt;Integer&gt; instance"/>
  527. <line text="Calling getFirst"/>
  528. <line text="around on getFirstExec(): running"/>
  529. <line text="done"/>
  530. <line text="TestAspect.main: done"/>
  531. </stderr>
  532. </run>
  533. </ajc-test>
  534. <ajc-test dir="bugs150/pr113947/case2" title="maws generic aspect - 2">
  535. <compile files="AbstractListSupport.java,AnotherItem.java,Item.java,LinkedList.java,LinkedListItem.java,ListItem.java,StringList.java" options="-1.9"/>
  536. </ajc-test>
  537. <ajc-test dir="bugs150/pr113861" title="field-get problems with generic field">
  538. <compile files="Test.java,TestAspect.java" options="-1.9"/>
  539. <run class="com.Test"/>
  540. </ajc-test>
  541. <ajc-test dir="bugs150/pr99191" title="declare annotation on non existent type - 1">
  542. <compile files="pr99191_1.java" options="-1.9">
  543. <message kind="error" line="4" text="The field 'int C.noSuchField' does not exist"/>
  544. <message kind="error" line="5" text="The field 'int B.noSuchField' does not exist"/>
  545. </compile>
  546. </ajc-test>
  547. <ajc-test dir="java5/generics/bugs/lists/case1" title="generics and ITD overrides - 1">
  548. <compile files="Identifiable.java,Bean.java,LongIdentifiable.java,IdentifiableAspect.java" options="-1.9"/>
  549. <run class="IdentifiableAspect"/>
  550. </ajc-test>
  551. <ajc-test dir="java5/generics/bugs/lists/case2" title="generics and ITD overrides - 2">
  552. <compile files="Identifiable.java,Bean.java,LongIdentifiable.java,IdentifiableAspect.java" options="-1.9"/>
  553. <run class="IdentifiableAspect"/>
  554. </ajc-test>
  555. <ajc-test dir="java5/generics/bugs/lists/case3" title="generics and ITD overrides - 3">
  556. <compile files="Identifiable.java,Bean.java,LongIdentifiable.java,IdentifiableAspect.java" options="-1.9"/>
  557. <run class="IdentifiableAspect"/>
  558. </ajc-test>
  559. <ajc-test dir="java5/generics/bugs/lists/case4" title="generics and ITD overrides - 4">
  560. <compile files="Identifiable.java,Bean.java,LongIdentifiable.java,IdentifiableAspect.java" options="-1.9"/>
  561. <run class="IdentifiableAspect"/>
  562. </ajc-test>
  563. <!-- Currently a warning doesn't occur if the annotation is already on the field
  564. (see bug 113029). If this is fixed, need to add check for this warning to this
  565. test as in test "declare annotation on non existent type - 4" -->
  566. <ajc-test dir="bugs150/pr99191" title="declare annotation on non existent type - 2">
  567. <compile files="pr99191_2.java" options="-1.9"/>
  568. </ajc-test>
  569. <ajc-test dir="bugs150/pr99191" title="declare annotation on non existent type - 3">
  570. <compile files="pr99191_3.java" options="-1.9">
  571. <message kind="error" line="4" text="The method 'public * C.noSuchMethod(..)' does not exist"/>
  572. <message kind="error" line="5" text="The method '* B.noSuchMethod(..)' does not exist"/>
  573. </compile>
  574. </ajc-test>
  575. <ajc-test dir="bugs150/pr99191" title="declare annotation on non existent type - 4">
  576. <compile files="pr99191_4.java" options="-1.9">
  577. <message kind="warning" text="void C.amethod() - already has an annotation of type Annotation, cannot add a second instance [Xlint:elementAlreadyAnnotated]"/>
  578. </compile>
  579. </ajc-test>
  580. <ajc-test dir="bugs150/pr99191" title="declare annotation on non existent type - 5">
  581. <compile files="pr99191_5.java" options="-1.9">
  582. <message kind="error" line="4" text="The method 'C.new(java.lang.String)' does not exist"/>
  583. <message kind="error" line="5" text="The method 'B.new(int)' does not exist"/>
  584. </compile>
  585. </ajc-test>
  586. <ajc-test dir="bugs150/pr99191" title="declare annotation on non existent type - 6">
  587. <compile files="pr99191_6.java" options="-1.9">
  588. <message kind="warning" text="void C.&lt;init&gt;(int) - already has an annotation of type Annotation, cannot add a second instance [Xlint:elementAlreadyAnnotated]"/>
  589. </compile>
  590. </ajc-test>
  591. <ajc-test dir="bugs150/pr113630/case1" title="IncompatibleClassChangeError - errorscenario">
  592. <compile files="Bean.java,BeanTestCase.java,javaBean.java,propertyChanger.java,PropertySupportAspect5.aj" options="-1.9">
  593. <message kind="warning" line="9" text="Failing match because annotation 'javaBean' on type 'Bean' has SOURCE retention. Matching allowed when RetentionPolicy is CLASS or RUNTIME"/>
  594. <message kind="error" line="18" text="The method addPropertyChangeListener(String, BeanTestCase) is undefined for the type Bean"/>
  595. </compile>
  596. </ajc-test>
  597. <ajc-test dir="bugs150/pr113630/case2" title="IncompatibleClassChangeError - workingscenario">
  598. <compile files="Bean.java,BeanTestCase.java,javaBean.java,propertyChanger.java,PropertySupportAspect5.aj" options="-1.9"/>
  599. <run class="BeanTestCase"/>
  600. </ajc-test>
  601. <ajc-test dir="bugs150" title="Generics ClassCastException">
  602. <compile files="pr113445.aj" options="-1.9,-emacssym"/>
  603. </ajc-test>
  604. <ajc-test dir="bugs150" title="test illegal change to pointcut declaration">
  605. <compile files="pr111915.java" options="-1.9 -showWeaveInfo">
  606. <message kind="weave" text="Join point 'method-execution(void SomeClass.doSomething())' in Type 'SomeClass' (pr111915.java:4) advised by around advice from 'DoesntCompile' (pr111915.java:15)"/>
  607. <message kind="weave" text="Extending interface set for type 'SomeClass' (pr111915.java) to include 'java.io.Serializable' (pr111915.java)"/>
  608. </compile>
  609. </ajc-test>
  610. <ajc-test dir="java5/bridgeMethods" pr="72766" title="Ignore bridge methods">
  611. <compile files="AspectX.aj" inpath="testcode.jar" options="-1.4 -showWeaveInfo">
  612. <!-- <message kind="warning" line="7" text="pointcut did not match on the method call to a bridge method."/>
  613. <message kind="warning" line="7" text="does not match because declaring type is Number"/>-->
  614. <message kind="weave" text="(AspectX.aj:18) advised by before advice from 'AspectX'"/>
  615. <message kind="weave" text="(AspectX.aj:19) advised by before advice from 'AspectX'"/>
  616. <message kind="weave" text="(Number.java:5) advised by before advice from 'AspectX'"/>
  617. </compile>
  618. </ajc-test>
  619. <ajc-test title="intermediate annotation matching" dir="bugs150">
  620. <compile files="AnnotationPlusPatternMatchingError.aj" options="-1.9">
  621. <message kind="warning" line="28" text="matched"/>
  622. </compile>
  623. <run class="AnnotationPlusPatternMatchingError">
  624. <stdout>
  625. <line text="In advice"/>
  626. </stdout>
  627. </run>
  628. </ajc-test>
  629. <ajc-test dir="migration" title="load aspectj 1.2.1 aspects in aspectj 5">
  630. <compile files="Program.java" aspectpath="aspects121.jar" options="-1.9"/>
  631. <run class="Program"/>
  632. </ajc-test>
  633. <ajc-test dir="bugs/java5/arrayCloning" pr="72150" vm="1.5"
  634. title="AJC possible bug with static nested classes">
  635. <compile files="A.java,C.java" options="-1.9,-showWeaveInfo">
  636. <message kind="weave" text="Type 'C' (C.java:14) advised by around advice from 'A' (A.java:2)"/>
  637. </compile>
  638. <run class="C"/>
  639. </ajc-test>
  640. <ajc-test dir="java5/pseudoKeywords"
  641. title="method called around in class">
  642. <compile files="MethodCalledAround.java" options="-1.9"/>
  643. </ajc-test>
  644. <ajc-test dir="java5/pseudoKeywords"
  645. title="method called around in aspect">
  646. <compile files="MethodCalledAroundAspect.java" options="-1.9">
  647. <message kind="error" line="2"/>
  648. </compile>
  649. </ajc-test>
  650. <ajc-test dir="bugs150" pr="64568" title="clear error message on itd with type pattern">
  651. <compile files="pr64568.aj" options="-1.9">
  652. <message line="4" kind="error" text="Syntax error on token &quot;*&quot;, delete this token"/>
  653. <message line="4" kind="error" text="foo cannot be resolved to a type"/>
  654. </compile>
  655. </ajc-test>
  656. <ajc-test dir="bugs150" pr="74562" title="before and after are valid identifiers in classes">
  657. <compile files="pr74562.aj" options="-1.9"/>
  658. </ajc-test>
  659. <ajc-test dir="bugs150" pr="107486" title="anonymous inner classes">
  660. <compile files="pr107486.aj" options="-1.9"/>
  661. </ajc-test>
  662. <ajc-test dir="bugs150" pr="102210" title="NullPointerException trying to compile">
  663. <compile files="PR102210.java" options="-1.9"/>
  664. <run class="PR102210">
  665. <stderr>
  666. <line text="List size is 1"/>
  667. <line text="m1 running"/>
  668. <line text="List size is 2"/>
  669. <line text="m2 running"/>
  670. <line text="List size is 3"/>
  671. <line text="m3 running"/>
  672. </stderr>
  673. </run>
  674. </ajc-test>
  675. <ajc-test dir="bugs150" pr="107486" title="multiple anonymous inner classes">
  676. <compile files="pr107486part2.aj" options="-1.9"/>
  677. <run class="pr107486part2">
  678. <stdout>
  679. <line text="[advised] f"/>
  680. <line text="[advised] g"/>
  681. </stdout>
  682. </run>
  683. </ajc-test>
  684. <ajc-test dir="java5/compliance" title="java 5 pointcuts and declares at pre-java 5 compliance levels">
  685. <compile files="AJ5FeaturesAtJ14.aj" options="-1.4">
  686. <message kind="error" line="3" text="the @annotation pointcut expression is only supported at Java 5 compliance level or above"/>
  687. <message kind="error" line="11" text="the @within pointcut expression is only supported at Java 5 compliance level or above"/>
  688. <message kind="error" line="13" text="the @withincode pointcut expression is only supported at Java 5 compliance level or above"/>
  689. <message kind="error" line="5" text="the @this pointcut expression is only supported at Java 5 compliance level or above"/>
  690. <message kind="error" line="7" text="the @target pointcut expression is only supported at Java 5 compliance level or above"/>
  691. <message kind="error" line="9" text="the @args pointcut expression is only supported at Java 5 compliance level or above"/>
  692. <message kind="error" line="15" text="declare @type is only supported at Java 5 compliance level or above"/>
  693. <message kind="error" line="15" text="annotations are only available if source level is 1.5 or greater"/>
  694. <message kind="error" line="15" text="cannot convert from Foo to Annotation"/>
  695. <message kind="error" line="17" text="declare @method is only supported at Java 5 compliance level or above"/>
  696. <message kind="error" line="17" text="annotations are only available if source level is 1.5 or greater"/>
  697. <message kind="error" line="17" text="cannot convert from Foo to Annotation"/>
  698. <message kind="error" line="19" text="declare @field is only supported at Java 5 compliance level or above"/>
  699. <message kind="error" line="19" text="annotations are only available if source level is 1.5 or greater"/>
  700. <message kind="error" line="19" text="cannot convert from Foo to Annotation"/>
  701. <message kind="error" line="21" text="declare @constructor is only supported at Java 5 compliance level or above"/>
  702. <message kind="error" line="21" text="annotations are only available if source level is 1.5 or greater"/>
  703. <message kind="error" line="21" text="cannot convert from Foo to Annotation"/>
  704. <message kind="error" line="25" text="annotation type patterns are only supported at Java 5 compliance level or above"/>
  705. <message kind="error" line="27" text="annotation type patterns are only supported at Java 5 compliance level or above"/>
  706. </compile>
  707. </ajc-test>
  708. <ajc-test dir="java5/compliance" title="java 5 pointcuts and declares at pre-java 5 compliance levels - 1.7">
  709. <compile files="AJ5FeaturesAtJ14.aj" options="-1.4">
  710. <message kind="error" line="3" text="the @annotation pointcut expression is only supported at Java 5 compliance level or above"/>
  711. <message kind="error" line="11" text="the @within pointcut expression is only supported at Java 5 compliance level or above"/>
  712. <message kind="error" line="13" text="the @withincode pointcut expression is only supported at Java 5 compliance level or above"/>
  713. <message kind="error" line="5" text="the @this pointcut expression is only supported at Java 5 compliance level or above"/>
  714. <message kind="error" line="7" text="the @target pointcut expression is only supported at Java 5 compliance level or above"/>
  715. <message kind="error" line="9" text="the @args pointcut expression is only supported at Java 5 compliance level or above"/>
  716. <message kind="error" line="15" text="declare @type is only supported at Java 5 compliance level or above"/>
  717. <message kind="error" line="15" text="annotations are only available if source level is 1.5 or greater"/>
  718. <message kind="error" line="15" text="Foo is not an annotation type"/>
  719. <message kind="error" line="17" text="declare @method is only supported at Java 5 compliance level or above"/>
  720. <message kind="error" line="17" text="annotations are only available if source level is 1.5 or greater"/>
  721. <message kind="error" line="17" text="Foo is not an annotation type"/>
  722. <message kind="error" line="19" text="declare @field is only supported at Java 5 compliance level or above"/>
  723. <message kind="error" line="19" text="annotations are only available if source level is 1.5 or greater"/>
  724. <message kind="error" line="19" text="Foo is not an annotation type"/>
  725. <message kind="error" line="21" text="declare @constructor is only supported at Java 5 compliance level or above"/>
  726. <message kind="error" line="21" text="annotations are only available if source level is 1.5 or greater"/>
  727. <message kind="error" line="21" text="Foo is not an annotation type"/>
  728. <message kind="error" line="25" text="annotation type patterns are only supported at Java 5 compliance level or above"/>
  729. <message kind="error" line="27" text="annotation type patterns are only supported at Java 5 compliance level or above"/>
  730. </compile>
  731. </ajc-test>
  732. <ajc-test dir="bugs150" pr="91114" title="before and after are valid identifiers in classes, part 2">
  733. <compile files="pr91114.aj" options="-1.9"/>
  734. </ajc-test>
  735. <ajc-test dir="bugs150" pr="78621" title="void field type in pointcut expression">
  736. <compile files="pr78261.aj" options="-1.9">
  737. <message line="3" kind="error" text="fields cannot have a void type"/>
  738. </compile>
  739. </ajc-test>
  740. <ajc-test dir="bugs150" pr="86057" title="overriding final pointcut from super-aspect">
  741. <compile files="pr86057.aj" options="-1.9">
  742. <message line="9" kind="error" text="can't override final pointcut Base.foo()"/>
  743. </compile>
  744. </ajc-test>
  745. <ajc-test dir="bugs150" pr="78707" title="before returning advice not allowed!">
  746. <compile files="pr78707.aj" options="-1.9">
  747. <message line="3" kind="error" text="Syntax error on token &quot;returning&quot;, delete this token"/>
  748. <message line="3" kind="error" text="Syntax error on token &quot;throwing&quot;, delete this token"/>
  749. </compile>
  750. </ajc-test>
  751. <ajc-test dir="bugs150" pr="104529" title="@SuppressWarnings should suppress">
  752. <compile files="pr104529.aj" options = "-1.9 -warn:+unchecked">
  753. <message line="11" kind="warning" text="needs unchecked conversion"/>
  754. </compile>
  755. </ajc-test>
  756. <ajc-test dir="bugs150" pr="79523" title="declare warning : foo(str) : ...;">
  757. <compile files="pr79523.aj" options="-1.9">
  758. <message line="4" kind="warning" text="no match for this type name: str"/>
  759. <message line="4" kind="error" text="bad parameter"/>
  760. <message line="4" kind="error" text="args() pointcut designator cannot be used in declare statement"/>
  761. </compile>
  762. </ajc-test>
  763. <ajc-test dir="bugs150" pr="107059" title="parser crashes on call(void (@a *)(..)">
  764. <compile files="pr107059.aj" options="-1.9">
  765. <message line="3" kind="error" text="Syntax error on token &quot;(&quot;, &quot;name pattern&quot; expected"/>
  766. </compile>
  767. </ajc-test>
  768. <ajc-test dir="bugs150" pr="107059" title="target(@Foo *)">
  769. <compile files="pr107059_2.aj" options="-1.9">
  770. <message kind="error" line="4" text="wildcard type pattern not allowed"/>
  771. </compile>
  772. </ajc-test>
  773. <ajc-test dir="bugs150" title="varargs with type variable">
  774. <compile files="ParameterizedVarArgMatch.aj" options="-1.9"/>
  775. </ajc-test>
  776. <ajc-test dir="bugs150" pr="108104" title="multiple anonymous inner classes 2">
  777. <compile files="pr108104.aj" options="-1.9"/>
  778. </ajc-test>
  779. <ajc-test dir="bugs150" pr="108050" title="signature matching in override scenario">
  780. <compile files="pr108050.aj" options="-1.9">
  781. <message kind="warning" line="2" text="servlet request"/>
  782. <message kind="warning" line="7" text="servlet request"/>
  783. <message kind="warning" line="21" text="servlet request"/>
  784. </compile>
  785. </ajc-test>
  786. <ajc-test dir="bugs150/pr108425" pr="108245" title="wildcard annotation matching - pr108245">
  787. <compile files="package1/Bean.java,package2/Bean.java,package2/propertyChanger.java,package3/pr108425.aj" options="-1.9 -Xlint:ignore"/>
  788. </ajc-test>
  789. <ajc-test dir="bugs150/" pr="108104" title="inner types and type variables">
  790. <compile files="ShapeCommandMap.java" options="-1.9"/>
  791. </ajc-test>
  792. <ajc-test dir="bugs150/" pr="107953" title="@AfterThrowing with no formal specified">
  793. <compile files="pr107953.java" options="-1.9">
  794. <message kind="error" line="8"
  795. text="throwing formal 'RuntimeException' must be declared as a parameter in the advice signature"/>
  796. </compile>
  797. </ajc-test>
  798. <ajc-test dir="bugs150/pr106130" pr="106130" title="test weaving with > 256 locals">
  799. <compile files="AroundLotsOfVars.java LotsOfVars.java" options="-1.9 -preserveAllLocals"/>
  800. <run class="LotsOfVars">
  801. <stdout>
  802. <line text="hello"/>
  803. <line text="2"/>
  804. </stdout>
  805. </run>
  806. </ajc-test>
  807. <ajc-test dir="bugs150/pr87376" title="structure model npe on type not found">
  808. <compile files="I.java,NPE.aj" options="-1.9 -emacssym">
  809. <message kind="error" line="8" text="I cannot be resolved to a type"/>
  810. <message kind="error" line="10" text="I cannot be resolved to a type"/>
  811. </compile>
  812. </ajc-test>
  813. <ajc-test dir="bugs150" pr="83311" title="overriding/polymorphism error on interface method introduction">
  814. <compile files="pr83311.aj" options="-1.9"/>
  815. </ajc-test>
  816. <ajc-test dir="bugs150" pr="103266" title="NPE on syntax error">
  817. <compile files="pr103266.aj" options="-1.9">
  818. <message kind="error" line="41" text="ConnectionRequestContext cannot be resolved to a type"/>
  819. <!-- this next message is new in e37 -->
  820. <message kind="error" line="41" text="Type mismatch: cannot convert from new ConnectionRequestContext(){} to WorkerExample.RequestContext"/>
  821. </compile>
  822. </ajc-test>
  823. <ajc-test title="itd override with no exception clause" dir="bugs150">
  824. <compile files="pr83377.aj" options="-1.9"/>
  825. </ajc-test>
  826. <ajc-test dir="bugs150/pr84260" vm="1.5" title="static import failures">
  827. <compile files="A.java,I1.java,I2.java" options="-1.9"/>
  828. <run class="I1">
  829. <stderr>
  830. <line text="static method running"/>
  831. </stderr>
  832. </run>
  833. <run class="I2">
  834. <stderr>
  835. <line text="static method running"/>
  836. </stderr>
  837. </run>
  838. </ajc-test>
  839. <ajc-test title="anonymous inner class with method returning type parameter" pr="107898" dir="bugs150">
  840. <compile files="pr107898.aj" options="-1.9"/>
  841. </ajc-test>
  842. <ajc-test title="matching against Object[]" pr="72668" dir="bugs150">
  843. <compile files="pr72668.aj" options="-1.9">
  844. <message kind="error" line="3"
  845. text="incompatible return type applying to method-execution(java.lang.Number[] pr72668.getThoseInts())"/>
  846. <message kind="error" line="10"
  847. text="incompatible return type applying to method-execution(java.lang.Number[] pr72668.getThoseInts())"/>
  848. </compile>
  849. </ajc-test>
  850. <ajc-test dir="decp" pr="80249" title="Order of types passed to compiler determines weaving behavior">
  851. <compile files="A.java,B.java,AspectX.java" options="-1.9"/>
  852. <run class="B"/>
  853. <compile files="B.java,A.java,AspectX.java" options="-1.9"/>
  854. <run class="B"/>
  855. </ajc-test>
  856. <ajc-test dir="bugs150" pr="99228" vm="1.5" title="ITD of a field into a generic class">
  857. <compile files="PR99228.aj" options="-1.9"/>
  858. </ajc-test>
  859. <ajc-test dir="bugs150" pr="98320" vm="1.5" title="intertype with nested generic type">
  860. <compile files="PR98320.aj" options="-1.9"/>
  861. </ajc-test>
  862. <ajc-test dir="decs" pr="42743" title="declare soft of runtime exception">
  863. <compile files="DeclareSoftRuntimeException.aj" options="-1.9">
  864. <message kind="warning" line="3" text="MyRuntimeException will not be softened as it is already a RuntimeException"/>
  865. </compile>
  866. <run class="DeclareSoftRuntimeException">
  867. <stdout>
  868. <line text="MyRuntimeException"/>
  869. <line text="org.aspectj.lang.SoftException"/>
  870. <line text="MyRuntimeException"/>
  871. </stdout>
  872. </run>
  873. </ajc-test>
  874. <ajc-test dir="decs" pr="42743" title="declare soft w. catch block">
  875. <compile files="VerifyError.aj" options="-1.9 -Xlint:ignore"/>
  876. <run class="VerifyError"/>
  877. </ajc-test>
  878. <ajc-test dir="bugs" pr="61568" title="Various kinds of ambiguous bindings">
  879. <compile files="AmbiguousBindings.aj" options="-1.4">
  880. <message line="17" text="ambiguous binding of parameter(s) foo across '||' in pointcut"/>
  881. <message line="19" text="ambiguous binding of parameter(s) foo across '||' in pointcut"/>
  882. <message line="21" text="ambiguous binding of parameter(s) foo across '||' in pointcut"/>
  883. <message line="23" text="ambiguous binding of parameter(s) x across '||' in pointcut"/>
  884. <message line="25" text="ambiguous binding of parameter(s) foo across '||' in pointcut"/>
  885. </compile>
  886. </ajc-test>
  887. <ajc-test dir="bugs" pr="61658" title="ambiguous args">
  888. <compile files="PR61658.java" options="-1.9">
  889. <message line="17" text="ambiguous binding of parameter(s) a, b across '||' in pointcut"/>
  890. </compile>
  891. </ajc-test>
  892. <ajc-test dir="bugs150" pr="78021" title="Injecting exception into while loop with break statement causes catch block to be ignored">
  893. <compile files="PR78021.java" options="-1.9"/>
  894. <run class="PR78021"/>
  895. </ajc-test>
  896. <ajc-test dir="bugs150/pr99089" vm="1.5" pr="99089" title="ArrayIndexOutOfBoundsException - Generics in privileged aspects">
  897. <compile files="DataClass.java,TracingAspect.java" options="-1.9"/>
  898. <run class="DataClass">
  899. <stderr>
  900. <line text="before:Length of v=1"/>
  901. <line text="after:Length of v=2"/>
  902. </stderr>
  903. </run>
  904. </ajc-test>
  905. <ajc-test dir="bugs150" pr="79554" title="Return in try-block disables catch-block if final-block is present">
  906. <compile files="PR79554.java" options="-1.9"/>
  907. <run class="PR79554"/>
  908. </ajc-test>
  909. <ajc-test dir="bugs150" pr="82570" title="Weaved code does not include debug lines">
  910. <compile files="PR82570_1.java" options="-1.9"/>
  911. </ajc-test>
  912. <ajc-test dir="bugs150" pr="83303" title="compiler error when mixing inheritance, overriding and polymorphism">
  913. <compile files="PR83303.java" options="-1.9"/>
  914. </ajc-test>
  915. <ajc-test dir="bugs150" pr="83563" title="pertypewithin() handing of inner classes (1)">
  916. <compile files="PR83563_1.java" options="-1.9"/>
  917. <run class="PR83563_1"/>
  918. </ajc-test>
  919. <ajc-test dir="bugs150" pr="83563" title="pertypewithin() handing of inner classes (2)">
  920. <compile files="PR83563_2.java" options="-1.9"/>
  921. <run class="PR83563_2"/>
  922. </ajc-test>
  923. <ajc-test dir="bugs150" pr="83645" title="pertypewithin({interface}) illegal field modifier">
  924. <compile files="PR83645.java" options="-1.9 -Xlint:ignore"/>
  925. <run class="PR83645"/>
  926. </ajc-test>
  927. <ajc-test dir="bugs150" title="bad asm for enums" vm="1.5">
  928. <compile files="Rainbow.java" options="-emacssym,-1.9,-Xset:minimalModel=false"/>
  929. </ajc-test>
  930. <ajc-test dir="bugs150" pr="10461" title="missing name pattern">
  931. <compile files="PR106461.aj" options="-1.9">
  932. <message kind="error" line="3" text="Syntax error on token &quot;(&quot;, &quot;name pattern&quot; expected"/>
  933. <message kind="error" line="5" text="Syntax error on token &quot;)&quot;, &quot;name pattern&quot; expected"/>
  934. <message kind="error" line="7" text="Syntax error on token &quot;.&quot;, &quot;name pattern&quot; expected"/>
  935. </compile>
  936. </ajc-test>
  937. <ajc-test dir="bugs150" pr="106634" title="IllegalStateException unpacking signature of nested parameterized type">
  938. <compile files="pr106634.aj" options="-1.9"/>
  939. </ajc-test>
  940. <ajc-test dir="bugs150" title="(@Foo *)+ type pattern parse error">
  941. <compile files="AnnotationPlusPatternParseError.aj" options="-1.9"/>
  942. <!-- next line needs the change for inherited anno matching... -->
  943. <!--compile files="AnnotationPlusPatternParseError.aj" options="-1.9">
  944. <message kind="warning" line="19"/>
  945. </compile-->
  946. </ajc-test>
  947. <ajc-test dir="bugs150" pr="80571" title="around advice on interface initializer">
  948. <compile files="pr80571.aj" options="-1.9">
  949. <message kind="warning" text="The joinpoint 'constructor-call(void pr80571.&lt;init&gt;())' cannot be advised"/>
  950. </compile>
  951. <run class="pr80571">
  952. <stdout>
  953. <line text="before"/>
  954. <line text="after"/>
  955. </stdout>
  956. </run>
  957. </ajc-test>
  958. <ajc-test dir="bugs150" pr="78314" title="good error message for unmatched member syntax">
  959. <compile files="pr78314.aj" options="-1.9">
  960. <message kind="error" line="5" text="Syntax error on token &quot;foo&quot;, no accurate correction available"/>
  961. </compile>
  962. <compile files="pr78314.aj" options="-1.9">
  963. <message kind="error" line="5" text="Syntax error on token &quot;foo&quot;, no accurate correction available"/>
  964. </compile>
  965. </ajc-test>
  966. <ajc-test dir="bugs150" pr="108377" title="itd field access inside itd method">
  967. <compile files="pr108377.aj" options="-1.9"/>
  968. <run class="pr108377"/>
  969. </ajc-test>
  970. <ajc-test dir="bugs150/pr108054" pr="108054" title="type variable with type variable bound">
  971. <compile files="pr108054.aj" options="-1.9"/>
  972. <compile files="ISequence.java,ICounter.java,ASequence.java" options="-1.9"/>
  973. </ajc-test>
  974. <ajc-test dir="bugs150/pr108370" pr="108370" title="switch on enum inside ITD method">
  975. <compile files="et/Q.java" options="-1.9"/>
  976. <compile files="EnumTest.aj" options="-1.9 -inpath et"/>
  977. <run class="EnumTest">
  978. <stdout>
  979. <line text="B!"/>
  980. </stdout>
  981. </run>
  982. </ajc-test>
  983. <ajc-test dir="bugs150" pr="95992" title="inner type of generic interface reference from parameterized type">
  984. <compile files="pr95992.aj" options="-1.9"/>
  985. </ajc-test>
  986. <ajc-test dir="bugs150" pr="104024" title="inner class passed as argument to varargs method">
  987. <compile files="pr104024.aj" options="-1.9"/>
  988. </ajc-test>
  989. <ajc-test dir="bugs150" pr="107858" title="inlined field access in proceed call">
  990. <compile files="pr107858.aj" options="-1.9">
  991. <message kind="error" line="9" text="too many arguments to proceed, expected 0"/>
  992. <message kind="error" line="10" text="too many arguments to proceed, expected 0"/>
  993. </compile>
  994. </ajc-test>
  995. <ajc-test dir="bugs150/pr71159" pr="71159" title="visibility in signature matching with overrides - 1">
  996. <compile files="pr71159.aj" options="-1.9">
  997. <message kind="warning" line="26" text="should match"/>
  998. </compile>
  999. </ajc-test>
  1000. <ajc-test dir="bugs150/pr71159" pr="71159" title="visibility in signature matching with overrides - 2">
  1001. <compile files="PrivateITD.aj" options="-1.9">
  1002. <message kind="warning" line="28" text="should match"/>
  1003. </compile>
  1004. </ajc-test>
  1005. <ajc-test dir="bugs150/pr71159" pr="71159" title="visibility in signature matching with overrides - 3">
  1006. <compile files="pkg1/A.java,pkg1/B.java,pkg1/C.java,pkg2/ITDInDiffPackage.aj" options="-1.9">
  1007. <message kind="warning" line="10" text="should match"/>
  1008. </compile>
  1009. </ajc-test>
  1010. <ajc-test dir="bugs150" pr="59196" title="args generated correctly for advice execution join point">
  1011. <compile files="pr59196.aj" options="-XnoInline -1.9"/>
  1012. </ajc-test>
  1013. <ajc-test dir="bugs150" pr="74048" title="no unused warnings on aspect types">
  1014. <compile files="pr74048.aj" options="-1.9 -warn:unusedPrivate"/>
  1015. </ajc-test>
  1016. <ajc-test dir="bugs150" pr="59397" title="synthetic arguments on itd cons are not used in matching">
  1017. <compile files="pr59397.aj" options="-1.9">
  1018. <message line="6" kind="warning" text="should match"/>
  1019. </compile>
  1020. </ajc-test>
  1021. <ajc-test dir="bugs150" pr="108602" title="parse generic type signature with parameterized type in interface">
  1022. <compile files="pr108602.java" options="-1.9"/>
  1023. </ajc-test>
  1024. <ajc-test dir="bugs150" pr="105479" title="declare parents introducing override with covariance">
  1025. <compile files="pr105479.aj" options="-1.9"/>
  1026. </ajc-test>
  1027. <ajc-test dir="bugs150" pr="105479" title="override and covariance with decp - runtime">
  1028. <compile files="pr105479part2.aj" options="-1.9"/>
  1029. <run class="pr105479part2">
  1030. <stdout>
  1031. <line text="in Test.hashCode()"/>
  1032. <line text="in Test.hashCode()"/>
  1033. <line text="id"/>
  1034. <line text="in Test.hashCode()"/>
  1035. </stdout>
  1036. </run>
  1037. </ajc-test>
  1038. <ajc-test dir="bugs150/pr105479/case1" pr="105479" title="override and covariance with decp - runtime separate files">
  1039. <compile files="ReturnTypeTest.aj,ReturnTypeTester.java,Driver.java" options="-1.9"/>
  1040. <run class="Driver">
  1041. <stdout>
  1042. <line text="in Test.hashCode()"/>
  1043. <line text="in Test.hashCode()"/>
  1044. <line text="id"/>
  1045. <line text="in Test.hashCode()"/>
  1046. </stdout>
  1047. </run>
  1048. </ajc-test>
  1049. <ajc-test dir="bugs150/pr105479/case2" pr="105479" title="override and covariance with decp - binary weaving">
  1050. <compile files="ReturnTypeTest.java" outjar="jar1.jar" options="-1.9 -Xlint:ignore"/>
  1051. <compile files="ReturnTypeTester.java" outjar="jar2.jar" options="-1.9"/>
  1052. <compile inpath="jar1.jar,jar2.jar" options="-1.9"/>
  1053. <run class="ReturnTypeTester"/>
  1054. </ajc-test>
  1055. <ajc-test dir="bugs150" pr="102212" title="abstract synchronized itdms not detected">
  1056. <compile files="pr102212.aj" options="-1.9">
  1057. <message line="7" kind="error" text="The abstract method _abstract in type Parent can only set a visibility modifier, one of public or protected"/>
  1058. </compile>
  1059. </ajc-test>
  1060. <ajc-test dir="bugs150" pr="102212" title="synchronized itd interface methods">
  1061. <compile files="SynchronizedInterfaceMethods.aj" options="-1.9"/>
  1062. <run class="SynchronizedInterfaceMethods"/>
  1063. </ajc-test>
  1064. <ajc-test dir="bugs150" pr="101606" title="unused private pointcuts">
  1065. <compile files="pr101606.aj" options="-1.9 -warn:unusedPrivate"/>
  1066. </ajc-test>
  1067. <ajc-test dir="bugs150/pr99125" pr="99125" title="itd interface method already existing on interface">
  1068. <compile files="p/pr99125.aj,p/I.java,p/J.java" options="-1.9"/>
  1069. <compile files="Aspects.aj" options="-1.9 -inpath p"/>
  1070. <run class="p.pr99125"/>
  1071. <compile files="p2/pr99125.aj,p/I.java,p/J.java" options="-1.9"/> <!-- actually in package p, introduces incompatible change -->
  1072. <compile files="Aspects.aj" options="-1.9 -inpath p">
  1073. <message kind="error" line="7" text="inter-type declaration from X conflicts with existing member"/>
  1074. <!-- 275032 - new error at affected member location too -->
  1075. <message kind="error" line="10" text="inter-type declaration from X conflicts with existing member"/>
  1076. </compile>
  1077. </ajc-test>
  1078. <ajc-test dir="bugs150/pr87530" pr="87530" title="final itd methods on interfaces">
  1079. <compile files="FinalITDMOnInterface.aj" options="-1.9">
  1080. <message kind="error" line="12" text="Cannot override the final method from A.TestInterface"/>
  1081. </compile>
  1082. <compile files="FinalITDMOnInterface2.aj" options="-1.9">
  1083. <!--message kind="error" line="8" text="Cannot override the final method from A.TestInterface"></message-->
  1084. <message kind="error" line="8" text="can't override final void A$TestInterface.m()"/>
  1085. </compile>
  1086. </ajc-test>
  1087. <ajc-test dir="bugs150" pr="108818" title="can't override private pointcut in abstract aspect">
  1088. <compile files="PrivatePointcutOverriding.aj" options="-1.9">
  1089. <message kind="warning" line="19" text="matched join point from super advice"/>
  1090. <message kind="warning" line="21" text="matched join point from sub advice"/>
  1091. </compile>
  1092. </ajc-test>
  1093. <ajc-test dir="bugs150" pr="108816" title="advising cflow advice execution">
  1094. <compile files="pr108816.aj" options="-1.9"/>
  1095. </ajc-test>
  1096. <ajc-test dir="bugs150/pr108902" pr="108902" title="no type mismatch on generic types in itds">
  1097. <compile files="Subject.java,Observer.java,ObserverProtocol.aj" options="-1.9"/>
  1098. </ajc-test>
  1099. <ajc-test dir="bugs150" pr="108903" title="super call in ITD">
  1100. <compile files="pr108903.aj" options="-1.9">
  1101. <message kind="error" line="14" text="The method print() is undefined for the type Object"/>
  1102. </compile>
  1103. </ajc-test>
  1104. <ajc-test dir="bugs150" pr="109042" title="no unused parameter warnings for synthetic advice args">
  1105. <compile files="pr109042.aj" options="-warn:+unusedArgument -warn:+unusedPrivate -warn:+unusedImport -1.9"/>
  1106. </ajc-test>
  1107. <ajc-test dir="bugs150" pr="109486" title="Internal compiler error (ClassParser.java:242)">
  1108. <compile files="PR109486.java" options="-1.9">
  1109. <message kind="error" line="1" text="The class PR109486 can be either abstract or final, not both"/>
  1110. </compile>
  1111. </ajc-test>
  1112. <ajc-test dir="bugs150" pr="109124" title="no verify error with set on inner type">
  1113. <compile files="VerifyErrorOnSet.aj" options="-1.9" />
  1114. <run class="test.VerifyErrorOnSet"/>
  1115. <compile files="pr106874.aj" options="-1.9" />
  1116. <run class="pr106874"/>
  1117. </ajc-test>
  1118. <ajc-test dir="bugs150" pr="108826" title="cant find type error with generic return type or parameter">
  1119. <compile files="pr108826.aj" options="-1.9 -emacssym" />
  1120. </ajc-test>
  1121. <ajc-test dir="bugs150" pr="105181" title="no verify error on generic collection member access">
  1122. <compile files="pr105181.aj" options="-1.9"/>
  1123. <run class="pr105181"/>
  1124. </ajc-test>
  1125. <ajc-test dir="bugs150/pr108903" pr="108903" title="super call in ITD - part 2">
  1126. <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.9" />
  1127. </ajc-test>
  1128. <ajc-test dir="bugs150/pr103740" pr="103740" title="Compiler failure on at_annotation">
  1129. <compile files="AroundAdvice.aj" options="-1.9,-showWeaveInfo">
  1130. <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)"/>
  1131. <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)"/>
  1132. </compile>
  1133. </ajc-test>
  1134. <ajc-test dir="bugs150/pr106554" pr="106554" title="Problem in staticinitialization with pertypewithin aspect">
  1135. <compile files="A.aj" options="-1.4 -showWeaveInfo">
  1136. <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)"/>
  1137. </compile>
  1138. <run class="A">
  1139. <stdout>
  1140. <line text="test = 1"/>
  1141. </stdout>
  1142. </run>
  1143. </ajc-test>
  1144. <ajc-test dir="bugs150/SimpleInsuranceFailure" title="raw and generic type conversion with itd cons">
  1145. <compile files="" options="-1.9 -emacssym, -sourceroots ."/>
  1146. </ajc-test>
  1147. <ajc-test dir="bugs150" title="@annotation binding with around advice">
  1148. <compile files="AnnotationBinding.aj" options="-1.9"/>
  1149. <run class="AnnotationBinding"/>
  1150. </ajc-test>
  1151. <ajc-test dir="bugs150" title="declare parents on a missing type">
  1152. <compile files="Pr76374.aj" options="-1.9">
  1153. <message kind="warning" line="3" text="no match for this type name"/>
  1154. </compile>
  1155. </ajc-test>
  1156. <ajc-test dir="bugs150" title="parameterized generic methods">
  1157. <compile files="Pr109283.aj" options="-1.9 -warn:indirectStatic"/>
  1158. </ajc-test>
  1159. <ajc-test dir="bugs150" title="call join points in anonymous inner classes">
  1160. <compile files="pr104229.aj" options="-1.9">
  1161. <message kind="warning" line="54" text="bingo"/>
  1162. <message kind="warning" line="115" text="bingo"/>
  1163. <message kind="warning" line="130" text="bingo"/>
  1164. </compile>
  1165. <run class="pr104229">
  1166. <stdout>
  1167. <line text="call match class pr104229"/>
  1168. <line text="OK it worked!"/>
  1169. </stdout>
  1170. </run>
  1171. </ajc-test>
  1172. <ajc-test dir="bugs150" title="default impl of Runnable">
  1173. <compile files="pr88900.aj" options="-1.9 -Xdev:Pinpoint"/>
  1174. </ajc-test>
  1175. <ajc-test dir="bugs150" title="array clone call join points in 1.4 vs 1.3">
  1176. <compile files="pr102933.aj" options="-1.3">
  1177. <message kind="warning" line="7" text="a call within pr102933"/>
  1178. </compile>
  1179. <compile files="pr102933.aj" options="-1.4">
  1180. <message kind="warning" line="7" text="a call within pr102933"/>
  1181. </compile>
  1182. <compile files="pr102933.aj" options="-1.9">
  1183. <message kind="warning" line="7" text="a call within pr102933"/>
  1184. </compile>
  1185. </ajc-test>
  1186. <ajc-test dir="bugs150" pr="100195" title="debug info in around advice inlining">
  1187. <compile files="pr100195.aj" options="-1.9"/>
  1188. <run class="pr100195"/>
  1189. </ajc-test>
  1190. <ajc-test dir="bugs150" title="weaveinfo message for declare at method on an ITDd method">
  1191. <compile files="pr113073.java" options="-1.9 -showWeaveInfo">
  1192. <message kind="weave" text="Type 'C' (pr113073.java) has intertyped method from 'D' (pr113073.java:'void C.anotherMethod()')"/>
  1193. <message kind="weave" text="'public void C.anotherMethod()' (pr113073.java) is annotated with @Annotation method annotation from 'B' (pr113073.java:3)"/>
  1194. <message kind="weave" text="Type 'C' (pr113073.java) has intertyped method from 'D' (pr113073.java:'void C.anotherMethod(java.lang.String)')"/>
  1195. <message kind="weave" text="'public void C.anotherMethod(String)' (pr113073.java) is annotated with @Annotation method annotation from 'B' (pr113073.java:3)"/>
  1196. <message kind="weave" text="Type 'C' (pr113073.java) has intertyped constructor from 'D' (pr113073.java:'void C."/>
  1197. <message kind="weave" text="'public void C.new(String)' (pr113073.java) is annotated with @Annotation constructor annotation from 'B' (pr113073.java:4)"/>
  1198. </compile>
  1199. </ajc-test>
  1200. <ajc-test dir="bugs150/pr113447" title="no verify error with two this pcds">
  1201. <compile files="PR113447.java" options="-1.9"/>
  1202. <run class="PR113447"/>
  1203. </ajc-test>
  1204. <ajc-test dir="bugs150/pr113447" title="no verify error with two at this pcds">
  1205. <compile files="PR113447a.java" options="-1.9"/>
  1206. <run class="PR113447a"/>
  1207. </ajc-test>
  1208. <ajc-test dir="bugs150/pr113447" title="no verify error with at within pcds">
  1209. <compile files="PR113447b.java" options="-1.9"/>
  1210. <run class="PR113447b"/>
  1211. </ajc-test>
  1212. <ajc-test dir="bugs150/pr113447" title="no verify error with at withincode pcds">
  1213. <compile files="PR113447c.java" options="-1.9"/>
  1214. <run class="PR113447c"/>
  1215. </ajc-test>
  1216. <ajc-test dir="bugs150/pr113447" title="no verify error with at annotation pcds">
  1217. <compile files="PR113447d.java" options="-1.9"/>
  1218. <run class="PR113447d"/>
  1219. </ajc-test>
  1220. <ajc-test dir="bugs150/pr113447" title="no verify error with two args pcds">
  1221. <compile files="PR113447e.java" options="-1.9"/>
  1222. <run class="PR113447e"/>
  1223. </ajc-test>
  1224. <ajc-test dir="bugs150" title="no StackOverflowError with circular pcd in generic aspect">
  1225. <compile files="pr115235.aj" options="-1.9">
  1226. <message kind="warning" line="3" text="advice defined in GenericAbstractAspect has not been applied [Xlint:adviceDidNotMatch]"/>
  1227. <message kind="error" text="circular pointcut declaration involving: pc()"/>
  1228. <message kind="error" line="20" text="circular pointcut declaration involving: pc2()"/>
  1229. </compile>
  1230. </ajc-test>
  1231. <ajc-test dir="bugs150" title="no StackOverflowError with circular pcd in generic aspect - 2">
  1232. <compile files="pr115235b.aj" options="-1.9"/>
  1233. </ajc-test>
  1234. <ajc-test dir="bugs150/pr115252" title="xlint message for improper exact annotation type">
  1235. <compile files="ExactAnnotationTypePattern.java" options="-1.9">
  1236. <message kind="warning" line="20" text="field blah"/>
  1237. <message kind="warning" line="28" text="does not match because annotation @TypeAnnotation has @Target{ElementType.TYPE} [Xlint:unmatchedTargetKind]"/>
  1238. <message kind="warning" line="37" text="does not match because annotation @FieldAnnotation has @Target{ElementType.FIELD} [Xlint:unmatchedTargetKind]"/>
  1239. <message kind="warning" line="46" text="does not match because annotation @MethodAnnotation has @Target{ElementType.METHOD} [Xlint:unmatchedTargetKind]"/>
  1240. </compile>
  1241. </ajc-test>
  1242. <ajc-test dir="bugs150/pr115252" title="xlint message for improper annotation type inside OR">
  1243. <compile files="OrTypePattern.java" options="-1.9">
  1244. <message kind="warning" line="26" text="does not match because annotation @FieldAnnotation has @Target{ElementType.FIELD} [Xlint:unmatchedTargetKind]"/>
  1245. <message kind="warning" line="31" text="does not match because annotation @TypeAnnotation has @Target{ElementType.TYPE} [Xlint:unmatchedTargetKind]"/>
  1246. <message kind="warning" line="31" text="does not match because annotation @FieldAnnotation has @Target{ElementType.FIELD} [Xlint:unmatchedTargetKind]"/>
  1247. </compile>
  1248. </ajc-test>
  1249. <ajc-test dir="bugs150/pr115252" title="xlint message for improper annotation type inside AND">
  1250. <compile files="AndTypePattern.java" options="-1.9">
  1251. <message kind="warning" line="23" text="does not match because annotation @FieldAnnotation has @Target{ElementType.FIELD} [Xlint:unmatchedTargetKind]"/>
  1252. </compile>
  1253. </ajc-test>
  1254. <ajc-test dir="bugs150/pr115252" title="xlint message for improper annotated return type">
  1255. <compile files="AnnotationReturnType.java" options="-1.9">
  1256. <!-- warnings coming from matching pointcuts and corresponding declare warnings -->
  1257. <message kind="warning" line="12" text="(@TypeAnnotation *) *(..)"/>
  1258. <message kind="warning" line="12" text="(@(TypeAnnotation || MethodAnnotation) *) *(..)"/>
  1259. <!-- xlint warnings that were put in as part of fix for pr115252 -->
  1260. <message kind="warning" line="32" text="does not match because annotation @MethodAnnotation has @Target{ElementType.METHOD} [Xlint:unmatchedTargetKind]"/>
  1261. <message kind="warning" line="37" text="does not match because annotation @MethodAnnotation has @Target{ElementType.METHOD} [Xlint:unmatchedTargetKind]"/>
  1262. </compile>
  1263. </ajc-test>
  1264. <ajc-test dir="bugs150/pr115252" title="xlint message for improper annotated declaring type">
  1265. <compile files="AnnotationDeclaringType.java" options="-1.9">
  1266. <!-- warning coming from matching pointcuts and corresponding declare warnings -->
  1267. <message kind="warning" line="13" text="* (@TypeAnnotation *).*(..)"/>
  1268. <!-- xlint warning that was put in as part of fix for pr115252 -->
  1269. <message kind="warning" line="27" text="does not match because annotation @MethodAnnotation has @Target{ElementType.METHOD} [Xlint:unmatchedTargetKind]"/>
  1270. </compile>
  1271. </ajc-test>
  1272. <ajc-test dir="bugs150/pr115252" title="xlint message for improper annotated parameter type">
  1273. <compile files="AnnotationParameterType.java" options="-1.9">
  1274. <!-- warning coming from matching pointcuts and corresponding declare warnings -->
  1275. <message kind="warning" line="12" text="* *(@TypeAnnotation *)"/>
  1276. <!-- xlint warning that was put in as part of fix for pr115252 -->
  1277. <message kind="warning" line="31" text="does not match because annotation @MethodAnnotation has @Target{ElementType.METHOD} [Xlint:unmatchedTargetKind]"/>
  1278. </compile>
  1279. </ajc-test>
  1280. <ajc-test dir="bugs150/pr115252" title="xlint message for improper annotated throws pattern">
  1281. <compile files="AnnotationThrowsPattern.java" options="-1.9">
  1282. <!-- warnings coming from matching pointcuts and corresponding declare warnings -->
  1283. <message kind="warning" line="12" text="(* *.*(..) throws (@TypeAnnotation *))"/>
  1284. <message kind="warning" line="12" text="* *.*(..) throws !(@MethodAnnotation *)"/>
  1285. <message kind="warning" line="14" text="(* *.*(..) throws !(@TypeAnnotation *))"/>
  1286. <message kind="warning" line="14" text="* *.*(..) throws !(@MethodAnnotation *)"/>
  1287. <!-- xlint warnings that were put in as part of fix for pr115252 -->
  1288. <message kind="warning" line="40" text="does not match because annotation @MethodAnnotation has @Target{ElementType.METHOD} [Xlint:unmatchedTargetKind]"/>
  1289. <message kind="warning" line="46" text="does not match because annotation @MethodAnnotation has @Target{ElementType.METHOD} [Xlint:unmatchedTargetKind]"/>
  1290. </compile>
  1291. </ajc-test>
  1292. <ajc-test dir="bugs150/pr115252" title="xlint message for more than one improper annotated parameter type">
  1293. <compile files="MoreThanOneTargetAnnotation.java" options="-1.9">
  1294. <!-- xlint warning that was put in as part of fix for pr115252 -->
  1295. <message kind="warning" line="28" text="does not match because annotation @MethodAndFieldAnnotation has @Target{ElementType.FIELD,ElementType.METHOD} [Xlint:unmatchedTargetKind]"/>
  1296. <message kind="warning" line="38" text="does not match because annotation @TypeAndMethodAnnotation has @Target{ElementType.METHOD,ElementType.TYPE} [Xlint:unmatchedTargetKind]"/>
  1297. </compile>
  1298. </ajc-test>
  1299. <ajc-test dir="bugs150/pr119019" title="no NPE when inaccessible method is called within itd">
  1300. <compile files="bar/TargetITDClass.java,foo/ITDWithACall.aj" options="-1.9"/>
  1301. <run class="foo.ITDWithACall"/>
  1302. </ajc-test>
  1303. <ajc-test dir="bugs150" title="no NPE with or pointcut and more than one args">
  1304. <compile files="PR118149.aj" options="-1.9"/>
  1305. </ajc-test>
  1306. <ajc-test dir="bugs150" title="no StringOutOfBoundsException with generic inner aspects">
  1307. <compile files="PR119543.java" options="-1.9">
  1308. <message kind="warning" line="8" text="advice defined in PR119543$A has not been applied [Xlint:adviceDidNotMatch]"/>
  1309. </compile>
  1310. </ajc-test>
  1311. <!-- ============================================================================ -->
  1312. <!-- ============================================================================ -->
  1313. <!-- atOverride tests with ITDs -->
  1314. <ajc-test dir="java5/generics/itds" pr="106630" title="atOverride used with ITDs">
  1315. <compile files="AtOverride.aj" options="-1.9"/>
  1316. </ajc-test>
  1317. <ajc-test dir="java5/generics/itds" pr="106630" title="atOverride used with ITDs - 1">
  1318. <compile files="AtOverride1.aj" options="-1.9">
  1319. <message kind="error" line="9" text="The method method() of type Child must override a superclass method"/>
  1320. </compile>
  1321. </ajc-test>
  1322. <ajc-test dir="java5/generics/itds" pr="106630" title="atOverride used with ITDs - 2">
  1323. <compile files="AtOverride2.aj" options="-1.9"/>
  1324. </ajc-test>
  1325. <ajc-test dir="java5/generics/itds" pr="106630" title="atOverride used with ITDs - 3">
  1326. <compile files="AtOverride3.aj" options="-1.9"/>
  1327. </ajc-test>
  1328. <ajc-test dir="java5/generics/itds" pr="106630" title="atOverride used with ITDs - 4">
  1329. <compile files="AtOverride4.aj" options="-1.9"/>
  1330. </ajc-test>
  1331. <ajc-test dir="java5/generics/itds" pr="106630" title="atOverride used with ITDs - 5">
  1332. <compile files="AtOverride5.aj" options="-1.9">
  1333. <message kind="error" line="11" text="The method method() of type Child must override a superclass method"/>
  1334. </compile>
  1335. </ajc-test>
  1336. <ajc-test dir="java5/generics/itds" pr="106630" title="atOverride used with ITDs - 6">
  1337. <compile files="AtOverride6.aj" options="-1.9"/>
  1338. </ajc-test>
  1339. <ajc-test dir="java5/generics/itds" pr="106630" title="atOverride used with ITDs - 7">
  1340. <compile files="AtOverride7.aj" options="-1.9"/>
  1341. </ajc-test>
  1342. <!-- end of atOverride tests with ITDs -->
  1343. <ajc-test dir="../docs/dist/doc/examples/introduction" title="introduction sample" vm="1.5">
  1344. <compile files="CloneablePoint.java,ComparablePoint.java,HashablePoint.java,Point.java" options="-1.9 -Xlint:ignore"/>
  1345. </ajc-test>
  1346. <ajc-test dir="java5/varargs" title="varargs in constructor sig" vm="1.5">
  1347. <compile files="Pr88652.aj" options="-1.9">
  1348. <message kind="warning" line="8" text="should match"/>
  1349. <message kind="warning" line="9" text="should match"/>
  1350. </compile>
  1351. </ajc-test>
  1352. <ajc-test dir="java5/varargs" title="Varargs with .. in pointcut" vm="1.5">
  1353. <compile files="pr93356.aj" options="-1.9">
  1354. <message kind="warning" line="5" text="a"/>
  1355. <message kind="warning" line="5" text="b"/>
  1356. <message kind="warning" line="5" text="c"/>
  1357. <message kind="warning" line="5" text="d"/>
  1358. <message kind="warning" line="5" text="e"/>
  1359. <message kind="warning" line="5" text="k"/>
  1360. <message kind="warning" line="5" text="l"/>
  1361. <message kind="warning" line="4" text="f"/>
  1362. <message kind="warning" line="4" text="g"/>
  1363. <message kind="warning" line="4" text="h"/>
  1364. <message kind="warning" line="4" text="i"/>
  1365. <message kind="warning" line="4" text="j"/>
  1366. <message kind="warning" line="7" text="f"/>
  1367. </compile>
  1368. </ajc-test>
  1369. <ajc-test dir="java5/varargs" title="star varargs pattern" vm="1.5">
  1370. <compile files="StarVarargsPattern.aj" options="-1.9">
  1371. <message kind="warning" line="5" text="you used a varargs signature"/>
  1372. <message kind="warning" line="7" text="you used a varargs signature"/>
  1373. </compile>
  1374. </ajc-test>
  1375. <ajc-test dir="java5/annotations" title="invalid cons syntax" vm="1.5">
  1376. <compile files="SyntaxError.aj" options="-1.9">
  1377. <message kind="error" line="3" text="Syntax error on token &quot;new&quot;, &quot;method name (not constructor)&quot; expected"/>
  1378. </compile>
  1379. </ajc-test>
  1380. <!-- hasmethod / hasfield tests -->
  1381. <ajc-test title="declare parents : hasmethod(..) - 1" dir="hasmember">
  1382. <compile files="HasMethod.aj" options="-1.9">
  1383. <message kind="error" line="5" text="the type pattern hasmethod(* print(..)) can only be used when the -XhasMember option is set"/>
  1384. </compile>
  1385. </ajc-test>
  1386. <ajc-test title="declare parents : hasmethod(..) - 1" dir="hasmember">
  1387. <compile files="HasMethod.aj" options="-1.9 -XhasMember"/>
  1388. <run class="HasMethod"/>
  1389. </ajc-test>
  1390. <ajc-test title="declare parents : hasmethod(..) - 2" dir="hasmember">
  1391. <compile files="HasMethodInherited.aj" options="-1.9 -XhasMember"/>
  1392. <run class="HasMethodInherited"/>
  1393. </ajc-test>
  1394. <ajc-test title="declare parents : hasmethod(..) - 3" dir="hasmember">
  1395. <compile files="HasPrivateMethodInherited.aj" options="-1.9 -XhasMember"/>
  1396. <run class="HasPrivateMethodInherited"/>
  1397. </ajc-test>
  1398. <ajc-test title="declare parents : hasmethod(..) - 4" dir="hasmember">
  1399. <compile files="HasMethodViaITD.aj" options="-1.9 -XhasMember">
  1400. <message kind="warning" line="15" text="hasmethod matched on ITD ok"/>
  1401. </compile>
  1402. </ajc-test>
  1403. <ajc-test title="declare parents : hasfield(..) - 1" dir="hasmember">
  1404. <compile files="HasField.aj" options="-1.9 -XhasMember"/>
  1405. <run class="HasField"/>
  1406. </ajc-test>
  1407. <ajc-test title="declare parents : hasfield(..) - 2" dir="hasmember">
  1408. <compile files="HasFieldInherited.aj" options="-1.9 -XhasMember"/>
  1409. <run class="HasFieldInherited"/>
  1410. </ajc-test>
  1411. <ajc-test title="declare parents : hasfield(..) - 3" dir="hasmember">
  1412. <compile files="HasPrivateFieldInherited.aj" options="-1.9 -XhasMember"/>
  1413. <run class="HasPrivateFieldInherited"/>
  1414. </ajc-test>
  1415. <!-- Annotation binding tests -->
  1416. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 1">
  1417. <compile files="CallAnnBinding.aj" options="-1.9"/>
  1418. <run class="CallAnnBinding"/>
  1419. </ajc-test>
  1420. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 2">
  1421. <compile files="CallAnnBinding2.aj" options="-1.9"/>
  1422. <run class="CallAnnBinding2"/>
  1423. </ajc-test>
  1424. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 3">
  1425. <compile files="CallAnnBinding3.aj" options="-1.9"/>
  1426. <run class="CallAnnBinding3"/>
  1427. </ajc-test>
  1428. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 4">
  1429. <compile files="CallAnnBinding4.aj" options="-1.9"/>
  1430. <run class="CallAnnBinding4"/>
  1431. </ajc-test>
  1432. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 5">
  1433. <compile files="CallAnnBinding5.aj" options="-1.9"/>
  1434. <run class="CallAnnBinding5"/>
  1435. </ajc-test>
  1436. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 6">
  1437. <compile files="CallAnnBinding6.aj" options="-1.9"/>
  1438. <run class="CallAnnBinding6"/>
  1439. </ajc-test>
  1440. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 7">
  1441. <compile files="CallAnnBinding7.aj" options="-1.9"/>
  1442. <run class="CallAnnBinding7"/>
  1443. </ajc-test>
  1444. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@target annotation binding 1">
  1445. <compile files="AtTarget1.aj" options="-1.9"/>
  1446. <run class="AtTarget1"/>
  1447. </ajc-test>
  1448. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@target annotation binding 2">
  1449. <compile files="AtTarget2.aj" options="-1.9"/>
  1450. <run class="AtTarget2"/>
  1451. </ajc-test>
  1452. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@target annotation binding 3">
  1453. <compile files="AtTarget3.aj" options="-1.9"/>
  1454. <run class="AtTarget3"/>
  1455. </ajc-test>
  1456. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@target annotation binding 4">
  1457. <compile files="AtTarget4.aj" options="-1.9"/>
  1458. <run class="AtTarget4"/>
  1459. </ajc-test>
  1460. <ajc-test dir="java5/annotations/binding/usingPackageNames" vm="1.5" title="@target annotation binding 5">
  1461. <compile files="MyAspect.aj,MyAnnotation.java,MyClass.java" options="-1.9"/>
  1462. <run class="test.MyClass"/>
  1463. </ajc-test>
  1464. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@this annotation binding 1">
  1465. <compile files="AtThis1.aj" options="-1.9"/>
  1466. <run class="AtThis1"/>
  1467. </ajc-test>
  1468. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@this annotation binding 2">
  1469. <compile files="AtThis2.aj" options="-1.9"/>
  1470. <run class="AtThis2"/>
  1471. </ajc-test>
  1472. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@this annotation binding 3">
  1473. <compile files="AtThis3.aj" options="-1.9"/>
  1474. <run class="AtThis3"/>
  1475. </ajc-test>
  1476. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@this annotation binding 4">
  1477. <compile files="AtThis4.aj" options="-1.9"/>
  1478. <run class="AtThis4"/>
  1479. </ajc-test>
  1480. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@this annotation binding 5">
  1481. <compile files="AtThis5.aj" options="-1.9"/>
  1482. <run class="AtThis5"/>
  1483. </ajc-test>
  1484. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@args annotation binding 1">
  1485. <compile files="AtArgs1.aj" options="-1.9"/>
  1486. <run class="AtArgs1"/>
  1487. </ajc-test>
  1488. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@args annotation binding 2">
  1489. <compile files="AtArgs2.aj" options="-1.9"/>
  1490. <run class="AtArgs2"/>
  1491. </ajc-test>
  1492. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@args annotation binding 3">
  1493. <compile files="AtArgs3.aj" options="-1.9"/>
  1494. <run class="AtArgs3"/>
  1495. </ajc-test>
  1496. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@args annotation binding 4">
  1497. <compile files="AtArgs4.aj" options="-1.9"/>
  1498. <run class="AtArgs4"/>
  1499. </ajc-test>
  1500. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@args annotation binding 5">
  1501. <compile files="AtArgs5.aj" options="-1.9"/>
  1502. <run class="AtArgs5"/>
  1503. </ajc-test>
  1504. <ajc-test dir="java5/annotations/binding" vm="1.5" title="execution and @annotation">
  1505. <compile files="ExecutionAnnBinding1.aj" options="-1.9"/>
  1506. <run class="ExecutionAnnBinding1"/>
  1507. </ajc-test>
  1508. <ajc-test dir="java5/annotations/binding" vm="1.5" title="set and @annotation">
  1509. <compile files="FieldAnnBinding1.aj" options="-1.9"/>
  1510. <run class="FieldAnnBinding1"/>
  1511. </ajc-test>
  1512. <ajc-test dir="java5/annotations/binding" vm="1.5" title="get and @annotation">
  1513. <compile files="FieldAnnBinding2.aj" options="-1.9"/>
  1514. <run class="FieldAnnBinding2"/>
  1515. </ajc-test>
  1516. <ajc-test dir="java5/annotations/binding" vm="1.5" title="get and @annotation with arrays">
  1517. <compile files="FieldAnnBinding3.aj" options="-1.9"/>
  1518. <run class="FieldAnnBinding3"/>
  1519. </ajc-test>
  1520. <ajc-test dir="java5/annotations/binding" vm="1.5" title="cons call and @annotation">
  1521. <compile files="CtorAnnBinding1.aj" options="-1.9"/>
  1522. <run class="CtorAnnBinding1"/>
  1523. </ajc-test>
  1524. <ajc-test dir="java5/annotations/binding" vm="1.5" title="cons exe and @annotation">
  1525. <compile files="CtorAnnBinding2.aj" options="-1.9"/>
  1526. <run class="CtorAnnBinding2"/>
  1527. </ajc-test>
  1528. <ajc-test dir="java5/annotations/binding" vm="1.5" title="staticinit and @annotation">
  1529. <compile files="StaticInitBinding.aj" options="-1.9"/>
  1530. <run class="StaticInitBinding"/>
  1531. </ajc-test>
  1532. <ajc-test dir="java5/annotations/binding" vm="1.5" title="preinit and @annotation">
  1533. <compile files="PreInitBinding.aj" options="-1.9"/>
  1534. <run class="PreInitBinding"/>
  1535. </ajc-test>
  1536. <ajc-test dir="java5/annotations/binding" vm="1.5" title="init and @annotation">
  1537. <compile files="InitBinding.aj" options="-1.9"/>
  1538. <run class="InitBinding"/>
  1539. </ajc-test>
  1540. <ajc-test dir="java5/annotations/binding" vm="1.5" title="adviceexecution and @annotation">
  1541. <compile files="AdviceExecBinding.aj" options="-1.9"/>
  1542. <run class="AdviceExecBinding"/>
  1543. </ajc-test>
  1544. <ajc-test dir="java5/annotations/binding" vm="1.5" title="handler and @annotation">
  1545. <compile files="HandlerBinding.aj" options="-1.9"/>
  1546. <run class="HandlerBinding"/>
  1547. </ajc-test>
  1548. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@withincode() and call(* println(..))">
  1549. <compile files="WithinCodeBinding1.aj" options="-1.9"/>
  1550. <run class="WithinCodeBinding1"/>
  1551. </ajc-test>
  1552. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@within">
  1553. <compile files="WithinBinding1.aj" options="-1.9"/>
  1554. <run class="WithinBinding1"/>
  1555. </ajc-test>
  1556. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@within - multiple types">
  1557. <compile files="WithinBinding2.aj" options="-1.9"/>
  1558. <run class="WithinBinding2"/>
  1559. </ajc-test>
  1560. <ajc-test dir="java5/annotations/binding/complexExample" vm="1.5" title="packages and no binding">
  1561. <compile files="A.java,B.java,Color.java,X.java" options="-1.9"/>
  1562. <run class="a.b.c.A"/>
  1563. </ajc-test>
  1564. <ajc-test dir="java5/annotations/binding/complexExample" vm="1.5" title="packages and binding">
  1565. <compile files="A.java,B.java,Color.java,X2.java" options="-1.9"/>
  1566. <run class="a.b.c.A"/>
  1567. </ajc-test>
  1568. <ajc-test dir="java5/annotations/binding" vm="1.5" title="binding with static methods">
  1569. <compile files="StaticMethods.java" options="-1.9"/>
  1570. <run class="StaticMethods"/>
  1571. </ajc-test>
  1572. <ajc-test dir="java5/annotations" vm="1.5" title="annotation matching on call">
  1573. <weave classesFiles="AnnotatedType.java,SimpleAnnotation.java,SimpleAnnotation2.java"
  1574. aspectsFiles="AnnotationAspect02.aj"
  1575. options="-1.9,-showWeaveInfo">
  1576. <message kind="weave" text="Type 'AnnotatedType' (AnnotatedType.java:3) advised by before advice from 'AnnotationAspect02' (aspects.jar!AnnotationAspect02.class:4(from AnnotationAspect02.aj))"/>
  1577. <message kind="weave" text="Type 'AnnotatedType' (AnnotatedType.java:3) advised by before advice from 'AnnotationAspect02' (aspects.jar!AnnotationAspect02.class:2(from AnnotationAspect02.aj))"/>
  1578. <message kind="weave" text="Type 'AnnotatedType' (AnnotatedType.java:4) advised by before advice from 'AnnotationAspect02' (aspects.jar!AnnotationAspect02.class:4(from AnnotationAspect02.aj))"/>
  1579. </weave>
  1580. </ajc-test>
  1581. <ajc-test dir="java5/annotations" vm="1.5" title="at annotation matching">
  1582. <weave classesFiles="AnnotatedType.java,SimpleAnnotation.java,SimpleAnnotation2.java"
  1583. aspectsFiles="AnnotationAspect03.aj"
  1584. options="-1.9,-showWeaveInfo">
  1585. <message kind="warning" line="8" text="@annotation matched here"/>
  1586. </weave>
  1587. </ajc-test>
  1588. <ajc-test dir="java5/annotations/within_code" vm="1.5" title="annotations and within(code)">
  1589. <weave classesFiles="TestingAnnotations.java"
  1590. aspectsFiles="WithinAndWithinCodeTests.java"
  1591. options="-1.9,-showWeaveInfo">
  1592. <message kind="warning" line="31" text="@within match on non-inherited annotation"/>
  1593. <message kind="warning" line="39" text="@within match on non-inherited annotation"/>
  1594. <message kind="warning" line="39" text="@within match on inheritable annotation"/>
  1595. <message kind="warning" line="43" text="@within match on inheritable annotation"/>
  1596. <message kind="warning" line="32" text="@withincode match"/>
  1597. </weave>
  1598. </ajc-test>
  1599. <ajc-test dir="java5/annotations/within" vm="1.5" title="annotations and within">
  1600. <weave classesFiles="PlainWithin.java"
  1601. aspectsFiles="PlainWithinTests.java"
  1602. options="-1.9,-showWeaveInfo">
  1603. <message kind="warning" line="21" text="positive within match on annotation"/>
  1604. <message kind="warning" line="25" text="negative within match on annotation"/>
  1605. </weave>
  1606. </ajc-test>
  1607. <ajc-test dir="java5/annotations/thisOrtarget" vm="1.5" title="must have runtime retention">
  1608. <compile options="-1.9" files="NotRuntimeRetention.aj">
  1609. <message kind="error" line="20" text="Annotation type MySourceAnnotation does not have runtime retention"/>
  1610. <message kind="error" line="21" text="Annotation type MyClassAnnotation does not have runtime retention"/>
  1611. <message kind="error" line="22" text="Annotation type MyAnnotation does not have runtime retention"/>
  1612. </compile>
  1613. </ajc-test>
  1614. <ajc-test dir="java5/annotations/thisOrtarget" vm="1.5" title="inheritable or not">
  1615. <compile options="-1.9" files="TestingAnnotations.java,ThisOrTargetTests.aj"/>
  1616. <run class="TestingAnnotations"/>
  1617. </ajc-test>
  1618. <ajc-test dir="java5/annotations/thisOrtarget" vm="1.5" title="use of @this/target in deow">
  1619. <compile options="-1.9" files="TestingAnnotations.java,DeclareEoW.java">
  1620. <message kind="error" line="3" text="this() pointcut designator cannot be used in declare statement"/>
  1621. <message kind="error" line="5" text="target() pointcut designator cannot be used in declare statement"/>
  1622. </compile>
  1623. </ajc-test>
  1624. <ajc-test dir="java5/annotations/args" vm="1.5" title="@args tests">
  1625. <compile options="-1.9" files="TestingArgsAnnotations.java,AtArgsAspect.java"/>
  1626. <run class="TestingArgsAnnotations"/>
  1627. </ajc-test>
  1628. <ajc-test dir="java5/annotations/args" vm="1.5" title="use of @args in deow">
  1629. <compile options="-1.9" files="TestingArgsAnnotations.java,DeclareEoW.java">
  1630. <message kind="error" line="3" text="args() pointcut designator cannot be used in declare statement"/>
  1631. </compile>
  1632. </ajc-test>
  1633. <ajc-test dir="java5/annotations" vm="1.5" title="compiling an annotation">
  1634. <compile options="-1.9" files="SimpleAnnotation.java"/>
  1635. </ajc-test>
  1636. <ajc-test dir="java5/annotations" vm="1.5" title="compiling annotated file">
  1637. <compile options="-1.9" files="SimpleAnnotation.java,AnnotatedType.java"/>
  1638. </ajc-test>
  1639. <ajc-test dir="java5/annotations/within" vm="1.5" title="annotations and within (src)">
  1640. <compile files="PlainWithin.java,PlainWithinTests.java"
  1641. aspectsFiles="PlainWithinTests.java"
  1642. options="-1.9">
  1643. <message kind="warning" line="21" text="positive within match on annotation"/>
  1644. <message kind="warning" line="25" text="negative within match on annotation"/>
  1645. </compile>
  1646. </ajc-test>
  1647. <ajc-test dir="java5/annotations/attarget" vm="1.5" title="losing annotations...">
  1648. <compile options="-1.9" files="Program.java,AtTargetAspect.java"/>
  1649. </ajc-test>
  1650. <ajc-test dir="java5/annotations" vm="1.5" title="no itds on annotation types">
  1651. <compile files="AnnotatedType.java,SimpleAnnotation.java,SimpleAnnotation2.java,AnnotationAspect01.aj"
  1652. options="-1.9">
  1653. <message kind="error" line="4" text="can't make inter-type constructor declarations"/>
  1654. <message kind="error" line="8" text="can't make inter-type method declarations"/>
  1655. <message kind="error" line="13" text="can't make inter-type field declarations"/>
  1656. </compile>
  1657. </ajc-test>
  1658. <ajc-test dir="java5/annotations" vm="1.5" title="no declare parents on annotation types">
  1659. <compile files="AnnotatedType.java,SimpleAnnotation.java,SimpleAnnotation2.java,AnnotationAspect04.aj"
  1660. options="-1.9">
  1661. <message kind="error" line="7" text="can't use declare parents to alter supertype of annotation type SimpleAnnotation"/>
  1662. <message kind="error" line="10" text="can't use declare parents to make 'java.lang.annotation.Annotation' the parent of type"/>
  1663. <message kind="error" line="4" text="can't use declare parents to make annotation type SimpleAnnotation implement an interface"/>
  1664. </compile>
  1665. </ajc-test>
  1666. <ajc-test dir="java5/annotations" vm="1.5" title="declare parents wildcards matching annotation types">
  1667. <compile files="AnnotatedType.java,SimpleAnnotation.java,SimpleAnnotation2.java,AnnotationAspect05.aj"
  1668. options="-1.9">
  1669. <message kind="warning" line="4" text="annotation type SimpleAnnotation2 matches a declare parents type pattern but is being ignored"/>
  1670. <message kind="warning" line="4" text="annotation type SimpleAnnotation matches a declare parents type pattern but is being ignored"/>
  1671. </compile>
  1672. </ajc-test>
  1673. <ajc-test dir="java5/annotations/binding/complexExample" vm="1.5" title="annotated any pattern">
  1674. <compile files="A.java,B.java,C.java,Color.java,X3.java"
  1675. options="-1.9">
  1676. </compile>
  1677. <run class="g.h.i.C"/>
  1678. <run class="a.b.c.A"/>
  1679. </ajc-test>
  1680. <ajc-test dir="java5/annotations/binding/complexExample" vm="1.5" title="annotation not imported">
  1681. <compile files="A.java,B.java,C.java,Color.java,X4.java"
  1682. options="-1.9">
  1683. <message kind="warning" line="6" text="no match for this type name: Color"/>
  1684. </compile>
  1685. <run class="a.b.c.A"/>
  1686. </ajc-test>
  1687. <ajc-test dir="java5/annotations/itds" vm="1.5" title="annotated public itds">
  1688. <compile files="AtItd2.aj" options="-1.9"/>
  1689. <run class="AtItd2"/>
  1690. </ajc-test>
  1691. <ajc-test dir="java5/annotations/itds" vm="1.5" title="annotated public itds - values">
  1692. <compile files="AtItd3.aj" options="-1.9"/>
  1693. <run class="AtItd3"/>
  1694. </ajc-test>
  1695. <ajc-test dir="java5/annotations/itds" vm="1.5" title="annotated public itds - multiple complex annotations">
  1696. <compile files="AtItd4.aj" options="-1.9"/>
  1697. <run class="AtItd4"/>
  1698. </ajc-test>
  1699. <ajc-test dir="java5/annotations/itds" vm="1.5" title="nasty annotation and itds test">
  1700. <compile files="AnnotationsAndITDs.aj" options="-1.9">
  1701. <!-- first two are ITCs, second two are ITCs annotated via declare @ctor, third is default ctor -->
  1702. <message kind="warning" line="17" text="execution(@SomeAnnotation ...new(..)"/>
  1703. <message kind="warning" line="20" text="execution(@SomeAnnotation ...new(..)"/>
  1704. <message kind="warning" line="45" text="execution(@SomeAnnotation ...new(..)"/>
  1705. <message kind="warning" line="46" text="execution(@SomeAnnotation ...new(..)"/>
  1706. <message kind="warning" line="180" text="execution(@SomeAnnotation ...new(..)"/>
  1707. <!-- first four are fields annotated via declare, last two are directly annotated ITDs -->
  1708. <message kind="warning" line="59" text="set(@SomeAnnotation...)"/>
  1709. <message kind="warning" line="60" text="set(@SomeAnnotation...)"/>
  1710. <message kind="warning" line="70" text="set(@SomeAnnotation...)"/>
  1711. <message kind="warning" line="71" text="set(@SomeAnnotation...)"/>
  1712. <message kind="warning" line="76" text="set(@SomeAnnotation...)"/>
  1713. <message kind="warning" line="77" text="set(@SomeAnnotation...)"/>
  1714. <!-- annotations added via declare -->
  1715. <message kind="warning" line="175" text="si(@SomeAnnotation...)"/>
  1716. <message kind="warning" line="180" text="si(@SomeAnnotation...)"/>
  1717. <message kind="warning" line="25" text="execution(@SomeAnnotation ...)"/>
  1718. <message kind="warning" line="28" text="execution(@SomeAnnotation ...)"/>
  1719. <message kind="warning" line="52" text="execution(@SomeAnnotation ...)"/>
  1720. <message kind="warning" line="53" text="execution(@SomeAnnotation ...)"/>
  1721. <!--message kind="warning" line="70" text="set(@SomeAnnotation...)"/>
  1722. <message kind="warning" line="71" text="set(@SomeAnnotation...)"/-->
  1723. </compile>
  1724. <run class="AnnotationsAndITDs">
  1725. <stderr>
  1726. <line text="@type java.lang.System (AnnotationsAndITDs.aj:0)"/>
  1727. <line text="hello AnnotationsAndITDs (AnnotationsAndITDs.aj:17)"/>
  1728. <line text="goodbye java.lang.String (AnnotationsAndITDs.aj:20)"/>
  1729. <line text="goodbye java.lang.String (AnnotationsAndITDs.aj:20)"/>
  1730. <line text="y java.lang.Integer (AnnotationsAndITDs.aj:28)"/>
  1731. <line text="d java.lang.Double (AnnotationsAndITDs.aj:70)"/>
  1732. <line text="f java.lang.Double (AnnotationsAndITDs.aj:71)"/>
  1733. <line text="@type java.lang.System (AnnotationsAndITDs.aj:0)"/>
  1734. <line text="@field ITDMe2 (AnnotationsAndITDs.aj:59)"/>
  1735. <line text="@field ITDMe2 (AnnotationsAndITDs.aj:60)"/>
  1736. <line text="@cons java.lang.String (AnnotationsAndITDs.aj:45)"/>
  1737. <line text="@field ITDMe2 (AnnotationsAndITDs.aj:59)"/>
  1738. <line text="@field ITDMe2 (AnnotationsAndITDs.aj:60)"/>
  1739. <line text="@cons java.lang.String (AnnotationsAndITDs.aj:46)"/>
  1740. <line text="@cons java.lang.String (AnnotationsAndITDs.aj:46)"/>
  1741. <line text="@method ITDMe2 (AnnotationsAndITDs.aj:53)"/>
  1742. <line text="@field ITDMe2 (AnnotationsAndITDs.aj:76)"/>
  1743. <line text="@field ITDMe2 (AnnotationsAndITDs.aj:77)"/>
  1744. <!--
  1745. <line text="method bar has 1 params, first param annotation is @ParamAnnotation"/>
  1746. -->
  1747. </stderr>
  1748. </run>
  1749. </ajc-test>
  1750. <ajc-test dir="java5/annotations/declare" pr="91858" title="declare @Type (should be @type)">
  1751. <compile files="DeathByPoorSpelling.aj" options="-1.9">
  1752. <message kind="error" line="6" text="Syntax error on token &quot;:&quot;, &quot;one of type, method, field, constructor&quot; expected"/>
  1753. </compile>
  1754. </ajc-test>
  1755. <!-- ======================================================================================= -->
  1756. <!-- Autoboxing tests -->
  1757. <!-- ======================================================================================= -->
  1758. <ajc-test dir="java5/autoboxing" vm="1.5" title="simple boxing test">
  1759. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,SimpleAutoboxingAspect.aj"
  1760. options="-1.9,-showWeaveInfo">
  1761. <message kind="weave" text="Type 'SimpleAutoboxing' (SimpleAutoboxing.java:7) advised by before advice from 'SimpleAutoboxingAspect' (SimpleAutoboxingAspect.aj:8)"/>
  1762. <message kind="weave" text="Type 'SimpleAutoboxing' (SimpleAutoboxing.java:7) advised by before advice from 'SimpleAutoboxingAspect' (SimpleAutoboxingAspect.aj:4)"/>
  1763. </compile>
  1764. <run class="SimpleAutoboxing">
  1765. <stderr>
  1766. <line text="Matching by Integer:20000"/>
  1767. <line text="Matching by int:20000"/>
  1768. <line text="method_takes_Integer=20000"/>
  1769. </stderr>
  1770. </run>
  1771. </ajc-test>
  1772. <ajc-test dir="java5/autoboxing" vm="1.5" title="integer boxing">
  1773. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectInteger.aj"
  1774. options="-1.9,-showWeaveInfo">
  1775. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:11) advised by before advice from 'AspectInteger' (AspectInteger.aj:8)"/>
  1776. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:11) advised by before advice from 'AspectInteger' (AspectInteger.aj:4)"/>
  1777. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:12) advised by before advice from 'AspectInteger' (AspectInteger.aj:8)"/>
  1778. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:12) advised by before advice from 'AspectInteger' (AspectInteger.aj:4)"/>
  1779. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:13) advised by before advice from 'AspectInteger' (AspectInteger.aj:8)"/>
  1780. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:13) advised by before advice from 'AspectInteger' (AspectInteger.aj:4)"/>
  1781. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:14) advised by before advice from 'AspectInteger' (AspectInteger.aj:8)"/>
  1782. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:14) advised by before advice from 'AspectInteger' (AspectInteger.aj:4)"/>
  1783. </compile>
  1784. <run class="AutoboxingI">
  1785. <stderr>
  1786. <line text="Matching by Integer:10000"/>
  1787. <line text="Matching by int:10000"/>
  1788. <line text="method_takes_Integer=10000"/>
  1789. <line text="Matching by Integer:20000"/>
  1790. <line text="Matching by int:20000"/>
  1791. <line text="method_takes_Integer=20000"/>
  1792. <line text="Matching by Integer:30000"/>
  1793. <line text="Matching by int:30000"/>
  1794. <line text="method_takes_int=30000"/>
  1795. <line text="Matching by Integer:40000"/>
  1796. <line text="Matching by int:40000"/>
  1797. <line text="method_takes_int=40000"/>
  1798. </stderr>
  1799. </run>
  1800. </ajc-test>
  1801. <ajc-test dir="java5/autoboxing" vm="1.5" title="char boxing">
  1802. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectChar.aj"
  1803. options="-1.9,-showWeaveInfo">
  1804. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:11) advised by before advice from 'AspectChar' (AspectChar.aj:8)"/>
  1805. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:11) advised by before advice from 'AspectChar' (AspectChar.aj:4)"/>
  1806. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:12) advised by before advice from 'AspectChar' (AspectChar.aj:8)"/>
  1807. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:12) advised by before advice from 'AspectChar' (AspectChar.aj:4)"/>
  1808. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:13) advised by before advice from 'AspectChar' (AspectChar.aj:8)"/>
  1809. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:13) advised by before advice from 'AspectChar' (AspectChar.aj:4)"/>
  1810. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:14) advised by before advice from 'AspectChar' (AspectChar.aj:8)"/>
  1811. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:14) advised by before advice from 'AspectChar' (AspectChar.aj:4)"/>
  1812. </compile>
  1813. <run class="AutoboxingC">
  1814. <stderr>
  1815. <line text="Character:1"/>
  1816. <line text="char:1"/>
  1817. <line text="method_takes_Character=1"/>
  1818. <line text="Character:2"/>
  1819. <line text="char:2"/>
  1820. <line text="method_takes_Character=2"/>
  1821. <line text="Character:3"/>
  1822. <line text="char:3"/>
  1823. <line text="method_takes_char=3"/>
  1824. <line text="Character:4"/>
  1825. <line text="char:4"/>
  1826. <line text="method_takes_char=4"/>
  1827. </stderr>
  1828. </run>
  1829. </ajc-test>
  1830. <ajc-test dir="java5/autoboxing" vm="1.5" title="double boxing">
  1831. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectDouble.aj"
  1832. options="-1.9,-showWeaveInfo">
  1833. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:11) advised by before advice from 'AspectDouble' (AspectDouble.aj:8)"/>
  1834. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:11) advised by before advice from 'AspectDouble' (AspectDouble.aj:4)"/>
  1835. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:12) advised by before advice from 'AspectDouble' (AspectDouble.aj:8)"/>
  1836. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:12) advised by before advice from 'AspectDouble' (AspectDouble.aj:4)"/>
  1837. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:13) advised by before advice from 'AspectDouble' (AspectDouble.aj:8)"/>
  1838. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:13) advised by before advice from 'AspectDouble' (AspectDouble.aj:4)"/>
  1839. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:14) advised by before advice from 'AspectDouble' (AspectDouble.aj:8)"/>
  1840. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:14) advised by before advice from 'AspectDouble' (AspectDouble.aj:4)"/>
  1841. </compile>
  1842. <run class="AutoboxingD">
  1843. <stderr>
  1844. <line text="Double:100.0"/>
  1845. <line text="double:100.0"/>
  1846. <line text="method_takes_Double=100.0"/>
  1847. <line text="Double:200.0"/>
  1848. <line text="double:200.0"/>
  1849. <line text="method_takes_Double=200.0"/>
  1850. <line text="Double:300.0"/>
  1851. <line text="double:300.0"/>
  1852. <line text="method_takes_double=300.0"/>
  1853. <line text="Double:400.0"/>
  1854. <line text="double:400.0"/>
  1855. <line text="method_takes_double=400.0"/>
  1856. </stderr>
  1857. </run>
  1858. </ajc-test>
  1859. <ajc-test dir="java5/autoboxing" vm="1.5" title="float boxing">
  1860. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectFloat.aj"
  1861. options="-1.9,-showWeaveInfo">
  1862. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:11) advised by before advice from 'AspectFloat' (AspectFloat.aj:8)"/>
  1863. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:11) advised by before advice from 'AspectFloat' (AspectFloat.aj:4)"/>
  1864. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:12) advised by before advice from 'AspectFloat' (AspectFloat.aj:8)"/>
  1865. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:12) advised by before advice from 'AspectFloat' (AspectFloat.aj:4)"/>
  1866. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:13) advised by before advice from 'AspectFloat' (AspectFloat.aj:8)"/>
  1867. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:13) advised by before advice from 'AspectFloat' (AspectFloat.aj:4)"/>
  1868. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:14) advised by before advice from 'AspectFloat' (AspectFloat.aj:8)"/>
  1869. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:14) advised by before advice from 'AspectFloat' (AspectFloat.aj:4)"/>
  1870. </compile>
  1871. <run class="AutoboxingF">
  1872. <stderr>
  1873. <line text="Float:100.0"/>
  1874. <line text="float:100.0"/>
  1875. <line text="method_takes_Float=100.0"/>
  1876. <line text="Float:200.0"/>
  1877. <line text="float:200.0"/>
  1878. <line text="method_takes_Float=200.0"/>
  1879. <line text="Float:300.0"/>
  1880. <line text="float:300.0"/>
  1881. <line text="method_takes_float=300.0"/>
  1882. <line text="Float:400.0"/>
  1883. <line text="float:400.0"/>
  1884. <line text="method_takes_float=400.0"/>
  1885. </stderr>
  1886. </run>
  1887. </ajc-test>
  1888. <ajc-test dir="java5/autoboxing" vm="1.5" title="short boxing">
  1889. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectShort.aj"
  1890. options="-1.9,-showWeaveInfo">
  1891. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:11) advised by before advice from 'AspectShort' (AspectShort.aj:8)"/>
  1892. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:11) advised by before advice from 'AspectShort' (AspectShort.aj:4)"/>
  1893. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:12) advised by before advice from 'AspectShort' (AspectShort.aj:8)"/>
  1894. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:12) advised by before advice from 'AspectShort' (AspectShort.aj:4)"/>
  1895. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:13) advised by before advice from 'AspectShort' (AspectShort.aj:8)"/>
  1896. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:13) advised by before advice from 'AspectShort' (AspectShort.aj:4)"/>
  1897. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:14) advised by before advice from 'AspectShort' (AspectShort.aj:8)"/>
  1898. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:14) advised by before advice from 'AspectShort' (AspectShort.aj:4)"/>
  1899. </compile>
  1900. <run class="AutoboxingS">
  1901. <stderr>
  1902. <line text="Short:100"/>
  1903. <line text="short:100"/>
  1904. <line text="method_takes_Short=100"/>
  1905. <line text="Short:200"/>
  1906. <line text="short:200"/>
  1907. <line text="method_takes_Short=200"/>
  1908. <line text="Short:300"/>
  1909. <line text="short:300"/>
  1910. <line text="method_takes_short=300"/>
  1911. <line text="Short:400"/>
  1912. <line text="short:400"/>
  1913. <line text="method_takes_short=400"/>
  1914. </stderr>
  1915. </run>
  1916. </ajc-test>
  1917. <ajc-test dir="java5/autoboxing" vm="1.5" title="long boxing">
  1918. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectLong.aj"
  1919. options="-1.9,-showWeaveInfo">
  1920. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:11) advised by before advice from 'AspectLong' (AspectLong.aj:8)"/>
  1921. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:11) advised by before advice from 'AspectLong' (AspectLong.aj:4)"/>
  1922. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:12) advised by before advice from 'AspectLong' (AspectLong.aj:8)"/>
  1923. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:12) advised by before advice from 'AspectLong' (AspectLong.aj:4)"/>
  1924. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:13) advised by before advice from 'AspectLong' (AspectLong.aj:8)"/>
  1925. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:13) advised by before advice from 'AspectLong' (AspectLong.aj:4)"/>
  1926. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:14) advised by before advice from 'AspectLong' (AspectLong.aj:8)"/>
  1927. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:14) advised by before advice from 'AspectLong' (AspectLong.aj:4)"/>
  1928. </compile>
  1929. <run class="AutoboxingJ">
  1930. <stderr>
  1931. <line text="Long:1000000"/>
  1932. <line text="long:1000000"/>
  1933. <line text="method_takes_Long=1000000"/>
  1934. <line text="Long:2000000"/>
  1935. <line text="long:2000000"/>
  1936. <line text="method_takes_Long=2000000"/>
  1937. <line text="Long:3000000"/>
  1938. <line text="long:3000000"/>
  1939. <line text="method_takes_long=3000000"/>
  1940. <line text="Long:4000000"/>
  1941. <line text="long:4000000"/>
  1942. <line text="method_takes_long=4000000"/>
  1943. </stderr>
  1944. </run>
  1945. </ajc-test>
  1946. <ajc-test dir="java5/autoboxing" vm="1.5" title="boolean boxing">
  1947. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectBoolean.aj"
  1948. options="-1.9,-showWeaveInfo">
  1949. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:9) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:8)"/>
  1950. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:9) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:4)"/>
  1951. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:10) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:8)"/>
  1952. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:10) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:4)"/>
  1953. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:11) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:8)"/>
  1954. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:11) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:4)"/>
  1955. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:12) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:8)"/>
  1956. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:12) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:4)"/>
  1957. </compile>
  1958. <run class="AutoboxingZ">
  1959. <stderr>
  1960. <line text="Boolean:false"/>
  1961. <line text="boolean:false"/>
  1962. <line text="method_takes_Boolean=false"/>
  1963. <line text="Boolean:false"/>
  1964. <line text="boolean:false"/>
  1965. <line text="method_takes_Boolean=false"/>
  1966. <line text="Boolean:false"/>
  1967. <line text="boolean:false"/>
  1968. <line text="method_takes_boolean=false"/>
  1969. <line text="Boolean:false"/>
  1970. <line text="boolean:false"/>
  1971. <line text="method_takes_boolean=false"/>
  1972. </stderr>
  1973. </run>
  1974. </ajc-test>
  1975. <ajc-test dir="java5/autoboxing" vm="1.5" title="byte boxing">
  1976. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectByte.aj"
  1977. options="-1.9,-showWeaveInfo">
  1978. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:11) advised by before advice from 'AspectByte' (AspectByte.aj:8)"/>
  1979. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:11) advised by before advice from 'AspectByte' (AspectByte.aj:4)"/>
  1980. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:12) advised by before advice from 'AspectByte' (AspectByte.aj:8)"/>
  1981. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:12) advised by before advice from 'AspectByte' (AspectByte.aj:4)"/>
  1982. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:13) advised by before advice from 'AspectByte' (AspectByte.aj:8)"/>
  1983. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:13) advised by before advice from 'AspectByte' (AspectByte.aj:4)"/>
  1984. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:14) advised by before advice from 'AspectByte' (AspectByte.aj:8)"/>
  1985. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:14) advised by before advice from 'AspectByte' (AspectByte.aj:4)"/>
  1986. </compile>
  1987. <run class="AutoboxingB">
  1988. <stderr>
  1989. <line text="Byte:1"/>
  1990. <line text="byte:1"/>
  1991. <line text="method_takes_Byte=1"/>
  1992. <line text="Byte:50"/>
  1993. <line text="byte:50"/>
  1994. <line text="method_takes_Byte=50"/>
  1995. <line text="Byte:3"/>
  1996. <line text="byte:3"/>
  1997. <line text="method_takes_byte=3"/>
  1998. <line text="Byte:52"/>
  1999. <line text="byte:52"/>
  2000. <line text="method_takes_byte=52"/>
  2001. </stderr>
  2002. </run>
  2003. </ajc-test>
  2004. <ajc-test dir="java5/autoboxing" vm="1.5" title="boxing in after returning">
  2005. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectAfterReturning.aj"
  2006. options="-1.9,-showWeaveInfo">
  2007. <message kind="weave" text="Type 'AspectAfterReturning' (AspectAfterReturning.aj:18) advised by afterReturning advice from 'AspectAfterReturning' (AspectAfterReturning.aj:4)"/>
  2008. <message kind="weave" text="Type 'AspectAfterReturning' (AspectAfterReturning.aj:18) advised by afterReturning advice from 'AspectAfterReturning' (AspectAfterReturning.aj:8)"/>
  2009. <message kind="weave" text="Type 'AspectAfterReturning' (AspectAfterReturning.aj:18) advised by afterReturning advice from 'AspectAfterReturning' (AspectAfterReturning.aj:12)"/>
  2010. <message kind="weave" text="Type 'AspectAfterReturning' (AspectAfterReturning.aj:19) advised by afterReturning advice from 'AspectAfterReturning' (AspectAfterReturning.aj:4)"/>
  2011. <message kind="weave" text="Type 'AspectAfterReturning' (AspectAfterReturning.aj:19) advised by afterReturning advice from 'AspectAfterReturning' (AspectAfterReturning.aj:8)"/>
  2012. <message kind="weave" text="Type 'AspectAfterReturning' (AspectAfterReturning.aj:19) advised by afterReturning advice from 'AspectAfterReturning' (AspectAfterReturning.aj:12)"/>
  2013. </compile>
  2014. <run class="AspectAfterReturning">
  2015. <stderr>
  2016. <line text="Returning I=5"/>
  2017. <line text="Returning Integer=5"/>
  2018. <line text="Returning Object=5"/>
  2019. <line text="Returning I=10"/>
  2020. <line text="Returning Integer=10"/>
  2021. <line text="Returning Object=10"/>
  2022. </stderr>
  2023. </run>
  2024. </ajc-test>
  2025. <!-- ======================================================================================= -->
  2026. <!-- Covariance tests -->
  2027. <!-- ======================================================================================= -->
  2028. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 1">
  2029. <compile options="-1.9,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect01.aj">
  2030. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:26) advised by before advice from 'CovAspect01' (CovAspect01.aj:5)"/>
  2031. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect01' (CovAspect01.aj:5)"/>
  2032. </compile>
  2033. </ajc-test>
  2034. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 2">
  2035. <compile options="-1.9,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect02.aj">
  2036. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:26) advised by before advice from 'CovAspect02' (CovAspect02.aj:5)"/>
  2037. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect02' (CovAspect02.aj:5)"/>
  2038. </compile>
  2039. </ajc-test>
  2040. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 3">
  2041. <compile options="-1.9,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect03.aj">
  2042. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:26) advised by before advice from 'CovAspect03' (CovAspect03.aj:5)"/>
  2043. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect03' (CovAspect03.aj:5)"/>
  2044. </compile>
  2045. </ajc-test>
  2046. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 4">
  2047. <compile options="-1.9,-showWeaveInfo" files="CovBaseProgram02.java,CovAspect04.aj">
  2048. <message kind="weave" text="Type 'CovBaseProgram02' (CovBaseProgram02.java:30) advised by before advice from 'CovAspect04' (CovAspect04.aj:5)"/>
  2049. </compile>
  2050. </ajc-test>
  2051. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 5">
  2052. <compile options="-1.9,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect05.aj">
  2053. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:26) advised by before advice from 'CovAspect05' (CovAspect05.aj:5)"/>
  2054. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect05' (CovAspect05.aj:5)"/>
  2055. </compile>
  2056. </ajc-test>
  2057. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 6">
  2058. <compile options="-1.9,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect06.aj">
  2059. <message kind="warning" line="3" text="does not match because declaring type is Super"/>
  2060. </compile>
  2061. </ajc-test>
  2062. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 7">
  2063. <compile options="-1.9,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect07.aj">
  2064. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect07' (CovAspect07.aj:5)"/>
  2065. <message kind="warning" line="3" text="does not match because declaring type is Super"/>
  2066. </compile>
  2067. </ajc-test>
  2068. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 8">
  2069. <compile options="-1.9,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect08.aj">
  2070. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect08' (CovAspect08.aj:11)"/>
  2071. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect08' (CovAspect08.aj:5)"/>
  2072. </compile>
  2073. </ajc-test>
  2074. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 9">
  2075. <compile options="-1.9,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect09.aj"/>
  2076. </ajc-test>
  2077. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 10">
  2078. <compile options="-1.9,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect10.aj">
  2079. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:26) advised by before advice from 'CovAspect10' (CovAspect10.aj:5)"/>
  2080. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect10' (CovAspect10.aj:5)"/>
  2081. </compile>
  2082. </ajc-test>
  2083. <!-- ======================================================================================= -->
  2084. <!-- Enum tests -->
  2085. <!-- ======================================================================================= -->
  2086. <ajc-test dir="java5/enums" vm="1.5" title="cant itd constructor on enum">
  2087. <compile files="SimpleEnum.java,SimpleEnum2.java,EnumAspect01.aj" options="-1.9">
  2088. <message kind="error" line="2" text="can't make inter-type constructor declarations on enum types"/>
  2089. </compile>
  2090. </ajc-test>
  2091. <ajc-test dir="java5/enums" vm="1.5" title="cant itd field or method on enum">
  2092. <compile files="SimpleEnum.java,SimpleEnum2.java,EnumAspect02.aj" options="-1.9">
  2093. <message kind="error" line="2" text="can't make inter-type method declarations on enum types"/>
  2094. <message kind="error" line="6" text="can't make inter-type field declarations on enum types"/>
  2095. </compile>
  2096. </ajc-test>
  2097. <ajc-test dir="java5/enums" vm="1.5" title="declare parents and enums">
  2098. <compile files="SimpleEnum.java,SimpleEnum2.java,EnumAspect03.aj" options="-1.9">
  2099. <message kind="error" line="5" text="can't use declare parents to make enum type SimpleEnum implement an interface"/>
  2100. <message kind="error" line="8" text="can't use declare parents to alter supertype of enum type SimpleEnum"/>
  2101. <message kind="error" line="11" text="can't use declare parents to make 'java.lang.Enum' the parent of type EnumAspect03$D"/>
  2102. </compile>
  2103. </ajc-test>
  2104. <ajc-test dir="java5/enums" vm="1.5" title="wildcard enum match in itd">
  2105. <compile files="SimpleEnum.java,SimpleEnum2.java,EnumAspect04.aj" options="-1.9">
  2106. <message kind="warning" line="5" text="enum type SimpleEnum2 matches a declare parents type pattern but is being ignored"/>
  2107. <message kind="warning" line="5" text="enum type SimpleEnum matches a declare parents type pattern but is being ignored"/>
  2108. </compile>
  2109. </ajc-test>
  2110. <!-- ======================================================================================= -->
  2111. <!-- pertypewithin tests -->
  2112. <!-- ======================================================================================= -->
  2113. <ajc-test dir="java5/pertypewithin" title="basic ptw test">
  2114. <compile files="A.java,B.java,C.java,D.java,Main.java,X.java" options="-1.9 -Xlint:ignore"/>
  2115. <run class="p.A">
  2116. <stderr>
  2117. <line text="hi from A"/>
  2118. <line text="after() returning from a method call to sayhi()"/>
  2119. <line text="hi from A"/>
  2120. <line text="after() returning from a method call to sayhi()"/>
  2121. <line text="Tests in A have passed"/>
  2122. <line text="callcount = 2"/>
  2123. </stderr>
  2124. </run>
  2125. </ajc-test>
  2126. <ajc-test dir="java5/pertypewithin" title="ptw hasAspect">
  2127. <compile files="A.java,B.java,C.java,D.java,Main.java,X.java" options="-1.9 -Xlint:ignore"/>
  2128. <run class="p.B">
  2129. <stderr>
  2130. <line text="hi from B"/>
  2131. <line text="after() returning from a method call to sayhi()"/>
  2132. <line text="hi from B"/>
  2133. <line text="after() returning from a method call to sayhi()"/>
  2134. <line text="hi from B"/>
  2135. <line text="after() returning from a method call to sayhi()"/>
  2136. <line text="callcount = 3"/>
  2137. </stderr>
  2138. </run>
  2139. </ajc-test>
  2140. <ajc-test dir="java5/pertypewithin" title="ptw aspectOf">
  2141. <compile files="A.java,B.java,C.java,D.java,Main.java,X.java" options="-1.9 -Xlint:ignore"/>
  2142. <run class="p.C"/>
  2143. </ajc-test>
  2144. <ajc-test dir="java5/pertypewithin" title="ptw multi-aspects">
  2145. <compile files="P.java,Q.java,R.java" options="-1.9"/>
  2146. <run class="P">
  2147. <stderr>
  2148. <line text="Q reporting 2"/>
  2149. <line text="R reporting 3"/>
  2150. </stderr>
  2151. </run>
  2152. </ajc-test>
  2153. <ajc-test dir="java5/pertypewithin" title="ptw binary">
  2154. <weave classesFiles="G.java" aspectsFiles="H.java" options="-1.4"/>
  2155. <run class="G">
  2156. <stderr>
  2157. <line text="advice running"/>
  2158. </stderr>
  2159. </run>
  2160. </ajc-test>
  2161. <ajc-test dir="java5/pertypewithin" title="ptw binary aspect">
  2162. <compile files="H.java" outjar="aspects.jar" options="-1.4">
  2163. <message kind="warning" line="1" text="no match for this type name: G"/>
  2164. </compile>
  2165. <compile files="G.java" aspectpath="aspects.jar" options="-1.9"/>
  2166. <run class="G">
  2167. <stderr>
  2168. <line text="advice running"/>
  2169. </stderr>
  2170. </run>
  2171. </ajc-test>
  2172. <!-- ======================================================================================= -->
  2173. <!-- varargs tests -->
  2174. <!-- ======================================================================================= -->
  2175. <ajc-test dir="java5/varargs" vm="1.5" title="varargs not matched by Object[] (call)">
  2176. <compile files="SimpleVarargs.java,VarargsAspect01.aj" options="-1.9,-showWeaveInfo"/>
  2177. </ajc-test>
  2178. <ajc-test dir="java5/varargs" vm="1.5" title="varargs not matched by Object[] (exe)">
  2179. <compile files="SimpleVarargs.java,VarargsAspect02.aj" options="-1.9,-showWeaveInfo"/>
  2180. </ajc-test>
  2181. <ajc-test dir="java5/varargs" vm="1.5" title="varargs not matched by Object[] (init)">
  2182. <compile files="SimpleVarargs.java,VarargsAspect03.aj" options="-1.9,-showWeaveInfo"/>
  2183. </ajc-test>
  2184. <ajc-test dir="java5/varargs" vm="1.5" title="varargs not matched by Object[] (withincode)">
  2185. <compile files="SimpleVarargs.java,VarargsAspect04.aj" options="-1.9,-showWeaveInfo"/>
  2186. </ajc-test>
  2187. <ajc-test dir="java5/varargs" vm="1.5" title="call with varargs signature">
  2188. <compile files="SimpleVarargs.java,VarargsAspect05.aj" options="-1.9,-showWeaveInfo">
  2189. <message kind="weave" text="Type 'SimpleVarargs' (SimpleVarargs.java:20) advised by before advice from 'VarargsAspect05' (VarargsAspect05.aj:3)"/>
  2190. <message kind="weave" text="Type 'SimpleVarargs' (SimpleVarargs.java:21) advised by before advice from 'VarargsAspect05' (VarargsAspect05.aj:3)"/>
  2191. <message kind="weave" text="Type 'SimpleVarargs' (SimpleVarargs.java:22) advised by before advice from 'VarargsAspect05' (VarargsAspect05.aj:3)"/>
  2192. </compile>
  2193. </ajc-test>
  2194. <ajc-test dir="java5/varargs" vm="1.5" title="call with varargs multi-signature">
  2195. <compile files="SimpleVarargs.java,VarargsAspect06.aj" options="-1.9,-showWeaveInfo">
  2196. <message kind="weave" text="Type 'SimpleVarargs' (SimpleVarargs.java:25) advised by before advice from 'VarargsAspect06' (VarargsAspect06.aj:3)"/>
  2197. <message kind="weave" text="Type 'SimpleVarargs' (SimpleVarargs.java:26) advised by before advice from 'VarargsAspect06' (VarargsAspect06.aj:3)"/>
  2198. <message kind="weave" text="Type 'SimpleVarargs' (SimpleVarargs.java:27) advised by before advice from 'VarargsAspect06' (VarargsAspect06.aj:3)"/>
  2199. </compile>
  2200. </ajc-test>
  2201. <ajc-test dir="java5/suppressedWarnings" vm="1.5" title="suppressing non-matching advice warnings">
  2202. <compile files="Suppression1.aj" options="-1.9,-showWeaveInfo">
  2203. <message kind="warning" line="13"/>
  2204. <message kind="warning" line="21"/>
  2205. </compile>
  2206. </ajc-test>
  2207. <ajc-test dir="java5/suppressedWarnings" vm="1.5" title="suppressing non-matching advice warnings when multiple source files involved">
  2208. <compile files="A.java,A1.aj,A2.aj,A3.aj" options="-1.9,-showWeaveInfo">
  2209. <message kind="warning" line="4" file="A1.aj"/>
  2210. <message kind="warning" line="4" file="A2.aj"/>
  2211. <message kind="warning" line="11" file="A2.aj"/>
  2212. <message kind="warning" line="4" file="A3.aj"/>
  2213. <message kind="warning" line="11" file="A3.aj"/>
  2214. </compile>
  2215. </ajc-test>
  2216. <ajc-test dir="bugs150" title="XLint warning for advice not applied with cflow(execution)" pr="93345">
  2217. <compile options="-Xlint,-1.9" files="PR93345.aj" >
  2218. <message kind="warning" line="9" text="advice defined in AnAspect has not been applied [Xlint:adviceDidNotMatch]"/>
  2219. </compile>
  2220. </ajc-test>
  2221. <ajc-test dir="bugs150" title="NPE in reflect implementation" pr="94167">
  2222. <compile files="PR94167.java" options="-1.9"/>
  2223. <run class="reflect.PR94167"/>
  2224. </ajc-test>
  2225. <!-- ======================================================================================= -->
  2226. <!-- annotated aspect members -->
  2227. <!-- ======================================================================================= -->
  2228. <ajc-test dir="java5/annotations/aspectMembers" title="annotated annotations (@Target)">
  2229. <compile files="a/Annotations.java,a/Foo.java" options="-1.9">
  2230. <message kind="error" line="16" text="The annotation @MethodAnnotation is disallowed for this location"/>
  2231. </compile>
  2232. </ajc-test>
  2233. <ajc-test dir="java5/annotations/aspectMembers" title="simple annotated aspect members">
  2234. <compile files="a/Annotations.java,a/AnnotatedAspect.aj" options="-1.9">
  2235. <message kind="warning" line="4" text="annotated type"/>
  2236. <message kind="warning" line="6" text="annotated field"/>
  2237. <message kind="warning" line="8" text="annotated method"/>
  2238. <message kind="warning" line="11" text="annotated constructor"/>
  2239. </compile>
  2240. </ajc-test>
  2241. <ajc-test dir="java5/annotations/aspectMembers" title="simple annotated aspect members with bad target">
  2242. <compile files="a/Annotations.java,a/AnnotatedAspect02.aj" options="-1.9">
  2243. <message kind="error" line="3" text="The annotation @MethodAnnotation is disallowed for this location"/>
  2244. <message kind="error" line="6" text="The annotation @TypeAnnotation is disallowed for this location"/>
  2245. <message kind="error" line="8" text="The annotation @FieldAnnotation is disallowed for this location"/>
  2246. <message kind="error" line="10" text="The annotation @AnnotationAnnotation is disallowed for this location"/>
  2247. </compile>
  2248. </ajc-test>
  2249. <ajc-test dir="java5/annotations/aspectMembers" title="annotated itds">
  2250. <compile files="a/Annotations.java,a/AnnotatedAspect03.aj" options="-1.9">
  2251. <message kind="warning" line="4" text="annotated type"/>
  2252. <message kind="warning" line="6" text="annotated field"/>
  2253. <message kind="warning" line="8" text="annotated field"/>
  2254. <message kind="warning" line="10" text="annotated method"/>
  2255. <message kind="warning" line="12" text="annotated constructor"/>
  2256. <message kind="warning" line="12" text="annotated field"/>
  2257. </compile>
  2258. </ajc-test>
  2259. <ajc-test dir="java5/annotations/aspectMembers" title="annotated itds with bad target">
  2260. <compile files="a/Annotations.java,a/AnnotatedAspect04.aj" options="-1.9">
  2261. <message kind="error" line="6" text="The annotation @ConstructorAnnotation is disallowed for this location"/>
  2262. <message kind="error" line="8" text="The annotation @FieldAnnotation is disallowed for this location"/>
  2263. <message kind="error" line="10" text="The annotation @TypeAnnotation is disallowed for this location"/>
  2264. <!-- known limitation...
  2265. <message kind="error" line="12" text="The annotation @MethodAnnotation is disallowed for this location"/>
  2266. -->
  2267. </compile>
  2268. </ajc-test>
  2269. <ajc-test dir="java5/annotations/aspectMembers" title="annotated advice">
  2270. <compile files="a/Annotations.java,a/AnnotatedAspect05.aj" options="-1.9">
  2271. <message kind="warning" line="17"/>
  2272. </compile>
  2273. <run class="a.AnnotatedAspect05"/>
  2274. </ajc-test>
  2275. <ajc-test dir="java5/annotations/aspectMembers" title="annotated advice with bad target">
  2276. <compile files="a/Annotations.java,a/AnnotatedAspect06.aj" options="-1.9">
  2277. <message kind="error" line="6" text="The annotation @ConstructorAnnotation is disallowed for this location"/>
  2278. </compile>
  2279. </ajc-test>
  2280. <ajc-test dir="java5/annotations/aspectMembers" title="annotated pointcut">
  2281. <compile files="a/Annotations.java,a/AnnotatedAspect07.aj" options="-1.9"/>
  2282. </ajc-test>
  2283. <ajc-test dir="java5/annotations/aspectMembers" title="annotated declare statements">
  2284. <compile files="a/Annotations.java,a/AnnotatedAspect08.aj" options="-1.9"/>
  2285. </ajc-test>
  2286. <!-- ======================================================================================= -->
  2287. <!-- ajdk examples -->
  2288. <!-- ======================================================================================= -->
  2289. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: annotating aspects chapter">
  2290. <compile files="AnnotatingAspects.aj" options="-1.9"/>
  2291. </ajc-test>
  2292. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: annotating aspects chapter, ex 2">
  2293. <compile files="SuppressAj.aj" options="-1.9"/>
  2294. </ajc-test>
  2295. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: annotation pattern matching">
  2296. <compile files="AnnotationPatternMatching.aj,org/xyz/OrgXYZAnnotation.java" options="-1.9">
  2297. <message kind="warning" line="25" text="@Immutable"/>
  2298. <message kind="warning" line="25" text="!@Persistent"/>
  2299. <message kind="warning" line="29" text="!@Persistent"/>
  2300. <message kind="warning" line="31" text="!@Persistent"/>
  2301. <message kind="warning" line="33" text="!@Persistent"/>
  2302. <message kind="warning" line="29" text="@Foo @Goo"/>
  2303. <message kind="warning" line="29" text="@(Foo || Goo)"/>
  2304. <message kind="warning" line="31" text="@(Foo || Goo)"/>
  2305. <message kind="warning" line="33" text="@(org.xyz..*)"/>
  2306. </compile>
  2307. </ajc-test>
  2308. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: annotation type pattern matching">
  2309. <compile files="AnnotationsInTypePatterns.aj,org/xyz/OrgXYZAnnotation.java,org/xyz/Types.java,org/abc/Types.java,anns/Immutable.java,anns/NonPersistent.java" options="-1.9">
  2310. <message kind="warning" line="23" text="(@Immutable *)"/>
  2311. <message kind="warning" line="32" text="(@Immutable *)"/>
  2312. <message kind="warning" line="3" text="(@Immutable *)"/>
  2313. <message kind="warning" line="5" text="(@Immutable *)"/>
  2314. <message kind="warning" line="8" text="(@Immutable *)"/>
  2315. <message kind="warning" line="25" text="(!@Immutable *)"/>
  2316. <message kind="warning" line="27" text="(!@Immutable *)"/>
  2317. <message kind="warning" line="29" text="(!@Immutable *)"/>
  2318. <message kind="warning" line="5" text="(!@Immutable *)"/>
  2319. <message kind="warning" line="6" text="(!@Immutable *)"/>
  2320. <message kind="warning" line="2" text="(!@Immutable *)"/>
  2321. <message kind="warning" line="2" text="(!@Immutable *)"/>
  2322. <message kind="warning" line="5" text="(!@Immutable *)"/>
  2323. <message kind="warning" line="3" text="@Immutable (org.xyz.* || org.abc.*)"/>
  2324. <message kind="warning" line="5" text="@Immutable (org.xyz.* || org.abc.*)"/>
  2325. <message kind="warning" line="8" text="@Immutable (org.xyz.* || org.abc.*)"/>
  2326. <message kind="warning" line="32" text="((@Immutable Foo+) || Goo)"/>
  2327. <message kind="warning" line="27" text="((@Immutable Foo+) || Goo)"/>
  2328. <message kind="warning" line="3" text="@(Immutable || NonPersistent) org.xyz..*"/>
  2329. <message kind="warning" line="6" text="@(Immutable || NonPersistent) org.xyz..*"/>
  2330. <message kind="warning" line="8" text="@(Immutable || NonPersistent) org.xyz..*"/>
  2331. <message kind="warning" line="8" text="@Immutable @NonPersistent org.xyz..*"/>
  2332. <message kind="warning" line="6" text="@(@Inherited *) org.xyz..*"/>
  2333. <message kind="warning" line="8" text="@(@Inherited *) org.xyz..*"/>
  2334. </compile>
  2335. </ajc-test>
  2336. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: annotations in sig patterns">
  2337. <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.9">
  2338. <message kind="warning" line="32" text="@SensitiveData * *"/>
  2339. <message kind="warning" line="7" text="@SensitiveData * *"/>
  2340. <message kind="warning" line="13" text="@SensitiveData * *"/>
  2341. <message kind="warning" line="7" text="@SensitiveData List org.xyz..*.*"/>
  2342. <message kind="warning" line="11" text="(@SensitiveData *) org.xyz..*.*"/>
  2343. <message kind="warning" line="13" text="(@SensitiveData *) org.xyz..*.*"/>
  2344. <message kind="warning" line="50" text="@Foo (@Goo *) (@Hoo *).*"/>
  2345. <message kind="warning" line="38" text="@Persisted @Classified * *"/>
  2346. <message kind="warning" line="44" text="@Oneway * *(..)"/>
  2347. <message kind="warning" line="18" text="@Transaction * (@Persisted org.xyz..*).*(..)"/>
  2348. <message kind="warning" line="52" text="* *.*(@Immutable *,..)"/>
  2349. <message kind="warning" line="53" text="* *.*(@Immutable *,..)"/>
  2350. <message kind="warning" line="54" text="* *.*(@Immutable *,..)"/>
  2351. <message kind="warning" line="62" text="within(@Secure *)"/>
  2352. <message kind="warning" line="63" text="within(@Secure *)"/>
  2353. <message kind="warning" line="66" text="staticinitialization(@Persisted *)"/>
  2354. <message kind="warning" line="17" text="staticinitialization(@Persisted *)"/>
  2355. <message kind="warning" line="56" text="call(@Oneway * *(..))"/>
  2356. <message kind="warning" line="28" text="execution(public (@Immutable *) org.xyz..*.*(..))"/>
  2357. <message kind="warning" line="26" text="set(@Cachable * *)"/>
  2358. <message kind="warning" line="80" text="handler(!@Catastrophic *)"/>
  2359. </compile>
  2360. </ajc-test>
  2361. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: runtime annotations">
  2362. <compile files="RuntimeTypeMatching.aj" options="-1.9">
  2363. <message kind="warning" line="121" text="@within(Foo)"/>
  2364. <message kind="warning" line="122" text="@within(Foo)"/>
  2365. </compile>
  2366. <run class="RuntimeTypeMatching">
  2367. <stdout>
  2368. <line text="This information is TOP-SECRET"/>
  2369. <line text="@target(Classified) at call(void A.a())"/>
  2370. <line text="@this(Foo) at execution(void B.b())"/>
  2371. <line text="Classified data being passed at call(void B.callA(A))"/>
  2372. <line text="Classified data being passed at execution(void B.callA(A))"/>
  2373. <line text="This information is TOP-SECRET"/>
  2374. <line text="@target(Classified) at call(Class java.lang.Object.getClass())"/>
  2375. <line text="1 @Foo()"/>
  2376. <line text="1 @Foo()"/>
  2377. <line text="1 @Classified(classification=TOP-SECRET)" vm="-1.8"/>
  2378. <line text="1 @Classified(classification=&quot;TOP-SECRET&quot;)" vm="9-"/>
  2379. <line text="This information is TOP-SECRET"/>
  2380. <line text="Entering critical join point with priority 3"/>
  2381. <line text="Entering critical join point with reflectively obtained priority 3"/>
  2382. <line text="@target(Classified) at call(void A.a())"/>
  2383. <line text="@this(Foo) at execution(void B.callA(A))"/>
  2384. <line text="(Class) Transaction required at execution(void ByeByeEJB.method1())"/>
  2385. <line text="(Method) Transaction required at execution(void ByeByeEJB.method1())"/>
  2386. <line text="(Class) Transaction required at execution(void ByeByeEJB.method2())"/>
  2387. <line text="(Method) Transaction required at execution(void ByeByeEJB.method2())"/>
  2388. <line text="(Class) Transaction required at execution(void ByeByeEJB.method3())"/>
  2389. </stdout>
  2390. </run>
  2391. </ajc-test>
  2392. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: @retention checking">
  2393. <compile files="RetentionTime.aj" options="-1.9">
  2394. <message kind="error" line="8" text="Annotation type Goo does not have runtime retention"/>
  2395. <message kind="error" line="13" text="Annotation type Goo does not have runtime retention"/>
  2396. <message kind="error" line="18" text="Annotation type Goo does not have runtime retention"/>
  2397. </compile>
  2398. </ajc-test>
  2399. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: @inherited">
  2400. <compile files="AnnotationInheritance.aj" options="-1.9">
  2401. <message kind="warning" line="16" text="annotatedMethodCall()"/>
  2402. <!-- <message kind="warning" line="17" text="annotatedMethodCall()"/> -->
  2403. </compile>
  2404. </ajc-test>
  2405. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: deow-ann">
  2406. <compile files="DeclaresWithAnnotations.aj,org/xyz/model/Model.java" options="-1.9">
  2407. <message kind="warning" line="27" text="Expensive operation called from within performance critical section"/>
  2408. <message kind="error" line="26" text="Untrusted code should not call the model classes directly"/>
  2409. </compile>
  2410. </ajc-test>
  2411. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: decp-ann">
  2412. <compile files="DecpAnnotations.aj" options="-1.9"/>
  2413. <run class="DecpAnnotations">
  2414. <stdout>
  2415. <line text="Test Foo is not secured: PASS"/>
  2416. <line text="Test Goo is secured: PASS"/>
  2417. <line text="goo credentials: none"/>
  2418. <line text="Test BankAccount is not secured: PASS"/>
  2419. <line text="Test PrivateBankAccount is not secured: PASS"/>
  2420. <line text="Test BusinessBankAccount is secured: PASS"/>
  2421. </stdout>
  2422. </run>
  2423. </ajc-test>
  2424. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: dec precedence">
  2425. <compile files="PrecedenceAnnotations.aj" options="-1.9"/>
  2426. <run class="PrecedenceAnnotations">
  2427. <stdout>
  2428. <line text="@Security S2"/>
  2429. <line text="S1"/>
  2430. <line text="@Performance P2"/>
  2431. <line text="P1"/>
  2432. </stdout>
  2433. </run>
  2434. </ajc-test>
  2435. <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: dec annotation">
  2436. <compile files="DeclareAnnotation.aj,org/xyz/model/Model.java" options="-1.9">
  2437. <message kind="warning" line="3" text="@BusinessDomain"/>
  2438. <message kind="warning" line="43" text="@Secured"/>
  2439. <message kind="warning" line="44" text="@Secured"/>
  2440. <message kind="warning" line="55" text="@Secured"/>
  2441. <message kind="warning" line="62" text="@Persisted"/>
  2442. <message kind="warning" line="68" text="@Persisted"/>
  2443. <message kind="warning" line="41" text="@Secured"/>
  2444. <message kind="warning" line="51" text="@Secured"/>
  2445. </compile>
  2446. <run class="DeclareAnnotation"/>
  2447. </ajc-test>
  2448. <ajc-test dir="java5/covariance/ajdk" title="ajdk: covariance">
  2449. <compile files="AJDKExamples.aj" options="-1.9">
  2450. <message kind="warning" line="43" text="call(* whoAreYou())"/>
  2451. <message kind="warning" line="44" text="call(* whoAreYou())"/>
  2452. <message kind="warning" line="43" text="call(* A.whoAreYou())"/>
  2453. <message kind="warning" line="44" text="call(* A.whoAreYou())"/>
  2454. <message kind="warning" line="43" text="call(A whoAreYou())"/>
  2455. <message kind="warning" line="44" text="call(A whoAreYou())"/>
  2456. <message kind="warning" line="44" text="call(A+ B.whoAreYou())"/>
  2457. <message kind="warning" line="44" text="call(B whoAreYou())"/>
  2458. <message kind="warning" line="44" text="call(B B.whoAreYou())"/>
  2459. </compile>
  2460. </ajc-test>
  2461. <ajc-test dir="java5/varargs/ajdk" title="ajdk: varargs">
  2462. <compile files="AJDKExamples.aj,org/xyz/Foo.java,org/xyz/Goo.java,org/xyz/Hoo.java" options="-1.9">
  2463. <message kind="warning" line="8" text="call vararg match"/>
  2464. <message kind="warning" line="14" text="execution vararg match"/>
  2465. <message kind="warning" line="5" text="init vararg match"/>
  2466. <message kind="warning" line="6" text="init vararg match"/>
  2467. <message kind="warning" line="27" text="single vararg"/>
  2468. <message kind="warning" line="28" text="single String[]"/>
  2469. <message kind="warning" line="18" text="single String[]"/>
  2470. </compile>
  2471. <run class="AJDKExamples">
  2472. <stdout>
  2473. <line text="Matched at call(void X.foo(int, String[]))"/>
  2474. </stdout>
  2475. </run>
  2476. </ajc-test>
  2477. <ajc-test dir="java5/pertypewithin/ajdk" title="ajdk: ptw">
  2478. <compile files="AJDKExamples.aj" options="-1.9 -showWeaveInfo">
  2479. <message kind="weave" text="Join point 'constructor-execution(void org.xyz.foo.B.&lt;init&gt;())' in Type 'org.xyz.foo.B' (AJDKExamples.aj:38) advised by afterReturning advice from 'org.xyz.foo.AJDKExamples' (AJDKExamples.aj:11)"/>
  2480. <message kind="weave" text="Join point 'constructor-execution(void org.xyz.foo.A.&lt;init&gt;())' in Type 'org.xyz.foo.A' (AJDKExamples.aj:36) advised by afterReturning advice from 'org.xyz.foo.AJDKExamples' (AJDKExamples.aj:11)"/>
  2481. </compile>
  2482. <run class="org.xyz.foo.AJDKExamples">
  2483. <stdout>
  2484. <line text="Aspect instance constructed"/>
  2485. <line text="Aspect instance constructed"/>
  2486. <line text="true"/>
  2487. <line text="true"/>
  2488. <line text="There are 2 As"/>
  2489. <line text="There are 3 Bs"/>
  2490. </stdout>
  2491. </run>
  2492. </ajc-test>
  2493. <!-- ======================================================================================= -->
  2494. <!-- declare annotation -->
  2495. <!-- ======================================================================================= -->
  2496. <ajc-test dir="java5/annotations/declare" title="basic declare annotation parse test">
  2497. <compile files="BasicParseTest.aj" options="-1.9"/>
  2498. </ajc-test>
  2499. <!-- ======================================================================================= -->
  2500. <!-- declare annotation (@type) -->
  2501. <!-- ======================================================================================= -->
  2502. <ajc-test dir="java5/annotations/declare" title="declare @type 1">
  2503. <compile files="DecaType1.java" options="-1.9"/>
  2504. <run class="DecaType1">
  2505. <stderr>
  2506. <line text="annotation is @MyAnnotation()"/>
  2507. </stderr>
  2508. </run>
  2509. </ajc-test>
  2510. <ajc-test dir="java5/annotations/declare" title="declare @type 2">
  2511. <compile files="DecaType2.java" options="-1.9,-Xlint:ignore" />
  2512. <run class="DecaType2">
  2513. <stderr>
  2514. <line text="annotation on DecaType2 is @MyAnnotation()"/>
  2515. <line text="annotation on X is @MyAnnotation()"/>
  2516. <line text="annotation on MyAnnotation is @MyAnnotation()"/>
  2517. </stderr>
  2518. </run>
  2519. </ajc-test>
  2520. <ajc-test dir="java5/annotations/declare" title="declare @type - with matching pointcut">
  2521. <compile files="DecaType3.java" options="-1.9"/>
  2522. <run class="DecaType3">
  2523. <stderr>
  2524. <line text="hello world"/>
  2525. <line text="advice running"/>
  2526. </stderr>
  2527. </run>
  2528. </ajc-test>
  2529. <ajc-test dir="java5/annotations/declare" title="declare @type - binary weaving">
  2530. <weave classesFiles="BaseTypes.java"
  2531. aspectsFiles="DecaTypeBin1.aj,Colored.java"
  2532. options="-1.9" xlintfile="ignoreTypeNotExposed.properties">
  2533. </weave>
  2534. <run class="BaseTypes">
  2535. <stderr>
  2536. <line text="Color identified on class X"/>
  2537. <line text="A.m() running"/>
  2538. <line text="A.m() running"/>
  2539. <line text="A.m() running"/>
  2540. </stderr>
  2541. </run>
  2542. </ajc-test>
  2543. <ajc-test dir="java5/annotations/declare" title="declare @type - complex annotation - binary weaving">
  2544. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaTypeBin2.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  2545. <run class="BaseTypes">
  2546. <stderr>
  2547. <line text="ComplexAnnotation identified on execution(void A.m())"/>
  2548. <line text="A.m() running"/>
  2549. <line text="A.m() running"/>
  2550. <line text="A.m() running"/>
  2551. </stderr>
  2552. </run>
  2553. </ajc-test>
  2554. <ajc-test dir="java5/annotations/declare" title="declare @type - complex annotation - source weaving">
  2555. <compile files="BaseTypes.java,DecaTypeBin2.aj" options="-1.9"/>
  2556. <run class="BaseTypes">
  2557. <stderr>
  2558. <line text="ComplexAnnotation identified on execution(void A.m())"/>
  2559. <line text="A.m() running"/>
  2560. <line text="A.m() running"/>
  2561. <line text="A.m() running"/>
  2562. </stderr>
  2563. </run>
  2564. </ajc-test>
  2565. <ajc-test dir="java5/annotations/declare" title="declare @type - two annotations hit one type - source weaving">
  2566. <compile files="BaseTypes.java,DecaTypeBin3.aj" options="-1.9"/>
  2567. <run class="BaseTypes">
  2568. <stderr>
  2569. <line text="Color identified on execution(void A.m())"/>
  2570. <line text="Fruit identified on execution(void A.m())"/>
  2571. <line text="A.m() running"/>
  2572. <line text="A.m() running"/>
  2573. <line text="A.m() running"/>
  2574. </stderr>
  2575. </run>
  2576. </ajc-test>
  2577. <ajc-test dir="java5/annotations/declare" title="declare @type - two annotations hit one type - binary weaving">
  2578. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaTypeBin3.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  2579. <run class="BaseTypes">
  2580. <stderr>
  2581. <line text="Color identified on execution(void A.m())"/>
  2582. <line text="Fruit identified on execution(void A.m())"/>
  2583. <line text="A.m() running"/>
  2584. <line text="A.m() running"/>
  2585. <line text="A.m() running"/>
  2586. </stderr>
  2587. </run>
  2588. </ajc-test>
  2589. <ajc-test dir="java5/annotations/declare" title="declare @type - declare parents interactions (order 1) - binary weaving">
  2590. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaDecpInteractions1.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  2591. <run class="BaseTypes">
  2592. <stderr>
  2593. <line text="Marker interface identified on execution(void A.m())"/>
  2594. <line text="Color annotation identified on execution(void A.m())"/>
  2595. <line text="A.m() running"/>
  2596. <line text="Marker interface identified on execution(void A.m())"/>
  2597. <line text="A.m() running"/>
  2598. <line text="Marker interface identified on execution(void A.m())"/>
  2599. <line text="A.m() running"/>
  2600. </stderr>
  2601. </run>
  2602. </ajc-test>
  2603. <ajc-test dir="java5/annotations/declare" title="declare @type - declare parents interactions (order 1) - source weaving">
  2604. <compile files="BaseTypes.java,DecaDecpInteractions1.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  2605. <run class="BaseTypes">
  2606. <stderr>
  2607. <line text="Marker interface identified on execution(void A.m())"/>
  2608. <line text="Color annotation identified on execution(void A.m())"/>
  2609. <line text="A.m() running"/>
  2610. <line text="Marker interface identified on execution(void A.m())"/>
  2611. <line text="A.m() running"/>
  2612. <line text="Marker interface identified on execution(void A.m())"/>
  2613. <line text="A.m() running"/>
  2614. </stderr>
  2615. </run>
  2616. </ajc-test>
  2617. <ajc-test dir="java5/annotations/declare" title="declare @type - declare parents interactions (order 2) - binary weaving">
  2618. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaDecpInteractions2.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  2619. <run class="BaseTypes">
  2620. <stderr>
  2621. <line text="Marker interface identified on execution(void A.m())"/>
  2622. <line text="Color annotation identified on execution(void A.m())"/>
  2623. <line text="A.m() running"/>
  2624. <line text="Marker interface identified on execution(void A.m())"/>
  2625. <line text="A.m() running"/>
  2626. <line text="Marker interface identified on execution(void A.m())"/>
  2627. <line text="A.m() running"/>
  2628. </stderr>
  2629. </run>
  2630. </ajc-test>
  2631. <ajc-test dir="java5/annotations/declare" title="declare @type - declare parents interactions (order 2) - source weaving">
  2632. <compile files="BaseTypes.java,DecaDecpInteractions2.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  2633. <run class="BaseTypes">
  2634. <stderr>
  2635. <line text="Marker interface identified on execution(void A.m())"/>
  2636. <line text="Color annotation identified on execution(void A.m())"/>
  2637. <line text="A.m() running"/>
  2638. <line text="Marker interface identified on execution(void A.m())"/>
  2639. <line text="A.m() running"/>
  2640. <line text="Marker interface identified on execution(void A.m())"/>
  2641. <line text="A.m() running"/>
  2642. </stderr>
  2643. </run>
  2644. </ajc-test>
  2645. <ajc-test dir="java5/annotations/declare" title="declare @type - declare parents interactions (order 3) - binary weaving">
  2646. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaDecpInteractions3.aj" options="-1.9,-Xlint:ignore"/>
  2647. <run class="BaseTypes">
  2648. <stderr>
  2649. <line text="Marker interface identified on execution(void A.m())"/>
  2650. <line text="Color annotation identified on execution(void A.m())"/>
  2651. <line text="A.m() running"/>
  2652. <line text="Marker interface identified on execution(void A.m())"/>
  2653. <line text="Color annotation identified on execution(void A.m())"/>
  2654. <line text="A.m() running"/>
  2655. <line text="Marker interface identified on execution(void A.m())"/>
  2656. <line text="Color annotation identified on execution(void A.m())"/>
  2657. <line text="A.m() running"/>
  2658. </stderr>
  2659. </run>
  2660. </ajc-test>
  2661. <ajc-test dir="java5/annotations/declare" title="declare @type - declare parents interactions (order 3) - source weaving">
  2662. <compile files="BaseTypes.java,DecaDecpInteractions3.aj" options="-1.9,-Xlint:ignore"/>
  2663. <run class="BaseTypes">
  2664. <stderr>
  2665. <line text="Marker interface identified on execution(void A.m())"/>
  2666. <line text="Color annotation identified on execution(void A.m())"/>
  2667. <line text="A.m() running"/>
  2668. <line text="Marker interface identified on execution(void A.m())"/>
  2669. <line text="Color annotation identified on execution(void A.m())"/>
  2670. <line text="A.m() running"/>
  2671. <line text="Marker interface identified on execution(void A.m())"/>
  2672. <line text="Color annotation identified on execution(void A.m())"/>
  2673. <line text="A.m() running"/>
  2674. </stderr>
  2675. </run>
  2676. </ajc-test>
  2677. <ajc-test dir="java5/annotations/declare" title="declare @type - declare parents interactions (order 4) - binary weaving">
  2678. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaDecpInteractions4.aj" options="-1.9,-Xlint:ignore"/>
  2679. <run class="BaseTypes">
  2680. <stderr>
  2681. <line text="Marker interface identified on execution(void A.m())"/>
  2682. <line text="Color annotation identified on execution(void A.m())"/>
  2683. <line text="A.m() running"/>
  2684. <line text="Marker interface identified on execution(void A.m())"/>
  2685. <line text="Color annotation identified on execution(void A.m())"/>
  2686. <line text="A.m() running"/>
  2687. <line text="Marker interface identified on execution(void A.m())"/>
  2688. <line text="Color annotation identified on execution(void A.m())"/>
  2689. <line text="A.m() running"/>
  2690. </stderr>
  2691. </run>
  2692. </ajc-test>
  2693. <ajc-test dir="java5/annotations/declare" title="declare @type - declare parents interactions (order 4) - source weaving">
  2694. <compile files="BaseTypes.java,DecaDecpInteractions4.aj" options="-1.9,-Xlint:ignore"/>
  2695. <run class="BaseTypes">
  2696. <stderr>
  2697. <line text="Marker interface identified on execution(void A.m())"/>
  2698. <line text="Color annotation identified on execution(void A.m())"/>
  2699. <line text="A.m() running"/>
  2700. <line text="Marker interface identified on execution(void A.m())"/>
  2701. <line text="Color annotation identified on execution(void A.m())"/>
  2702. <line text="A.m() running"/>
  2703. <line text="Marker interface identified on execution(void A.m())"/>
  2704. <line text="Color annotation identified on execution(void A.m())"/>
  2705. <line text="A.m() running"/>
  2706. </stderr>
  2707. </run>
  2708. </ajc-test>
  2709. <ajc-test dir="java5/annotations/declare" title="declare @type - annotating an already annotated type - binary weaving">
  2710. <weave classesFiles="AnnotatedType.java" aspectsFiles="DecaTypeBin4.aj" options="-1.9,-Xlint:ignore"/>
  2711. <run class="AnnotatedType">
  2712. <stderr>
  2713. <line text="Color identified on execution(void AnnotatedType.m())"/>
  2714. <line text="Fruit identified on execution(void AnnotatedType.m())"/>
  2715. <line text="m() running"/>
  2716. </stderr>
  2717. </run>
  2718. </ajc-test>
  2719. <ajc-test dir="java5/annotations/declare" title="declare @type - annotating an already annotated type - source weaving">
  2720. <compile files="AnnotatedType.java,DecaTypeBin4.aj" options="-1.9,-Xlint:ignore"/>
  2721. <run class="AnnotatedType">
  2722. <stderr>
  2723. <line text="Color identified on execution(void AnnotatedType.m())"/>
  2724. <line text="Fruit identified on execution(void AnnotatedType.m())"/>
  2725. <line text="m() running"/>
  2726. </stderr>
  2727. </run>
  2728. </ajc-test>
  2729. <!--ajc-test dir="java5/annotations/declare" title="declare @type - annotations with different targets - binary weaving">
  2730. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaTypeBin5.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties">
  2731. <message kind="error" line="15" text="The annotation @ColorM is disallowed for this location"/>
  2732. <message kind="error" line="16" text="The annotation @ColorC is disallowed for this location"/>
  2733. <message kind="error" line="18" text="The annotation @ColorF is disallowed for this location"/>
  2734. <message kind="error" line="19" text="The annotation @ColorP is disallowed for this location"/>
  2735. <message kind="error" line="20" text="The annotation @ColorL is disallowed for this location"/>
  2736. <message kind="error" line="21" text="The annotation @ColorPkg is disallowed for this location"/>
  2737. </weave>
  2738. <run class="BaseTypes">
  2739. <stderr>
  2740. <line text="ColorT identified on execution(void A.m())"/>
  2741. <line text="A.m() running"/>
  2742. <line text="A.m() running"/>
  2743. <line text="A.m() running"/>
  2744. </stderr>
  2745. </run>
  2746. </ajc-test-->
  2747. <ajc-test dir="java5/annotations/declare" title="declare @type - annotations with different targets - source weaving">
  2748. <compile files="BaseTypes.java,DecaTypeBin5.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties">
  2749. <message kind="error" line="15" text="The annotation @ColorM is disallowed for this location"/>
  2750. <message kind="error" line="16" text="The annotation @ColorC is disallowed for this location"/>
  2751. <message kind="error" line="17" text="A is not a valid target for annotation ColorA"/>
  2752. <message kind="error" line="18" text="The annotation @ColorF is disallowed for this location"/>
  2753. <message kind="error" line="19" text="The annotation @ColorP is disallowed for this location"/>
  2754. <message kind="error" line="20" text="The annotation @ColorL is disallowed for this location"/>
  2755. <message kind="error" line="21" text="The annotation @ColorPkg is disallowed for this location"/>
  2756. </compile>
  2757. </ajc-test>
  2758. <!--ajc-test dir="java5/annotations/declare" title="declare @type - annotations with different targets (using type patterns) - binary weaving">
  2759. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaTypeBin6.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties">
  2760. <message kind="warning" line="15" text="A is not a valid target for annotation ColorM"/>
  2761. <message kind="warning" line="16" text="A is not a valid target for annotation ColorC"/>
  2762. <message kind="warning" line="17" text="A is not a valid target for annotation ColorL"/>
  2763. <message kind="warning" line="17" text="B is not a valid target for annotation ColorL"/>
  2764. <message kind="warning" line="17" text="C is not a valid target for annotation ColorL"/>
  2765. </weave>
  2766. <run class="BaseTypes">
  2767. <stderr>
  2768. <line text="ColorT identified on execution(void A.m())"/>
  2769. <line text="A.m() running"/>
  2770. <line text="ColorT identified on execution(void A.m())"/>
  2771. <line text="A.m() running"/>
  2772. <line text="ColorT identified on execution(void A.m())"/>
  2773. <line text="A.m() running"/>
  2774. </stderr>
  2775. </run>
  2776. </ajc-test-->
  2777. <ajc-test dir="java5/annotations/declare" title="declare @type - annotations with different targets (using type patterns) - source weaving">
  2778. <compile files="BaseTypes.java,DecaTypeBin6.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties">
  2779. <message kind="error" line="15" text="The annotation @ColorM is disallowed for this location"/>
  2780. <message kind="error" line="16" text="The annotation @ColorC is disallowed for this location"/>
  2781. <message kind="error" line="17" text="The annotation @ColorL is disallowed for this location"/>
  2782. <message kind="error" line="18" text="The annotation @ColorF is disallowed for this location"/>
  2783. </compile>
  2784. </ajc-test>
  2785. <ajc-test dir="java5/annotations/declare" title="declare @type - complex decp decAtType interactions - binary weaving">
  2786. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaTypeBin7.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties">
  2787. </weave>
  2788. <run class="BaseTypes">
  2789. <stderr>
  2790. <line text="Color identified on execution(void A.m())"/>
  2791. <line text="Fruit identified on execution(void A.m())"/>
  2792. <line text="Chocolate identified on execution(void A.m())"/>
  2793. <line text="M1 at execution(void A.m())"/>
  2794. <line text="M2 at execution(void A.m())"/>
  2795. <line text="M3 at execution(void A.m())"/>
  2796. <line text="A.m() running"/>
  2797. <line text="Fruit identified on execution(void B.m())"/>
  2798. <line text="Chocolate identified on execution(void B.m())"/>
  2799. <line text="M1 at execution(void B.m())"/>
  2800. <line text="M2 at execution(void B.m())"/>
  2801. <line text="M3 at execution(void B.m())"/>
  2802. <line text="B.m() running"/>
  2803. <line text="Fruit identified on execution(void C.m())"/>
  2804. <line text="Chocolate identified on execution(void C.m())"/>
  2805. <line text="M1 at execution(void C.m())"/>
  2806. <line text="M2 at execution(void C.m())"/>
  2807. <line text="M3 at execution(void C.m())"/>
  2808. <line text="C.m() running"/>
  2809. </stderr>
  2810. </run>
  2811. </ajc-test>
  2812. <ajc-test dir="java5/annotations/declare" title="declare @type - complex decp decAtType interactions - source weaving">
  2813. <compile files="BaseTypes.java,DecaTypeBin7.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  2814. <run class="BaseTypes">
  2815. <stderr>
  2816. <line text="Color identified on execution(void A.m())"/>
  2817. <line text="Fruit identified on execution(void A.m())"/>
  2818. <line text="Chocolate identified on execution(void A.m())"/>
  2819. <line text="M1 at execution(void A.m())"/>
  2820. <line text="M2 at execution(void A.m())"/>
  2821. <line text="M3 at execution(void A.m())"/>
  2822. <line text="A.m() running"/>
  2823. <line text="Fruit identified on execution(void B.m())"/>
  2824. <line text="Chocolate identified on execution(void B.m())"/>
  2825. <line text="M1 at execution(void B.m())"/>
  2826. <line text="M2 at execution(void B.m())"/>
  2827. <line text="M3 at execution(void B.m())"/>
  2828. <line text="B.m() running"/>
  2829. <line text="Fruit identified on execution(void C.m())"/>
  2830. <line text="Chocolate identified on execution(void C.m())"/>
  2831. <line text="M1 at execution(void C.m())"/>
  2832. <line text="M2 at execution(void C.m())"/>
  2833. <line text="M3 at execution(void C.m())"/>
  2834. <line text="C.m() running"/>
  2835. </stderr>
  2836. </run>
  2837. </ajc-test>
  2838. <ajc-test dir="java5/annotations/declare" title="declare @type - trying to put annotation targetting annos on normal types - source weaving">
  2839. <compile files="BaseTypes.java,DecaTypeBin8.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties">
  2840. <message kind="error" line="8" text="A is not a valid target for annotation ColorA"/>
  2841. </compile>
  2842. </ajc-test>
  2843. <ajc-test dir="java5/annotations/declare" title="declare @type - trying to put annotation targetting annos on normal types - binary weaving">
  2844. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaTypeBin8.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties">
  2845. <message kind="error" line="8" text="A is not a valid target for annotation ColorA"/>
  2846. </weave>
  2847. </ajc-test>
  2848. <ajc-test dir="java5/annotations/declare" title="declare @type - trying to put annotation targetting annos on normal types (uses pattern) - source weaving">
  2849. <compile files="BaseTypes.java,DecaTypeBin9.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties">
  2850. <message kind="warning" line="8" text="A is not a valid target for annotation ColorA"/>
  2851. </compile>
  2852. </ajc-test>
  2853. <ajc-test dir="java5/annotations/declare" title="declare @type - trying to put annotation targetting annos on normal types (uses pattern) - binary weaving">
  2854. <weave classesFiles="BaseTypes.java" aspectsFiles="DecaTypeBin9.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties">
  2855. <message kind="warning" line="8" text="A is not a valid target for annotation ColorA"/>
  2856. </weave>
  2857. </ajc-test>
  2858. <ajc-test dir="java5/annotations/declare" title="declare @type - covering enum and class element values - source weaving">
  2859. <compile files="EnumAndClassValues.aj,FunkyAnnotations.java" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  2860. <run class="FunkyAnnotations">
  2861. <stderr>
  2862. <line text="hello world"/>
  2863. </stderr>
  2864. </run>
  2865. </ajc-test>
  2866. <ajc-test dir="java5/annotations/declare" title="declare @type - covering enum and class element values - binary weaving">
  2867. <weave aspectsFiles="EnumAndClassValues.aj" classesFiles="FunkyAnnotations.java" options="-1.9 -Xdev:Pinpoint" xlintfile="ignoreTypeNotExposed.properties"/>
  2868. <run class="FunkyAnnotations">
  2869. <stderr>
  2870. <line text="advice running: Red"/>
  2871. <line text="advice running: class java.lang.Integer"/>
  2872. <line text="method running"/>
  2873. </stderr>
  2874. </run>
  2875. </ajc-test>
  2876. <!-- ======================================================================================= -->
  2877. <!-- declare annotation (@field) -->
  2878. <!-- ======================================================================================= -->
  2879. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - simple source weaving">
  2880. <compile files="Base.java,Colored.java,AtField1.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  2881. <run class="Base">
  2882. <stderr>
  2883. <line text="Colored field access at set(int Base.publicIntField)"/>
  2884. </stderr>
  2885. </run>
  2886. </ajc-test>
  2887. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - simple binary weaving">
  2888. <weave classesFiles="Base.java,Colored.java" aspectsFiles="AtField1.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  2889. <run class="Base">
  2890. <stderr>
  2891. <line text="Colored field access at set(int Base.publicIntField)"/>
  2892. </stderr>
  2893. </run>
  2894. </ajc-test>
  2895. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - two the same on one - source weaving">
  2896. <compile files="Base.java,Colored.java,TwoOnOneField.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties">
  2897. <message kind="warning" text="int Base.publicIntField - already has an annotation of type Colored"/>
  2898. </compile>
  2899. <run class="Base">
  2900. <stderr>
  2901. <line text="Colored field access at set(int Base.publicIntField)"/>
  2902. </stderr>
  2903. </run>
  2904. </ajc-test>
  2905. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - two the same on one - binary weaving">
  2906. <weave classesFiles="Base.java,Colored.java" aspectsFiles="TwoOnOneField.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties">
  2907. <message kind="warning" text="int Base.publicIntField - already has an annotation of type Colored"/>
  2908. </weave>
  2909. <run class="Base">
  2910. <stderr>
  2911. <line text="Colored field access at set(int Base.publicIntField)"/>
  2912. </stderr>
  2913. </run>
  2914. </ajc-test>
  2915. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - two different on one - source weaving">
  2916. <compile files="Base.java,Colored.java,Fruit.java,TwoOnOneField2.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  2917. <run class="Base">
  2918. <stderr>
  2919. <line text="Colored field access at set(int Base.publicIntField)"/>
  2920. <line text="Fruit field access at set(int Base.publicIntField)"/>
  2921. </stderr>
  2922. </run>
  2923. </ajc-test>
  2924. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - two different on one - binary weaving">
  2925. <weave classesFiles="Base.java,Colored.java,Fruit.java" aspectsFiles="TwoOnOneField2.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties">
  2926. </weave>
  2927. <run class="Base">
  2928. <stderr>
  2929. <line text="Colored field access at set(int Base.publicIntField)"/>
  2930. <line text="Fruit field access at set(int Base.publicIntField)"/>
  2931. </stderr>
  2932. </run>
  2933. </ajc-test>
  2934. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - wrong target - source weaving">
  2935. <compile files="Base.java,Colored.java,WrongTarget.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties">
  2936. <message kind="error" line="8" text="The annotation @MethodColoring is disallowed for this location"/>
  2937. <message kind="error" line="9" text="The annotation @TypeColoring is disallowed for this location"/>
  2938. <!-- xlint warnings that were put in as part of fix for pr115252 -->
  2939. <message kind="warning" line="13" text="does not match because annotation @MethodColoring has @Target{ElementType.METHOD} [Xlint:unmatchedTargetKind]"/>
  2940. <message kind="warning" line="16" text="does not match because annotation @TypeColoring has @Target{ElementType.TYPE} [Xlint:unmatchedTargetKind]"/>
  2941. </compile>
  2942. </ajc-test>
  2943. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - right target - source weaving">
  2944. <compile files="Base.java,Colored.java,RightTarget.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  2945. <run class="Base">
  2946. <stderr>
  2947. <line text="Colored field access at set(int Base.publicIntField)"/>
  2948. </stderr>
  2949. </run>
  2950. </ajc-test>
  2951. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - right target - binary weaving">
  2952. <weave classesFiles="Base.java,Colored.java" aspectsFiles="RightTarget.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  2953. <run class="Base">
  2954. <stderr>
  2955. <line text="Colored field access at set(int Base.publicIntField)"/>
  2956. </stderr>
  2957. </run>
  2958. </ajc-test>
  2959. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - recursive application - source weaving">
  2960. <compile files="Base.java,Colored.java,Fruit.java,RecursiveFields.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  2961. <run class="Base">
  2962. <stderr>
  2963. <line text="Fruit field access at set(int Base.publicIntField)"/>
  2964. </stderr>
  2965. </run>
  2966. </ajc-test>
  2967. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - recursive application - binary weaving">
  2968. <weave classesFiles="Base.java,Colored.java,Fruit.java" aspectsFiles="RecursiveFields.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  2969. <run class="Base">
  2970. <stderr>
  2971. <line text="Fruit field access at set(int Base.publicIntField)"/>
  2972. </stderr>
  2973. </run>
  2974. </ajc-test>
  2975. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - recursive application (other order) - source weaving">
  2976. <compile files="Base.java,Colored.java,Fruit.java,RecursiveFields2.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  2977. <run class="Base">
  2978. <stderr>
  2979. <line text="Fruit field access at set(int Base.publicIntField)"/>
  2980. </stderr>
  2981. </run>
  2982. </ajc-test>
  2983. <ajc-test dir="java5/annotations/declare/atfield" title="declare @field - recursive application (other order) - binary weaving">
  2984. <weave classesFiles="Base.java,Colored.java,Fruit.java" aspectsFiles="RecursiveFields2.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  2985. <run class="Base">
  2986. <stderr>
  2987. <line text="Fruit field access at set(int Base.publicIntField)"/>
  2988. </stderr>
  2989. </run>
  2990. </ajc-test>
  2991. <!-- incorrect target type for annotation on field -->
  2992. <!-- incorrect target type for annotation on method -->
  2993. <!-- two annotations on one method -->
  2994. <!-- two of the same annotation on one method - error -->
  2995. <!-- two of the same on one using pattern spec - lint -->
  2996. <!-- 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 -->
  2997. <!-- incorrect target type for annotation on ctor -->
  2998. <!-- two annotations on one ctor -->
  2999. <!-- two of the same annotation on one ctor - error -->
  3000. <!-- two of the same on one using pattern spec - lint -->
  3001. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @method - simple source weaving">
  3002. <compile files="Base.java,Colored.java,AtMethod1.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  3003. <run class="Base">
  3004. <stderr>
  3005. <line text="Colored method invocation at call(void Base.m1())"/>
  3006. <line text="m1() running"/>
  3007. <line text="m2() running"/>
  3008. <line text="m3() running"/>
  3009. </stderr>
  3010. </run>
  3011. </ajc-test>
  3012. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @method - simple binary weaving">
  3013. <weave classesFiles="Base.java,Colored.java" aspectsFiles="AtMethod1.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  3014. <run class="Base">
  3015. <stderr>
  3016. <line text="Colored method invocation at call(void Base.m1())"/>
  3017. <line text="m1() running"/>
  3018. <line text="m2() running"/>
  3019. <line text="m3() running"/>
  3020. </stderr>
  3021. </run>
  3022. </ajc-test>
  3023. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @constructor - simple source weaving">
  3024. <compile files="Base.java,Colored.java,AtCtor1.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  3025. <run class="Base">
  3026. <stderr>
  3027. <line text="Colored constructor invocation at call(Base(int))"/>
  3028. <line text="m1() running"/>
  3029. <line text="m2() running"/>
  3030. <line text="m3() running"/>
  3031. </stderr>
  3032. </run>
  3033. </ajc-test>
  3034. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @constructor - simple binary weaving">
  3035. <weave classesFiles="Base.java,Colored.java" aspectsFiles="AtCtor1.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  3036. <run class="Base">
  3037. <stderr>
  3038. <line text="Colored constructor invocation at call(Base(int))"/>
  3039. <line text="m1() running"/>
  3040. <line text="m2() running"/>
  3041. <line text="m3() running"/>
  3042. </stderr>
  3043. </run>
  3044. </ajc-test>
  3045. <!-- These tests verify both @method and @ctor behavior - they are so similar it is OK to have them together... -->
  3046. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @method @ctor - wrong target - source weaving">
  3047. <compile files="Base.java,Colored.java,WrongTarget.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties">
  3048. <message kind="error" line="8" text="The annotation @MethodColoring is disallowed for this location"/>
  3049. <message kind="error" line="9" text="The annotation @TypeColoring is disallowed for this location"/>
  3050. <message kind="error" line="10" text="The annotation @MethodColoring is disallowed for this location"/>
  3051. <message kind="error" line="11" text="The annotation @TypeColoring is disallowed for this location"/>
  3052. </compile>
  3053. </ajc-test>
  3054. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @method @ctor - right target - source weaving">
  3055. <compile files="Base.java,Colored.java,RightTarget.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  3056. <run class="Base">
  3057. <stderr>
  3058. <line text="Colored ctor call at call(Base(int))"/>
  3059. <line text="Colored method call at call(void Base.m1())"/>
  3060. <line text="m1() running"/>
  3061. <line text="m2() running"/>
  3062. <line text="m3() running"/>
  3063. </stderr>
  3064. </run>
  3065. </ajc-test>
  3066. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @method @ctor - right target - binary weaving">
  3067. <weave classesFiles="Base.java,Colored.java" aspectsFiles="RightTarget.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  3068. <run class="Base">
  3069. <stderr>
  3070. <line text="Colored ctor call at call(Base(int))"/>
  3071. <line text="Colored method call at call(void Base.m1())"/>
  3072. <line text="m1() running"/>
  3073. <line text="m2() running"/>
  3074. <line text="m3() running"/>
  3075. </stderr>
  3076. </run>
  3077. </ajc-test>
  3078. <!-- check @method/@ctor/@field recursively applying, can only happen if a pattern for one of them includes an annotation -->
  3079. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @method @ctor - two the same on one - source weaving">
  3080. <compile files="Base.java,Colored.java,TwoOnOneMember.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties">
  3081. <message kind="warning" text="void Base.m1() - already has an annotation of type Colored"/>
  3082. <message kind="warning" text="void Base.&lt;init&gt;(int) - already has an annotation of type Colored"/>
  3083. </compile>
  3084. </ajc-test>
  3085. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @method @ctor - two the same on one - binary weaving">
  3086. <weave classesFiles="Base.java,Colored.java" aspectsFiles="TwoOnOneMember.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties">
  3087. <message kind="warning" text="void Base.m1() - already has an annotation of type Colored"/>
  3088. <message kind="warning" text="void Base.&lt;init&gt;(int) - already has an annotation of type Colored"/>
  3089. </weave>
  3090. </ajc-test>
  3091. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @method @ctor - two different on one - source weaving">
  3092. <compile files="Base.java,Colored.java,Fruit.java,TwoOnOneMember2.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties"/>
  3093. <run class="Base">
  3094. <stderr>
  3095. <line text="Colored ctor call at Base.java:11"/>
  3096. <line text="Fruit ctor call at Base.java:11"/>
  3097. <line text="Colored method call at Base.java:15"/>
  3098. <line text="Fruit method call at Base.java:15"/>
  3099. <line text="m1() running"/>
  3100. <line text="m2() running"/>
  3101. <line text="m3() running"/>
  3102. </stderr>
  3103. </run>
  3104. </ajc-test>
  3105. <ajc-test dir="java5/annotations/declare/atmethodctor" title="declare @method @ctor - two different on one - binary weaving">
  3106. <weave classesFiles="Base.java,Colored.java,Fruit.java" aspectsFiles="TwoOnOneMember2.aj" options="-1.9" xlintfile="ignoreTypeNotExposed.properties">
  3107. </weave>
  3108. <run class="Base">
  3109. <stderr>
  3110. <line text="Colored ctor call at Base.java:11"/>
  3111. <line text="Fruit ctor call at Base.java:11"/>
  3112. <line text="Colored method call at Base.java:15"/>
  3113. <line text="Fruit method call at Base.java:15"/>
  3114. <line text="m1() running"/>
  3115. <line text="m2() running"/>
  3116. <line text="m3() running"/>
  3117. </stderr>
  3118. </run>
  3119. </ajc-test>
  3120. <ajc-test dir="java5/annotations/declare" title="declare all annotations on one class - source weaving">
  3121. <compile files="DeathByAnnotations.aj" options="-1.9,-emacssym" xlintfile="ignoreTypeNotExposed.properties"/>
  3122. <run class="p.q.DeathByAnnotations"/>
  3123. </ajc-test>
  3124. <!-- ======================================================================================= -->
  3125. <!-- annotation binding with ITDs -->
  3126. <!-- ======================================================================================= -->
  3127. <ajc-test dir="java5/annotations/binding" title="simple binding annotation values where itd method is annotated">
  3128. <compile files="BindingWithAnnotatedItds1.aj" options="-1.9"/>
  3129. <run class="BindingWithAnnotatedItds1">
  3130. <stderr>
  3131. <line text="Found apple at jp execution(int A.m()) (BindingWithAnnotatedItds1.aj:8)"/>
  3132. </stderr>
  3133. </run>
  3134. </ajc-test>
  3135. <ajc-test dir="java5/annotations/binding" title="simple binding annotation values where itd field is annotated">
  3136. <compile files="BindingWithAnnotatedItds2.aj" options="-1.9"/>
  3137. <run class="BindingWithAnnotatedItds2">
  3138. <stderr>
  3139. <line text="Found banana at jp set(int A.i) (BindingWithAnnotatedItds2.aj:16)"/>
  3140. <line text="Found apple at jp set(String A.j) (BindingWithAnnotatedItds2.aj:17)"/>
  3141. <line text="Found orange at jp set(int[] A.k) (BindingWithAnnotatedItds2.aj:18)"/>
  3142. </stderr>
  3143. </run>
  3144. </ajc-test>
  3145. <ajc-test dir="java5/annotations/binding" title="simple binding annotation values where itd ctor is annotated">
  3146. <compile files="BindingWithAnnotatedItds3.aj" options="-1.9"/>
  3147. <run class="BindingWithAnnotatedItds3">
  3148. <stderr>
  3149. <line text="Found pear at jp execution(A(String)) (BindingWithAnnotatedItds3.aj:8)"/>
  3150. <line text="Found orange at jp execution(A(int)) (BindingWithAnnotatedItds3.aj:10)"/>
  3151. <line text="Found tomato at jp execution(A(boolean)) (BindingWithAnnotatedItds3.aj:12)"/>
  3152. </stderr>
  3153. </run>
  3154. </ajc-test>
  3155. <!-- ======================================================================================= -->
  3156. <!-- declare annotation targetting ITDs -->
  3157. <!-- ======================================================================================= -->
  3158. <ajc-test dir="java5/annotations/binding" title="simple binding annotation values where itd method is annotated via declare">
  3159. <compile files="BindingWithDeclaredAnnotationItds1.aj" options="-1.9,-emacssym"/>
  3160. <run class="BindingWithDeclaredAnnotationItds1">
  3161. <stderr>
  3162. <line text="Found orange at jp call(int A.m()) (BindingWithDeclaredAnnotationItds1.aj:16)"/>
  3163. <line text="Found orange at jp execution(int A.m()) (BindingWithDeclaredAnnotationItds1.aj:8)"/>
  3164. <line text="Found banana at jp call(int A.n()) (BindingWithDeclaredAnnotationItds1.aj:17)"/>
  3165. <line text="Found banana at jp execution(int A.n()) (BindingWithDeclaredAnnotationItds1.aj:10)"/>
  3166. <line text="Found tomato at jp call(int A.o()) (BindingWithDeclaredAnnotationItds1.aj:18)"/>
  3167. <line text="Found tomato at jp execution(int A.o()) (BindingWithDeclaredAnnotationItds1.aj:12)"/>
  3168. </stderr>
  3169. </run>
  3170. </ajc-test>
  3171. <ajc-test dir="java5/annotations/binding" title="simple binding annotation values where itd field is annotated via declare">
  3172. <compile files="BindingWithDeclaredAnnotationItds2.aj" options="-1.9,-emacssym"/>
  3173. <run class="BindingWithDeclaredAnnotationItds2">
  3174. <stderr>
  3175. <line text="Found orange at jp set(int A.i) (BindingWithDeclaredAnnotationItds2.aj:16)"/>
  3176. <line text="Found banana at jp set(String A.j) (BindingWithDeclaredAnnotationItds2.aj:17)"/>
  3177. <line text="Found apple at jp set(boolean[] A.k) (BindingWithDeclaredAnnotationItds2.aj:18)"/>
  3178. </stderr>
  3179. </run>
  3180. </ajc-test>
  3181. <ajc-test dir="java5/annotations/binding" title="simple binding annotation values where itd field is annotated multiple times via declare">
  3182. <compile files="BindingWithDeclaredAnnotationItds3.aj" options="-1.9,-emacssym"/>
  3183. <run class="BindingWithDeclaredAnnotationItds3">
  3184. <stderr>
  3185. <line text="Found fruit orange at jp set(int A.i) (BindingWithDeclaredAnnotationItds3.aj:13)"/>
  3186. <line text="Found drink margarita at jp set(int A.i) (BindingWithDeclaredAnnotationItds3.aj:13)"/>
  3187. </stderr>
  3188. </run>
  3189. </ajc-test>
  3190. <ajc-test dir="java5/annotations/binding" title="simple binding annotation values where itd ctor is annotated via declare">
  3191. <compile files="BindingWithDeclaredAnnotationItds4.aj" options="-1.9,-emacssym"/>
  3192. <run class="BindingWithDeclaredAnnotationItds4">
  3193. <stderr>
  3194. <line text="Found pear at jp execution(A(String)) (BindingWithDeclaredAnnotationItds4.aj:8)"/>
  3195. <line text="Found orange at jp execution(A(int)) (BindingWithDeclaredAnnotationItds4.aj:10)"/>
  3196. <line text="Found tomato at jp execution(A(boolean)) (BindingWithDeclaredAnnotationItds4.aj:12)"/>
  3197. </stderr>
  3198. </run>
  3199. </ajc-test>
  3200. <ajc-test dir="java5/suppressedWarnings" title="SuppressAjWarnings raised during matching">
  3201. <compile files="SuppressionDuringMatching.aj" options="-1.9"/>
  3202. </ajc-test>
  3203. <!-- ============================================================== -->
  3204. <ajc-test dir="options/aspectpath" title="dirs on aspectpath">
  3205. <compile files="MyAspect.aj" options="-1.9 -d out"/>
  3206. <compile files="MyClass.java" options="-1.9 -aspectpath out">
  3207. <message kind="warning" line="3" text="a method"/>
  3208. </compile>
  3209. </ajc-test>
  3210. <!-- ============================================================== -->
  3211. <!-- Start of generics tests -->
  3212. <!-- ============================================================== -->
  3213. <ajc-test dir="java5/generics" title="ITD with parameterized type" vm="1.5">
  3214. <compile files="ITDReturningParameterizedType.aj" options="-1.9"/>
  3215. <run class="ITDReturningParameterizedType"/>
  3216. </ajc-test>
  3217. <ajc-test dir="java5/annotations/binding/bugs" title="AtArgs causes a VerifyError: Unable to pop operand off an empty stack" vm="1.5">
  3218. <compile files="Test3.java" options="-1.9"/>
  3219. <run class="Test3"/>
  3220. </ajc-test>
  3221. <ajc-test dir="java5/generics/bugs/pr91267" title="NPE using generic methods in aspects 1" vm="1.5">
  3222. <compile files="TestBug1.aj" options="-1.9"/>
  3223. <run class="TestBug1"/>
  3224. </ajc-test>
  3225. <ajc-test dir="java5/generics/bugs/pr91267" title="NPE using generic methods in aspects 2" vm="1.5">
  3226. <compile files="TestBug2.aj" options="-1.9"/>
  3227. <run class="TestBug2"/>
  3228. </ajc-test>
  3229. <ajc-test dir="java5/generics/bugs" title="Generics problem with Set" vm="1.5">
  3230. <compile files="PR91053.aj" options="-1.9"/>
  3231. <run class="PR91053"/>
  3232. </ajc-test>
  3233. <ajc-test dir="java5/generics/bugs" title="Compilation error on generic member introduction" vm="1.5">
  3234. <compile files="PR87282.aj" options="-1.9"/>
  3235. </ajc-test>
  3236. <ajc-test dir="java5/generics/bugs" title="Parameterized types on introduced fields not correctly recognized" vm="1.5">
  3237. <compile files="PR88606.aj" options="-1.9"/>
  3238. </ajc-test>
  3239. <ajc-test dir="bugs150" title="enum called Enum, annotation called Annotation, etc">
  3240. <compile files="PR90827.aj" options="-1.9"/>
  3241. </ajc-test>
  3242. <ajc-test dir="bugs150" title="Internal compiler error">
  3243. <compile files="PR86832.aj" options="-1.9"/>
  3244. </ajc-test>
  3245. <ajc-test dir="bugs150" title="Exploding compile time with if() statements in pointcut">
  3246. <compile files="PR94086.aj" options="-1.9"/>
  3247. </ajc-test>
  3248. <!-- generic abstract aspects... -->
  3249. <ajc-test dir="java5/generics/genericaspects" title="static pointcut parameterization suite">
  3250. <compile files="GenericAspectPointcuts.aj" options="-1.9">
  3251. <message kind="warning" line="62" text="kinded-returning-ok"/>
  3252. <message kind="warning" line="52" text="kinded-declaring-ok"/>
  3253. <message kind="warning" line="67" text="kinded-declaring-ok"/>
  3254. <message kind="warning" line="50" text="kinded-params-ok"/>
  3255. <message kind="warning" line="56" text="kinded-throws-ok"/>
  3256. <message kind="warning" line="64" text="and-ok"/>
  3257. <message kind="warning" line="60" text="or-ok"/>
  3258. <message kind="warning" line="64" text="or-ok"/>
  3259. <message kind="warning" line="67" text="or-ok"/>
  3260. <message kind="warning" line="1" text="not-ok"/>
  3261. <message kind="warning" line="42" text="not-ok"/>
  3262. <message kind="warning" line="72" text="not-ok"/>
  3263. <message kind="warning" line="59" text="within-ok"/>
  3264. <message kind="warning" line="64" text="withincode-ok"/>
  3265. <message kind="warning" line="53" text="handler-ok"/>
  3266. </compile>
  3267. </ajc-test>
  3268. <ajc-test dir="java5/generics/genericaspects" title="dynamic pointcut parameterization suite">
  3269. <compile files="GenericAspectRuntimePointcuts.aj" options="-1.9"/>
  3270. <run class="GenericAspectRuntimePointcuts">
  3271. <stdout>
  3272. <line text="target-ok an X execution(void X.foo())"/>
  3273. <line text="@this-ok @MyAnnotation(value=my-value) execution(void X.foo())" vm="1.5-1.8"/>
  3274. <line text="@this-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void X.foo())" vm="9-13"/>
  3275. <line text="@this-ok @MyAnnotation(&quot;my-value&quot;) execution(void X.foo())" vm="14-"/>
  3276. <line text="@target-ok @MyAnnotation(value=my-value) execution(void X.foo())" vm="1.5-1.8"/>
  3277. <line text="@target-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void X.foo())" vm="9-13"/>
  3278. <line text="@target-ok @MyAnnotation(&quot;my-value&quot;) execution(void X.foo())" vm="14-"/>
  3279. <line text="@within-ok @MyAnnotation(value=my-value) execution(void X.foo())" vm="1.5-1.8"/>
  3280. <line text="@within-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void X.foo())" vm="9-13"/>
  3281. <line text="@within-ok @MyAnnotation(&quot;my-value&quot;) execution(void X.foo())" vm="14-"/>
  3282. <line text="cflow-ok an X a Y set(Y X.y)"/>
  3283. <line text="@annotation-ok-sub @MyAnnotation(value=bar) execution(void X.bar())" vm="1.5-1.8"/>
  3284. <line text="@annotation-ok-sub @MyAnnotation(value=&quot;bar&quot;) execution(void X.bar())" vm="9-13"/>
  3285. <line text="@annotation-ok-sub @MyAnnotation(&quot;bar&quot;) execution(void X.bar())" vm="14-"/>
  3286. <line text="@annotation-ok @MyAnnotation(value=bar) execution(void X.bar())" vm="1.5-1.8"/>
  3287. <line text="@annotation-ok @MyAnnotation(value=&quot;bar&quot;) execution(void X.bar())" vm="9-13"/>
  3288. <line text="@annotation-ok @MyAnnotation(&quot;bar&quot;) execution(void X.bar())" vm="14-"/>
  3289. <line text="target-ok an X execution(void X.bar())"/>
  3290. <line text="@this-ok @MyAnnotation(value=my-value) execution(void X.bar())" vm="1.5-1.8"/>
  3291. <line text="@this-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void X.bar())" vm="9-13"/>
  3292. <line text="@this-ok @MyAnnotation(&quot;my-value&quot;) execution(void X.bar())" vm="14-"/>
  3293. <line text="@target-ok @MyAnnotation(value=my-value) execution(void X.bar())" vm="1.5-1.8"/>
  3294. <line text="@target-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void X.bar())" vm="9-13"/>
  3295. <line text="@target-ok @MyAnnotation(&quot;my-value&quot;) execution(void X.bar())" vm="14-"/>
  3296. <line text="@within-ok @MyAnnotation(value=my-value) execution(void X.bar())" vm="1.5-1.8"/>
  3297. <line text="@within-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void X.bar())" vm="9-13"/>
  3298. <line text="@within-ok @MyAnnotation(&quot;my-value&quot;) execution(void X.bar())" vm="14-"/>
  3299. <line text="@args-ok @MyAnnotation(value=my-value) execution(void Y.foo(X))" vm="1.5-1.8"/>
  3300. <line text="@args-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void Y.foo(X))" vm="9-13"/>
  3301. <line text="@args-ok @MyAnnotation(&quot;my-value&quot;) execution(void Y.foo(X))" vm="14-"/>
  3302. <line text="args-ok an X execution(void Y.foo(X))"/>
  3303. <line text="this-ok a Y execution(void Y.foo(X))"/>
  3304. <line text="@this-ok @MyAnnotation(value=on Y) execution(void Y.foo(X))" vm="1.5-1.8"/>
  3305. <line text="@this-ok @MyAnnotation(value=&quot;on Y&quot;) execution(void Y.foo(X))" vm="9-13"/>
  3306. <line text="@this-ok @MyAnnotation(&quot;on Y&quot;) execution(void Y.foo(X))" vm="14-"/>
  3307. <line text="@target-ok @MyAnnotation(value=on Y) execution(void Y.foo(X))" vm="1.5-1.8"/>
  3308. <line text="@target-ok @MyAnnotation(value=&quot;on Y&quot;) execution(void Y.foo(X))" vm="9-13"/>
  3309. <line text="@target-ok @MyAnnotation(&quot;on Y&quot;) execution(void Y.foo(X))" vm="14-"/>
  3310. <line text="@within-ok @MyAnnotation(value=on Y) execution(void Y.foo(X))" vm="1.5-1.8"/>
  3311. <line text="@within-ok @MyAnnotation(value=&quot;on Y&quot;) execution(void Y.foo(X))" vm="9-13"/>
  3312. <line text="@within-ok @MyAnnotation(&quot;on Y&quot;) execution(void Y.foo(X))" vm="14-"/>
  3313. <line text="@annotation-ok-sub @MyAnnotation(value=my-value) execution(X Y.bar())" vm="1.5-1.8"/>
  3314. <line text="@annotation-ok-sub @MyAnnotation(value=&quot;my-value&quot;) execution(X Y.bar())" vm="9-13"/>
  3315. <line text="@annotation-ok-sub @MyAnnotation(&quot;my-value&quot;) execution(X Y.bar())" vm="14-"/>
  3316. <line text="@annotation-ok @MyAnnotation(value=my-value) execution(X Y.bar())" vm="1.5-1.8"/>
  3317. <line text="@annotation-ok @MyAnnotation(value=&quot;my-value&quot;) execution(X Y.bar())" vm="9-13"/>
  3318. <line text="@annotation-ok @MyAnnotation(&quot;my-value&quot;) execution(X Y.bar())" vm="14-"/>
  3319. <line text="this-ok a Y execution(X Y.bar())"/>
  3320. <line text="@this-ok @MyAnnotation(value=on Y) execution(X Y.bar())" vm="1.5-1.8"/>
  3321. <line text="@this-ok @MyAnnotation(value=&quot;on Y&quot;) execution(X Y.bar())" vm="9-13"/>
  3322. <line text="@this-ok @MyAnnotation(&quot;on Y&quot;) execution(X Y.bar())" vm="14-"/>
  3323. <line text="@target-ok @MyAnnotation(value=on Y) execution(X Y.bar())" vm="1.5-1.8"/>
  3324. <line text="@target-ok @MyAnnotation(value=&quot;on Y&quot;) execution(X Y.bar())" vm="9-13"/>
  3325. <line text="@target-ok @MyAnnotation(&quot;on Y&quot;) execution(X Y.bar())" vm="14-"/>
  3326. <line text="@within-ok @MyAnnotation(value=on Y) execution(X Y.bar())" vm="1.5-1.8"/>
  3327. <line text="@within-ok @MyAnnotation(value=&quot;on Y&quot;) execution(X Y.bar())" vm="9-13"/>
  3328. <line text="@within-ok @MyAnnotation(&quot;on Y&quot;) execution(X Y.bar())" vm="14-"/>
  3329. <line text="@withincode-ok @MyAnnotation(value=my-value) get(X Y.x)" vm="1.5-1.8"/>
  3330. <line text="@withincode-ok @MyAnnotation(value=&quot;my-value&quot;) get(X Y.x)" vm="9-13"/>
  3331. <line text="@withincode-ok @MyAnnotation(&quot;my-value&quot;) get(X Y.x)" vm="14-"/>
  3332. </stdout>
  3333. </run>
  3334. </ajc-test>
  3335. <ajc-test dir="java5/generics/genericaspects" title="reference to pointcut in generic class">
  3336. <compile files="PointcutsInGenericClasses.aj" options="-1.9">
  3337. <message kind="warning" line="16" text="a match"/>
  3338. </compile>
  3339. </ajc-test>
  3340. <ajc-test dir="java5/generics/genericaspects" title="reference to non-parameterized pointcut in generic class">
  3341. <compile files="PointcutsInGenericClasses2.aj" options="-1.9">
  3342. <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)"/>
  3343. </compile>
  3344. </ajc-test>
  3345. <ajc-test dir="java5/generics/genericaspects" title="declare parents parameterized">
  3346. <compile files="DecPGenericTest.aj" options="-1.9">
  3347. <message kind="warning" line="16" text="success"/>
  3348. </compile>
  3349. </ajc-test>
  3350. <ajc-test dir="java5/generics/genericaspects" title="declare precedence parameterized">
  3351. <compile files="DecPrecedenceGenericTest.aj" options="-1.9 -Xdev:Pinpoint"/>
  3352. <run class="DecPrecedenceGenericTest">
  3353. <stdout>
  3354. <line text="A1"/>
  3355. <line text="A2"/>
  3356. </stdout>
  3357. </run>
  3358. </ajc-test>
  3359. <ajc-test dir="java5/generics/genericaspects" title="declare annotation parameterized">
  3360. <compile files="DecAnnGenericTest.aj" options="-1.9">
  3361. <message kind="warning" line="18" text="@type ok"/>
  3362. <message kind="warning" line="20" text="@field ok"/>
  3363. <message kind="warning" line="22" text="@constructor ok"/>
  3364. <message kind="warning" line="24" text="@method ok"/>
  3365. </compile>
  3366. </ajc-test>
  3367. <ajc-test dir="java5/generics/genericaspects" title="multi-level generic abstract aspects">
  3368. <compile files="MultiLevelGenericTest.aj" options="-1.9">
  3369. <message kind="warning" line="23" text="base match"/>
  3370. <message kind="warning" line="23" text="middle match"/>
  3371. <message kind="warning" line="23" text="top match"/>
  3372. </compile>
  3373. </ajc-test>
  3374. <!-- generic bugs -->
  3375. <ajc-test dir="java5/generics/bugs" title="ITD method with generic arg">
  3376. <compile files="PR97763.aj" options="-1.9"/>
  3377. <run class="PR97763">
  3378. <stderr>
  3379. <line text="Number of entries=2"/>
  3380. </stderr>
  3381. </run>
  3382. </ajc-test>
  3383. <ajc-test dir="bugs150" title="NPE at ClassScope.java:660 when compiling generic class">
  3384. <compile files="PR95993.java" options="-1.9"/>
  3385. </ajc-test>
  3386. <ajc-test dir="java5/generics/bugs" title="Problems resolving type name inside generic class">
  3387. <compile files="PR95992.java" options="-1.9"/>
  3388. </ajc-test>
  3389. <ajc-test dir="bugs150" pr="100227" title="inner class with generic enclosing class">
  3390. <compile files="pr100227.aj" options="-1.9"/>
  3391. <run class="pr100227">
  3392. <stderr>
  3393. <line text="Outer.Inner.inner=2"/>
  3394. <line text="Outer.Inner.p() executing"/>
  3395. <line text="Generic_Outer.Inner.inner=4"/>
  3396. <line text="Generic_Outer.Inner.p() executing"/>
  3397. </stderr>
  3398. </run>
  3399. </ajc-test>
  3400. <ajc-test dir="bugs150" pr="100260" title="methods inherited from a generic parent">
  3401. <compile files="pr100260.aj" options="-1.9"/>
  3402. <run class="pr100260"/>
  3403. </ajc-test>
  3404. <!-- end of generic bugs -->
  3405. <!-- generic aspects -->
  3406. <ajc-test dir="java5/generics/genericaspects" title="generic aspects - 1">
  3407. <compile files="GenericAspect1.aj" options="-1.9">
  3408. <message kind="error" line="2" text="only abstract aspects can have type parameters"/>
  3409. </compile>
  3410. </ajc-test>
  3411. <ajc-test dir="java5/generics/genericaspects" title="generic aspects - 2">
  3412. <compile files="GenericAspect2.aj" options="-1.9">
  3413. <message kind="error" line="9" text="a generic super-aspect must be fully parameterized in an extends clause"/>
  3414. </compile>
  3415. </ajc-test>
  3416. <ajc-test dir="java5/generics/genericaspects" title="generic aspects - 3">
  3417. <compile files="GenericAspect3.aj" options="-1.9"/>
  3418. <run class="GenericAspect3">
  3419. <stderr>
  3420. <line text="A"/>
  3421. <line text="B"/>
  3422. </stderr>
  3423. </run>
  3424. </ajc-test>
  3425. <ajc-test dir="java5/generics/genericaspects" title="generic aspects - 4">
  3426. <compile files="ParentChildRelationship.aj" options="-1.9"/>
  3427. </ajc-test>
  3428. <ajc-test dir="java5/generics/genericaspects" title="generic aspect with declare warning using type vars">
  3429. <compile files="DeclareWarningInGenericAspect.aj" options="-1.9">
  3430. <message kind="warning" line="16" text="this method takes a T!"/>
  3431. </compile>
  3432. </ajc-test>
  3433. <ajc-test dir="java5/generics/genericaspects" title="generic aspect with execution advice using type vars">
  3434. <compile files="ExecutionAdviceInGenericAspect.aj" options="-1.9"/>
  3435. <run class="ExecutionAdviceInGenericAspect">
  3436. <stdout>
  3437. <line text="I matched at execution(void C.foo(String))"/>
  3438. </stdout>
  3439. </run>
  3440. </ajc-test>
  3441. <ajc-test dir="java5/generics/genericaspects" title="generic aspect with anonymous pointcut">
  3442. <compile files="AnonymousPointcutInGenericAspect.aj" options="-1.9"/>
  3443. <run class="AnonymousPointcutInGenericAspect">
  3444. <stdout>
  3445. <line text="I matched at execution(void C.foo(String))"/>
  3446. </stdout>
  3447. </run>
  3448. </ajc-test>
  3449. <ajc-test dir="java5/generics/genericaspects" title="generic aspect declare parents">
  3450. <compile files="DeclareParentsWithTypeVars.aj" options="-1.9"/>
  3451. <run class="DeclareParentsWithTypeVars">
  3452. </run>
  3453. </ajc-test>
  3454. <ajc-test dir="java5/generics/genericaspects" title="generic aspect declare soft">
  3455. <compile files="DeclareSoftWithTypeVars.aj" options="-1.9"/>
  3456. <run class="DeclareSoftWithTypeVars">
  3457. <stderr>
  3458. <line text="handled exception: io, io, it's off to work we go..."/>
  3459. <line text="Successfully converted to domain exception"/>
  3460. </stderr>
  3461. </run>
  3462. </ajc-test>
  3463. <!-- ajdk example -->
  3464. <ajc-test dir="java5/generics/genericaspects" title="generic aspects - 5 (ajdk)">
  3465. <compile files="Blob.java,BlobContainment.aj,ParentChildRelationship.aj" options="-1.9"/>
  3466. <run class="BlobContainment"/>
  3467. </ajc-test>
  3468. <!-- same as above but all types in one file -->
  3469. <ajc-test dir="java5/generics/genericaspects" title="generic aspects - 6 (ajdk)">
  3470. <compile files="TheBigOne.java" options="-1.9"/>
  3471. <run class="TheBigOne"/>
  3472. </ajc-test>
  3473. <!-- end of generic aspects -->
  3474. <!-- generic ITDs -->
  3475. <ajc-test dir="java5/generics/itds" title="ITDs on generic type">
  3476. <compile files="Parse5.java" options="-1.9">
  3477. <message kind="error" line="9"/>
  3478. <message kind="error" line="11"/>
  3479. <message kind="error" line="13"/>
  3480. <message kind="error" line="15"/>
  3481. </compile>
  3482. </ajc-test>
  3483. <ajc-test dir="java5/generics/itds" title="itd of non static member">
  3484. <compile files="A.java" options="-1.9"/>
  3485. <run class="A">
  3486. <stderr>
  3487. <line text="min(2,4)=>2"/>
  3488. <line text="max(2,4)=>4"/>
  3489. </stderr>
  3490. </run>
  3491. </ajc-test>
  3492. <ajc-test dir="java5/generics/itds" title="itd of static member">
  3493. <compile files="B.java" options="-1.9"/>
  3494. <run class="B">
  3495. <stderr>
  3496. <line text="min(2,4)=>2"/>
  3497. <line text="max(2,4)=>4"/>
  3498. </stderr>
  3499. </run>
  3500. </ajc-test>
  3501. <ajc-test dir="java5/generics/itds" title="itd using type parameter">
  3502. <compile files="C.java" options="-1.9"/>
  3503. <run class="C">
  3504. <stderr>
  3505. <line text="fillthisin..."/>
  3506. </stderr>
  3507. </run>
  3508. </ajc-test>
  3509. <ajc-test dir="java5/generics/itds" title="itd incorrectly using type parameter">
  3510. <compile files="D.java" options="-1.9"/>
  3511. <run class="D">
  3512. <stderr>
  3513. <line text="fillthisin..."/>
  3514. </stderr>
  3515. </run>
  3516. </ajc-test>
  3517. <ajc-test dir="java5/generics/itds" title="static generic method itd">
  3518. <compile files="StaticGenericMethodITD.aj" options="-1.9"/>
  3519. <run class="StaticGenericMethodITD">
  3520. <stderr>
  3521. <line text="First=10"/>
  3522. </stderr>
  3523. </run>
  3524. </ajc-test>
  3525. <ajc-test dir="java5/generics/itds" title="generic ctor itd - 1">
  3526. <compile files="GenericCtorITD1.aj" options="-1.9"/>
  3527. <run class="GenericCtorITD1"/>
  3528. </ajc-test>
  3529. <ajc-test dir="java5/generics/itds" title="generic ctor itd - 2">
  3530. <compile files="GenericCtorITD2.aj" options="-1.9"/>
  3531. <run class="GenericCtorITD2"/>
  3532. </ajc-test>
  3533. <ajc-test dir="java5/generics/itds" title="generic ctor itd - 3">
  3534. <compile files="GenericCtorITD3.aj" options="-1.9"/>
  3535. <run class="GenericCtorITD3"/>
  3536. </ajc-test>
  3537. <ajc-test dir="java5/generics/itds" title="parameterized method itd - 1">
  3538. <compile files="ParameterizedMethodITD1.aj" options="-1.9"/>
  3539. <run class="ParameterizedMethodITD1"/>
  3540. </ajc-test>
  3541. <ajc-test dir="java5/generics/itds" title="parameterized method itd - 2">
  3542. <compile files="ParameterizedMethodITD2.aj" options="-1.9">
  3543. <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;)"/>
  3544. </compile>
  3545. </ajc-test>
  3546. <ajc-test dir="java5/generics/itds" title="parameterized method itd - 3">
  3547. <compile files="ParameterizedMethodITD3.aj" options="-1.9">
  3548. <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;)"/>
  3549. </compile>
  3550. </ajc-test>
  3551. <ajc-test dir="java5/generics/itds" title="parameterized method itd - 4">
  3552. <compile files="ParameterizedMethodITD4.aj" options="-1.9"/>
  3553. <run class="ParameterizedMethodITD4"/>
  3554. </ajc-test>
  3555. <ajc-test dir="java5/generics/itds" title="generic method itd - 1">
  3556. <compile files="GenericMethodITD1.aj" options="-1.9"/>
  3557. <run class="GenericMethodITD1"/>
  3558. </ajc-test>
  3559. <ajc-test dir="java5/generics/itds" title="generic method itd - 2">
  3560. <compile files="GenericMethodITD2.aj" options="-1.9">
  3561. <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;"/>
  3562. </compile>
  3563. </ajc-test>
  3564. <ajc-test dir="java5/generics/itds" title="generic method itd - 3">
  3565. <compile files="GenericMethodITD3.aj" options="-1.9"/>
  3566. <run class="GenericMethodITD3"/>
  3567. </ajc-test>
  3568. <ajc-test dir="java5/generics/itds" title="generic method itd - 4">
  3569. <compile files="GenericMethodITD4.aj" options="-1.9"/>
  3570. <run class="GenericMethodITD4"/>
  3571. </ajc-test>
  3572. <ajc-test dir="java5/generics/itds" title="generic method itd - 5">
  3573. <compile files="GenericMethodITD5.aj" options="-1.9">
  3574. <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;)"/>
  3575. </compile>
  3576. </ajc-test>
  3577. <ajc-test dir="java5/generics/itds" title="generic method itd - 6">
  3578. <compile files="GenericMethodITD6.aj" options="-1.9"/>
  3579. <run class="GenericMethodITD6"/>
  3580. </ajc-test>
  3581. <ajc-test dir="java5/generics/itds" title="generic method itd - 7">
  3582. <compile files="GenericMethodITD7.aj" options="-1.9"/>
  3583. <run class="GenericMethodITD7"/>
  3584. </ajc-test>
  3585. <ajc-test dir="java5/generics/itds" title="generic method itd - 8">
  3586. <compile files="GenericMethodITD8.aj" options="-1.9">
  3587. <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;)"/>
  3588. </compile>
  3589. </ajc-test>
  3590. <ajc-test dir="java5/generics/itds" title="generic method itd - 9">
  3591. <compile files="GenericMethodITD9.aj" options="-1.9"/>
  3592. <run class="GenericMethodITD9"/>
  3593. </ajc-test>
  3594. <ajc-test dir="java5/generics/itds" title="generic method itd - 10">
  3595. <compile files="GenericMethodITD10.aj" options="-1.9">
  3596. <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 Comparable&lt;? super R&gt;&gt;"/>
  3597. </compile>
  3598. </ajc-test>
  3599. <ajc-test dir="java5/generics/itds" title="generic method itd - 11">
  3600. <compile files="GenericMethodITD11.aj" options="-1.9"/>
  3601. <run class="GenericMethodITD11"/>
  3602. </ajc-test>
  3603. <ajc-test dir="java5/generics/itds" title="generic method itd - 12">
  3604. <compile files="GenericMethodITD12.aj" options="-1.9">
  3605. <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 Foo&lt;? extends R&gt;&gt;"/>
  3606. </compile>
  3607. </ajc-test>
  3608. <ajc-test dir="java5/generics/itds" title="generic method itd - 13">
  3609. <compile files="GenericMethodITD13.aj" options="-1.9"/>
  3610. <run class="GenericMethodITD13"/>
  3611. </ajc-test>
  3612. <ajc-test dir="java5/generics/itds" title="generic method itd - 14">
  3613. <compile files="GenericMethodITD14.aj" options="-1.9">
  3614. <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 Foo&lt;? super R&gt;&gt;"/>
  3615. </compile>
  3616. </ajc-test>
  3617. <ajc-test dir="java5/generics/itds" title="generic method itd - 15">
  3618. <compile files="GenericMethodITD15.aj" options="-1.9"/>
  3619. <run class="GenericMethodITD15"/>
  3620. </ajc-test>
  3621. <!-- visibility -->
  3622. <ajc-test dir="java5/generics/itds/visibility" title="public itds">
  3623. <compile files="PublicITDs.aj" options="-1.9"/>
  3624. <run class="PublicITDs"/>
  3625. </ajc-test>
  3626. <ajc-test dir="java5/generics/itds/visibility" title="private itds">
  3627. <compile files="PrivateITDs.aj" options="-1.9"/>
  3628. <run class="PrivateITDs"/>
  3629. </ajc-test>
  3630. <ajc-test dir="java5/generics/itds/visibility" title="package itds">
  3631. <compile files="PackageITDs.aj" options="-1.9"/>
  3632. <run class="PackageITDs"/>
  3633. </ajc-test>
  3634. <ajc-test dir="java5/generics/itds/visibility" title="public itds with errors">
  3635. <compile files="PublicITDsErrors.aj" options="-1.9">
  3636. <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;)"/>
  3637. <message kind="error" line="15" text="The constructor Base(List&lt;Double&gt;, Map&lt;Integer,String&gt;) is undefined"/>
  3638. </compile>
  3639. </ajc-test>
  3640. <!-- targetting different types -->
  3641. <ajc-test dir="java5/generics/itds/differingTargets" title="targetting interface">
  3642. <compile files="TargettingInterface.aj" options="-1.9"/>
  3643. <run class="TargettingInterface"/>
  3644. </ajc-test>
  3645. <ajc-test dir="java5/generics/itds/differingTargets" title="targetting aspect">
  3646. <compile files="TargettingAspect.aj" options="-1.9"/>
  3647. <run class="TargettingAspect"/>
  3648. </ajc-test>
  3649. <ajc-test dir="java5/generics/itds/differingTargets" title="targetting class">
  3650. <compile files="TargettingClass.aj" options="-1.9"/>
  3651. <run class="TargettingClass"/>
  3652. </ajc-test>
  3653. <!-- sharing type variables between the ITD and the generic type -->
  3654. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 1">
  3655. <compile files="FieldA.aj" options="-1.9"/>
  3656. <run class="FieldA"/>
  3657. </ajc-test>
  3658. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 2">
  3659. <compile files="FieldB.aj" options="-1.9">
  3660. <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."/>
  3661. </compile>
  3662. </ajc-test>
  3663. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 3">
  3664. <compile files="FieldC.aj" options="-1.9"/>
  3665. <run class="FieldC"/>
  3666. </ajc-test>
  3667. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 4">
  3668. <compile files="FieldD.aj" options="-1.9"/>
  3669. <run class="FieldD"/>
  3670. </ajc-test>
  3671. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 5">
  3672. <compile files="FieldE.aj" options="-1.9"/>
  3673. <run class="FieldE"/>
  3674. </ajc-test>
  3675. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 6">
  3676. <compile files="FieldF.aj" options="-1.9"/>
  3677. <run class="FieldF"/>
  3678. </ajc-test>
  3679. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 7">
  3680. <compile files="FieldG.aj" options="-1.9"/>
  3681. <run class="FieldG"/>
  3682. </ajc-test>
  3683. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 8">
  3684. <compile files="FieldH.aj" options="-1.9"/>
  3685. <run class="FieldH"/>
  3686. </ajc-test>
  3687. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type - 9">
  3688. <compile files="FieldI.aj" options="-1.9">
  3689. <message kind="error" line="7" text="Type mismatch: cannot convert from List&lt;String&gt; to List&lt;Integer&gt;"/>
  3690. </compile>
  3691. </ajc-test>
  3692. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -10">
  3693. <compile files="FieldJ.aj" options="-1.9"/>
  3694. <run class="FieldJ"/>
  3695. </ajc-test>
  3696. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -11">
  3697. <compile files="FieldK.aj" options="-1.9"/>
  3698. <run class="FieldK"/>
  3699. </ajc-test>
  3700. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -12">
  3701. <compile files="FieldL.aj" options="-1.9"/>
  3702. <run class="FieldL"/>
  3703. </ajc-test>
  3704. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -13">
  3705. <compile files="FieldM.aj" options="-1.9"/>
  3706. <run class="FieldM"/>
  3707. </ajc-test>
  3708. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -14">
  3709. <compile files="FieldN.aj" options="-1.9">
  3710. <message kind="error" line="11" text="Type parameters can not be specified in the ITD target type - the target type I is not generic."/>
  3711. </compile>
  3712. </ajc-test>
  3713. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -15">
  3714. <compile files="FieldO.aj" options="-1.9">
  3715. <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."/>
  3716. </compile>
  3717. </ajc-test>
  3718. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -16">
  3719. <compile files="FieldP.aj" options="-1.9">
  3720. <message kind="error" line="10" text="static intertype field declarations cannot refer to type variables from the target generic type"/>
  3721. </compile>
  3722. </ajc-test>
  3723. <ajc-test dir="java5/generics/itds/sharing" title="field itd using type variable from target type -17">
  3724. <compile files="FieldQ.aj" options="-1.9"/>
  3725. <run class="FieldQ"/>
  3726. </ajc-test>
  3727. <!-- Now intertype declared methods on generic types that use the target types type vars -->
  3728. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - A1">
  3729. <compile files="MethodA.aj" options="-1.9"/>
  3730. <run class="MethodA"/>
  3731. </ajc-test>
  3732. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - A2">
  3733. <compile files="MethodA2.aj" options="-1.9"/>
  3734. <run class="MethodA2"/>
  3735. </ajc-test>
  3736. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - A3">
  3737. <compile files="MethodA3.aj" options="-1.9"/>
  3738. <run class="MethodA3"/>
  3739. </ajc-test>
  3740. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - A4">
  3741. <compile files="MethodA4.aj" options="-1.9"/>
  3742. <run class="MethodA4"/>
  3743. </ajc-test>
  3744. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - B1">
  3745. <compile files="MethodB.aj" options="-1.9">
  3746. <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."/>
  3747. </compile>
  3748. </ajc-test>
  3749. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - C1">
  3750. <compile files="MethodC.aj" options="-1.9"/>
  3751. <run class="MethodC"/>
  3752. </ajc-test>
  3753. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - D1">
  3754. <compile files="MethodD.aj" options="-1.9"/>
  3755. <run class="MethodD"/>
  3756. </ajc-test>
  3757. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - E1">
  3758. <compile files="MethodE.aj" options="-1.9"/>
  3759. <run class="MethodE"/>
  3760. </ajc-test>
  3761. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - F1">
  3762. <compile files="MethodF.aj" options="-1.9"/>
  3763. <run class="MethodF"/>
  3764. </ajc-test>
  3765. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - G1">
  3766. <compile files="MethodG.aj" options="-1.9"/>
  3767. <run class="MethodG"/>
  3768. </ajc-test>
  3769. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - H1">
  3770. <compile files="MethodH.aj" options="-1.9"/>
  3771. <run class="MethodH"/>
  3772. </ajc-test>
  3773. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - I1">
  3774. <compile files="MethodI.aj" options="-1.9">
  3775. <message kind="error" line="6" text="Type mismatch: cannot convert from List&lt;Integer&gt; to List&lt;String&gt;"/>
  3776. </compile>
  3777. </ajc-test>
  3778. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - I2">
  3779. <compile files="MethodI2.aj" options="-1.9">
  3780. <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;)"/>
  3781. </compile>
  3782. </ajc-test>
  3783. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - J1">
  3784. <compile files="MethodJ.aj" options="-1.9"/>
  3785. <run class="MethodJ"/>
  3786. </ajc-test>
  3787. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - K1">
  3788. <compile files="MethodK.aj" options="-1.9"/>
  3789. <run class="MethodK"/>
  3790. </ajc-test>
  3791. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - L1">
  3792. <compile files="MethodL.aj" options="-1.9"/>
  3793. <run class="MethodL"/>
  3794. </ajc-test>
  3795. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - M1">
  3796. <compile files="MethodM.aj" options="-1.9"/>
  3797. <run class="MethodM"/>
  3798. </ajc-test>
  3799. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - M2">
  3800. <compile files="MethodM2.aj" options="-1.9"/>
  3801. <run class="MethodM2"/>
  3802. </ajc-test>
  3803. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - N1">
  3804. <compile files="MethodN.aj" options="-1.9">
  3805. <message kind="error" line="11" text="Type parameters can not be specified in the ITD target type - the target type I is not generic."/>
  3806. </compile>
  3807. </ajc-test>
  3808. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - O1">
  3809. <compile files="MethodO.aj" options="-1.9">
  3810. <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."/>
  3811. </compile>
  3812. </ajc-test>
  3813. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - O2">
  3814. <compile files="MethodO2.aj" options="-1.9">
  3815. <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."/>
  3816. </compile>
  3817. </ajc-test>
  3818. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - P1">
  3819. <compile files="MethodP.aj" options="-1.9"/>
  3820. <run class="MethodP"/>
  3821. </ajc-test>
  3822. <ajc-test dir="java5/generics/itds/sharing" title="method itd using type variable from target type - Q1">
  3823. <compile files="MethodQ.aj" options="-1.9"/>
  3824. <run class="MethodQ"/>
  3825. </ajc-test>
  3826. <!-- Now intertype declared constructors on generic types that use the target types type vars -->
  3827. <ajc-test dir="java5/generics/itds/sharing" title="ctor itd using type variable from target type - A1">
  3828. <compile files="CtorA.aj" options="-1.9"/>
  3829. <run class="CtorA"/>
  3830. </ajc-test>
  3831. <ajc-test dir="java5/generics/itds/sharing" title="ctor itd using type variable from target type - B1">
  3832. <compile files="CtorB.aj" options="-1.9">
  3833. <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."/>
  3834. </compile>
  3835. </ajc-test>
  3836. <ajc-test dir="java5/generics/itds/sharing" title="ctor itd using type variable from target type - C1">
  3837. <compile files="CtorC.aj" options="-1.9"/>
  3838. <run class="CtorC"/>
  3839. </ajc-test>
  3840. <ajc-test dir="java5/generics/itds/sharing" title="ctor itd using type variable from target type - D1">
  3841. <compile files="CtorD.aj" options="-1.9"/>
  3842. <run class="CtorD"/>
  3843. </ajc-test>
  3844. <ajc-test dir="java5/generics/itds/sharing" title="ctor itd using type variable from target type - E1">
  3845. <compile files="CtorE.aj" options="-1.9"/>
  3846. <run class="CtorE"/>
  3847. </ajc-test>
  3848. <ajc-test dir="java5/generics/itds/sharing" title="ctor itd using type variable from target type - F1">
  3849. <compile files="CtorF.aj" options="-1.9"/>
  3850. <run class="CtorF"/>
  3851. </ajc-test>
  3852. <ajc-test dir="java5/generics/itds/sharing" title="ctor itd using type variable from target type - G1">
  3853. <compile files="CtorG.aj" options="-1.9"/>
  3854. <run class="CtorG"/>
  3855. </ajc-test>
  3856. <ajc-test dir="java5/generics/itds/sharing" title="ctor itd using type variable from target type - H1">
  3857. <compile files="CtorH.aj" options="-1.9"/>
  3858. <run class="CtorH"/>
  3859. </ajc-test>
  3860. <ajc-test dir="java5/generics/itds/sharing" title="ctor itd using type variable from target type - I1">
  3861. <compile files="CtorI.aj" options="-1.9"/>
  3862. <run class="CtorI"/>
  3863. </ajc-test>
  3864. <!-- putting it all together, fields/methods/ctors and decps -->
  3865. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - A">
  3866. <compile files="GenericAspectA.aj" options="-1.9"/>
  3867. <run class="GenericAspectA"/>
  3868. </ajc-test>
  3869. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - B">
  3870. <compile files="GenericAspectB.aj" options="-1.9"/>
  3871. <run class="GenericAspectB"/>
  3872. </ajc-test>
  3873. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - C">
  3874. <compile files="GenericAspectC.aj" options="-1.9"/>
  3875. <run class="GenericAspectC"/>
  3876. </ajc-test>
  3877. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - D">
  3878. <compile files="GenericAspectD.aj" options="-1.9"/>
  3879. <run class="GenericAspectD"/>
  3880. </ajc-test>
  3881. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - E">
  3882. <compile files="GenericAspectE.aj" options="-1.9"/>
  3883. <run class="GenericAspectE"/>
  3884. </ajc-test>
  3885. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - F">
  3886. <compile files="GenericAspectF.aj" options="-1.9"/>
  3887. <run class="GenericAspectF"/>
  3888. </ajc-test>
  3889. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - G">
  3890. <compile files="GenericAspectG.aj" options="-1.9"/>
  3891. <run class="GenericAspectG"/>
  3892. </ajc-test>
  3893. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - H">
  3894. <compile files="GenericAspectH.aj" options="-1.9">
  3895. <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"/>
  3896. <!-- see pr133307, shame about this -->
  3897. <!--message kind="error" line="16" text="The method m4(String) is undefined for the type Base"/-->
  3898. </compile>
  3899. </ajc-test>
  3900. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - I">
  3901. <compile files="GenericAspectI.aj" options="-1.9"/>
  3902. <run class="GenericAspectI"/>
  3903. </ajc-test>
  3904. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - J">
  3905. <compile files="GenericAspectJ.aj" options="-1.9"/>
  3906. <run class="GenericAspectJ"/>
  3907. </ajc-test>
  3908. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - K">
  3909. <compile files="GenericAspectK.aj" options="-1.9">
  3910. <message kind="error" line="7" text="B does not meet the specification for type parameter 1 (L extends java.lang.Number) in generic type GenericAspect$SimpleI"/>
  3911. <message kind="error" line="16" text="The method m4(String) is undefined for the type Base"/>
  3912. </compile>
  3913. </ajc-test>
  3914. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - K2">
  3915. <compile files="GenericAspectK2.aj" options="-1.9">
  3916. <message kind="error" line="13" text="The type String is not a valid substitute"/>
  3917. </compile>
  3918. </ajc-test>
  3919. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - L">
  3920. <compile files="GenericAspectL.aj" options="-1.9"/>
  3921. <run class="GenericAspectL"/>
  3922. </ajc-test>
  3923. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - M">
  3924. <compile files="GenericAspectM.aj" options="-1.9">
  3925. <message kind="error" line="23" text="The method m0(Integer) in the type GenericAspect.SimpleI&lt;Integer&gt; is not applicable for the arguments (String)"/>
  3926. <message kind="error" line="24" text="The method m1(List&lt;Integer&gt;) in the type GenericAspect.SimpleI&lt;Integer&gt; is not applicable for the arguments (List&lt;String&gt;)"/>
  3927. <message kind="error" line="25" text="Type mismatch: cannot convert from String to Integer"/>
  3928. <message kind="error" line="26" text="Type mismatch: cannot convert from List&lt;String&gt; to List&lt;Integer&gt;"/>
  3929. </compile>
  3930. </ajc-test>
  3931. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - N">
  3932. <compile files="GenericAspectN.aj" options="-1.9"/>
  3933. <run class="GenericAspectN"/>
  3934. </ajc-test>
  3935. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - O">
  3936. <compile files="GenericAspectO.aj" options="-1.9">
  3937. <message kind="error" line="24" text="Cannot make a static reference to the non-static field Bottom.parent"/>
  3938. <message kind="error" line="26" text="The method add(Bottom) in the type List&lt;Bottom&gt; is not applicable for the arguments (Top)"/>
  3939. <message kind="error" line="27" text="Cannot make a static reference to the non-static field Top.children"/>
  3940. </compile>
  3941. </ajc-test>
  3942. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - P">
  3943. <compile files="GenericAspectP.aj" options="-1.9"/>
  3944. <run class="GenericAspectP"/>
  3945. </ajc-test>
  3946. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - Q">
  3947. <compile files="GenericAspectQ.aj" options="-1.9"/>
  3948. <run class="GenericAspectQ"/>
  3949. </ajc-test>
  3950. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - R">
  3951. <compile files="GenericAspectR.aj" options="-1.9"/>
  3952. <run class="GenericAspectR"/>
  3953. </ajc-test>
  3954. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - S">
  3955. <compile files="GenericAspectS.aj" options="-1.9"/>
  3956. <run class="GenericAspectS"/>
  3957. </ajc-test>
  3958. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - T">
  3959. <compile files="GenericAspectT.aj" options="-1.9"/>
  3960. </ajc-test>
  3961. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - U">
  3962. <compile files="GenericAspectU.aj" options="-1.9"/>
  3963. <run class="GenericAspectU"/>
  3964. </ajc-test>
  3965. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - V">
  3966. <compile files="GenericAspectV.aj" options="-1.9"/>
  3967. <run class="GenericAspectV"/>
  3968. </ajc-test>
  3969. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - W">
  3970. <compile files="GenericAspectW.aj" options="-1.9"/>
  3971. <run class="GenericAspectW"/>
  3972. </ajc-test>
  3973. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - X">
  3974. <compile files="GenericAspectX.aj" options="-1.9"/>
  3975. <run class="GenericAspectX"/>
  3976. </ajc-test>
  3977. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - Y">
  3978. <compile files="GenericAspectY.aj" options="-1.9 -showWeaveInfo">
  3979. <message kind="weave" text="Join point 'method-execution(void ParentChildRelationship$ParentHasChildren.addChild(C))' in Type 'ParentChildRelationship' (GenericAspectY.aj:53) advised by before advice from 'GenericAspectY' (GenericAspectY.aj:101) [with runtime test]"/>
  3980. <message kind="weave" text="Extending interface set for type 'Top' (GenericAspectY.aj) to include 'ParentChildRelationship$ParentHasChildren&lt;Bottom&gt;' (GenericAspectY.aj)"/>
  3981. <message kind="weave" text="Type 'Top' (GenericAspectY.aj) has intertyped field from 'ParentChildRelationship' (GenericAspectY.aj:'java.util.List&lt;Bottom&gt; ParentChildRelationship$ParentHasChildren.children')"/>
  3982. <message kind="weave" text="Type 'Top' (GenericAspectY.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectY.aj:'java.util.List&lt;Bottom&gt; ParentChildRelationship$ParentHasChildren.getChildren()')"/>
  3983. <message kind="weave" text="Type 'Top' (GenericAspectY.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectY.aj:'void ParentChildRelationship$ParentHasChildren.addChild(Bottom)')"/>
  3984. <message kind="weave" text="Type 'Top' (GenericAspectY.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectY.aj:'void ParentChildRelationship$ParentHasChildren.removeChild(Bottom)')"/>
  3985. <message kind="weave" text="Type 'ParentChildRelationship$ParentHasChildren' (GenericAspectY.aj) has intertyped field from 'ParentChildRelationship' (GenericAspectY.aj:'java.util.List&lt;C&gt; ParentChildRelationship$ParentHasChildren.children')"/>
  3986. <message kind="weave" text="Type 'ParentChildRelationship$ParentHasChildren' (GenericAspectY.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectY.aj:'java.util.List&lt;C&gt; ParentChildRelationship$ParentHasChildren.getChildren()')"/>
  3987. <message kind="weave" text="Type 'ParentChildRelationship$ParentHasChildren' (GenericAspectY.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectY.aj:'void ParentChildRelationship$ParentHasChildren.addChild(C)')"/>
  3988. <message kind="weave" text="Type 'ParentChildRelationship$ParentHasChildren' (GenericAspectY.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectY.aj:'void ParentChildRelationship$ParentHasChildren.removeChild(C)')"/>
  3989. <message kind="weave" text="Type 'ParentChildRelationship$ChildHasParent' (GenericAspectY.aj) has intertyped field from 'ParentChildRelationship' (GenericAspectY.aj:'P ParentChildRelationship$ChildHasParent.parent')"/>
  3990. <message kind="weave" text="Type 'ParentChildRelationship$ChildHasParent' (GenericAspectY.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectY.aj:'P ParentChildRelationship$ChildHasParent.getParent()')"/>
  3991. <message kind="weave" text="Type 'ParentChildRelationship$ChildHasParent' (GenericAspectY.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectY.aj:'void ParentChildRelationship$ChildHasParent.setParent(P)')"/>
  3992. <message kind="weave" text="Extending interface set for type 'Bottom' (GenericAspectY.aj) to include 'ParentChildRelationship$ChildHasParent&lt;Top&gt;' (GenericAspectY.aj)"/>
  3993. <message kind="weave" text="Type 'Bottom' (GenericAspectY.aj) has intertyped field from 'ParentChildRelationship' (GenericAspectY.aj:'Top ParentChildRelationship$ChildHasParent.parent')"/>
  3994. <message kind="weave" text="Type 'Bottom' (GenericAspectY.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectY.aj:'Top ParentChildRelationship$ChildHasParent.getParent()')"/>
  3995. <message kind="weave" text="Type 'Bottom' (GenericAspectY.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectY.aj:'void ParentChildRelationship$ChildHasParent.setParent(Top)')"/>
  3996. </compile>
  3997. <run class="GenericAspectY"/>
  3998. </ajc-test>
  3999. <ajc-test dir="java5/generics/genericaspects/" title="uberaspects - Z">
  4000. <compile files="GenericAspectZ.aj" options="-1.9 -showWeaveInfo">
  4001. <message kind="weave" text="Join point 'method-execution(void ParentChildRelationship$ParentHasChildren.addChild(C))' in Type 'ParentChildRelationship' (GenericAspectZ.aj:53) advised by before advice from 'GenericAspectZ' (GenericAspectZ.aj:95) [with runtime test]"/>
  4002. <message kind="weave" text="Join point 'method-execution(void ParentChildRelationship$ParentHasChildren.removeChild(C))' in Type 'ParentChildRelationship' (GenericAspectZ.aj:65) advised by before advice from 'GenericAspectZ' (GenericAspectZ.aj:96) [with runtime test]"/>
  4003. <message kind="weave" text="Extending interface set for type 'Top' (GenericAspectZ.aj) to include 'ParentChildRelationship$ParentHasChildren&lt;Bottom&gt;' (GenericAspectZ.aj)"/>
  4004. <message kind="weave" text="Type 'Top' (GenericAspectZ.aj) has intertyped field from 'ParentChildRelationship' (GenericAspectZ.aj:'java.util.List&lt;Bottom&gt; ParentChildRelationship$ParentHasChildren.children')"/>
  4005. <message kind="weave" text="Type 'Top' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'java.util.List&lt;Bottom&gt; ParentChildRelationship$ParentHasChildren.getChildren()')"/>
  4006. <message kind="weave" text="Type 'Top' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'void ParentChildRelationship$ParentHasChildren.addChild(Bottom)')"/>
  4007. <message kind="weave" text="Type 'Top' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'void ParentChildRelationship$ParentHasChildren.removeChild(Bottom)')"/>
  4008. <message kind="weave" text="Type 'ParentChildRelationship$ParentHasChildren' (GenericAspectZ.aj) has intertyped field from 'ParentChildRelationship' (GenericAspectZ.aj:'java.util.List&lt;C&gt; ParentChildRelationship$ParentHasChildren.children')"/>
  4009. <message kind="weave" text="Type 'ParentChildRelationship$ParentHasChildren' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'java.util.List&lt;C&gt; ParentChildRelationship$ParentHasChildren.getChildren()')"/>
  4010. <message kind="weave" text="Type 'ParentChildRelationship$ParentHasChildren' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'void ParentChildRelationship$ParentHasChildren.addChild(C)')"/>
  4011. <message kind="weave" text="Type 'ParentChildRelationship$ParentHasChildren' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'void ParentChildRelationship$ParentHasChildren.removeChild(C)')"/>
  4012. <message kind="weave" text="Type 'ParentChildRelationship$ChildHasParent' (GenericAspectZ.aj) has intertyped field from 'ParentChildRelationship' (GenericAspectZ.aj:'P ParentChildRelationship$ChildHasParent.parent')"/>
  4013. <message kind="weave" text="Type 'ParentChildRelationship$ChildHasParent' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'P ParentChildRelationship$ChildHasParent.getParent()')"/>
  4014. <message kind="weave" text="Type 'ParentChildRelationship$ChildHasParent' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'void ParentChildRelationship$ChildHasParent.setParent(P)')"/>
  4015. <message kind="weave" text="Extending interface set for type 'Bottom' (GenericAspectZ.aj) to include 'ParentChildRelationship$ChildHasParent&lt;Top&gt;' (GenericAspectZ.aj)"/>
  4016. <message kind="weave" text="Type 'Bottom' (GenericAspectZ.aj) has intertyped field from 'ParentChildRelationship' (GenericAspectZ.aj:'Top ParentChildRelationship$ChildHasParent.parent')"/>
  4017. <message kind="weave" text="Type 'Bottom' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'Top ParentChildRelationship$ChildHasParent.getParent()')"/>
  4018. <message kind="weave" text="Type 'Bottom' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'void ParentChildRelationship$ChildHasParent.setParent(Top)')"/>
  4019. <!--message kind="weave" text="Extending interface set for type 'Top' (GenericAspectZ.aj) to include 'ParentChildRelationship$ParentHasChildren&lt;Bottom&gt;' (GenericAspectZ.aj)"/>
  4020. <message kind="weave" text="Type 'Top' (GenericAspectZ.aj) has intertyped field from 'ParentChildRelationship' (GenericAspectZ.aj:'java.util.List&lt;C&gt; ParentChildRelationship$ParentHasChildren.children')"/>
  4021. <message kind="weave" text="Type 'Top' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'java.util.List&lt;C&gt; ParentChildRelationship$ParentHasChildren.getChildren()')"/>
  4022. <message kind="weave" text="Type 'Top' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'void ParentChildRelationship$ParentHasChildren.addChild(C)')"/>
  4023. <message kind="weave" text="Type 'Top' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'void ParentChildRelationship$ParentHasChildren.removeChild(C)')"/>
  4024. <message kind="weave" text="Type 'ParentChildRelationship$ParentHasChildren' (GenericAspectZ.aj) has intertyped field from 'ParentChildRelationship' (GenericAspectZ.aj:'java.util.List&lt;C&gt; ParentChildRelationship$ParentHasChildren.children')"/>
  4025. <message kind="weave" text="Type 'ParentChildRelationship$ParentHasChildren' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'java.util.List&lt;C&gt; ParentChildRelationship$ParentHasChildren.getChildren()')"/>
  4026. <message kind="weave" text="Type 'ParentChildRelationship$ParentHasChildren' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'void ParentChildRelationship$ParentHasChildren.addChild(C)')"/>
  4027. <message kind="weave" text="Type 'ParentChildRelationship$ParentHasChildren' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'void ParentChildRelationship$ParentHasChildren.removeChild(C)')"/>
  4028. <message kind="weave" text="Type 'ParentChildRelationship$ChildHasParent' (GenericAspectZ.aj) has intertyped field from 'ParentChildRelationship' (GenericAspectZ.aj:'ParentChildRelationship$ParentHasChildren ParentChildRelationship$ChildHasParent.parent')"/>
  4029. <message kind="weave" text="Type 'ParentChildRelationship$ChildHasParent' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'ParentChildRelationship$ParentHasChildren ParentChildRelationship$ChildHasParent.getParent()')"/>
  4030. <message kind="weave" text="Type 'ParentChildRelationship$ChildHasParent' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'void ParentChildRelationship$ChildHasParent.setParent(P)')"/>
  4031. <message kind="weave" text="Extending interface set for type 'Bottom' (GenericAspectZ.aj) to include 'ParentChildRelationship$ChildHasParent&lt;Top&gt;' (GenericAspectZ.aj)"/>
  4032. <message kind="weave" text="Type 'Bottom' (GenericAspectZ.aj) has intertyped field from 'ParentChildRelationship' (GenericAspectZ.aj:'ParentChildRelationship$ParentHasChildren ParentChildRelationship$ChildHasParent.parent')"/>
  4033. <message kind="weave" text="Type 'Bottom' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'ParentChildRelationship$ParentHasChildren ParentChildRelationship$ChildHasParent.getParent()')"/>
  4034. <message kind="weave" text="Type 'Bottom' (GenericAspectZ.aj) has intertyped method from 'ParentChildRelationship' (GenericAspectZ.aj:'void ParentChildRelationship$ChildHasParent.setParent(P)')"/-->
  4035. </compile>
  4036. <run class="GenericAspectZ"/>
  4037. </ajc-test>
  4038. <ajc-test dir="java5/generics/binaryBridging" title="binary bridge methods - two">
  4039. <compile files="TwoA.java" outjar="twoa.jar" options="-1.9"/>
  4040. <compile files="TwoB.java" outjar="twob.jar" options="-1.9"/>
  4041. <compile files="TwoX.java" inpath="twoa.jar,twob.jar" options="-1.9"/>
  4042. </ajc-test>
  4043. <ajc-test dir="java5/generics/itds/sharing" title="method itd sharing type variable with generic type">
  4044. <compile files="Simple.aj" options="-1.9"/>
  4045. <run class="Simple"/>
  4046. </ajc-test>
  4047. <ajc-test dir="java5/generics/itds/sharing" title="field itd sharing type variable with generic type">
  4048. <compile files="Simple2.aj" options="-1.9"/>
  4049. <run class="Simple2"/>
  4050. </ajc-test>
  4051. <ajc-test dir="java5/generics/itds" title="non static generic method itd - 2">
  4052. <compile files="NonstaticGenericCtorITD2.aj" options="-1.9"/>
  4053. <run class="NonstaticGenericCtorITD2"/>
  4054. </ajc-test>
  4055. <ajc-test dir="java5/generics/itds" title="reusing type variable letters">
  4056. <compile files="ReusingLetters.aj" options="-1.9"/>
  4057. <run class="ReusingLetters"/>
  4058. </ajc-test>
  4059. <ajc-test dir="java5/generics/itds" title="multiple generic itds in one file">
  4060. <compile files="BizarroSignatures.aj" options="-1.9"/>
  4061. <run class="BizarroSignatures"/>
  4062. </ajc-test>
  4063. <ajc-test dir="java5/generics/itds" title="generic intertype field declaration, sharing type variable">
  4064. <compile files="FieldITDOnGenericType.aj" options="-1.9"/>
  4065. <run class="FieldITDOnGenericType">
  4066. <stderr>
  4067. <line text=">42"/>
  4068. </stderr>
  4069. </run>
  4070. </ajc-test>
  4071. <ajc-test dir="java5/generics/itds" title="Parsing generic ITDs - 1">
  4072. <compile files="Parse1.java" options="-1.9"/>
  4073. </ajc-test>
  4074. <ajc-test dir="java5/generics/itds" title="Parsing generic ITDs - 2">
  4075. <compile files="Parse2.java" options="-1.9"/>
  4076. </ajc-test>
  4077. <ajc-test dir="java5/generics/itds" title="Parsing generic ITDs - 3">
  4078. <compile files="Parse3.java" options="-1.9"/>
  4079. </ajc-test>
  4080. <ajc-test dir="java5/generics/itds" title="Parsing generic ITDs - 4">
  4081. <compile files="Parse4.java" options="-1.9"/>
  4082. </ajc-test>
  4083. <ajc-test dir="java5/generics/itds" title="Parsing generic ITDs - 5">
  4084. <compile files="Parse5.java" options="-1.9">
  4085. <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."/>
  4086. <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."/>
  4087. <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."/>
  4088. </compile>
  4089. </ajc-test>
  4090. <ajc-test dir="java5/generics/itds" title="Parsing generic ITDs - 6">
  4091. <compile files="Parse6.java" options="-1.9"/>
  4092. </ajc-test>
  4093. <!-- end of generic ITDs -->
  4094. <!-- generic decps -->
  4095. <ajc-test dir="java5/generics/decp" title="generic decp - simple">
  4096. <compile files="Basic.aj" options="-1.9"/>
  4097. <run class="Basic"/>
  4098. </ajc-test>
  4099. <ajc-test dir="java5/generics/decp" title="generic decp - implementing two variants #1">
  4100. <compile files="Basic2.aj" options="-1.9">
  4101. <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"/>
  4102. </compile>
  4103. </ajc-test>
  4104. <ajc-test dir="java5/generics/decp" title="generic decp - implementing two variants #2">
  4105. <compile files="Basic2b.aj" options="-1.9">
  4106. <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"/>
  4107. </compile>
  4108. </ajc-test>
  4109. <ajc-test dir="java5/generics/decp" title="generic decp - implementing two variants #3">
  4110. <compile files="Basic2c.aj" options="-1.9">
  4111. <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"/>
  4112. </compile>
  4113. </ajc-test>
  4114. <ajc-test dir="java5/generics/decp" title="generic decp - implementing two variants #4">
  4115. <compile files="Basic2d.aj" options="-1.9"/>
  4116. </ajc-test>
  4117. <ajc-test dir="java5/generics/decp/binary" title="generic decp binary - implementing two variants #1">
  4118. <weave classesFiles="Base1.java" aspectsFiles="Asp1.aj" options="-1.9,-showWeaveInfo">
  4119. <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"/>
  4120. </weave>
  4121. </ajc-test>
  4122. <ajc-test dir="java5/generics/decp/binary" title="generic decp binary - implementing two variants #2">
  4123. <weave classesFiles="Base2.java" aspectsFiles="Asp2.aj" options="-1.9,-showWeaveInfo">
  4124. <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"/>
  4125. </weave>
  4126. </ajc-test>
  4127. <ajc-test dir="java5/generics/decp/binary" title="generic decp binary - implementing two variants #3">
  4128. <weave classesFiles="Base3.java" aspectsFiles="Asp3.aj" options="-1.9,-showWeaveInfo">
  4129. <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"/>
  4130. </weave>
  4131. </ajc-test>
  4132. <ajc-test dir="java5/generics/decp/binary" title="generic decp binary - implementing two variants #4">
  4133. <weave classesFiles="Base4.java" aspectsFiles="Asp4.aj" options="-1.9,-showWeaveInfo"/>
  4134. </ajc-test>
  4135. <ajc-test dir="java5/generics/decp" title="generic decp - incorrect number of type parameters">
  4136. <compile files="Basic3.aj" options="-1.9">
  4137. <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)"/>
  4138. </compile>
  4139. </ajc-test>
  4140. <ajc-test dir="java5/generics/decp" title="generic decp - specifying bounds">
  4141. <compile files="Basic4.aj" options="-1.9"/>
  4142. <run class="Basic4"/>
  4143. </ajc-test>
  4144. <ajc-test dir="java5/generics/decp" title="generic decp - specifying bounds but breaking them">
  4145. <compile files="Basic5.aj" options="-1.9">
  4146. <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"/>
  4147. </compile>
  4148. </ajc-test>
  4149. <ajc-test dir="java5/generics/decp" title="generic decp - with parameterized on the target">
  4150. <compile files="Basic6.aj" options="-1.9,-showWeaveInfo">
  4151. <message kind="weave" text="Extending interface set for type 'Basic6' (Basic6.aj) to include 'K&lt;java.lang.Integer&gt;' (Basic6.aj)"/>
  4152. </compile>
  4153. <run class="Basic6"/>
  4154. </ajc-test>
  4155. <!-- end of generic decps -->
  4156. <!-- generics/itds and binary weaving -->
  4157. <ajc-test dir="java5/generics/itds/binaryweaving" vm="1.5" title="binary weaving ITDs - A">
  4158. <compile files="TestA_generictype.java" outjar="code.jar" options="-1.9"/>
  4159. <compile files="TestA_aspect.aj,TestA_class.java" inpath="code.jar" options="-1.9"/>
  4160. <run class="TestA_class"/>
  4161. </ajc-test>
  4162. <ajc-test dir="java5/generics/itds/binaryweaving" vm="1.5" title="binary weaving ITDs - B">
  4163. <compile files="TestB_generictype.java" outjar="code.jar" options="-1.9"/>
  4164. <compile files="TestB_aspect1.aj,TestB_aspect2.aj,TestB_class.java" inpath="code.jar" options="-1.9"/>
  4165. <run class="TestB_class"/>
  4166. </ajc-test>
  4167. <ajc-test dir="java5/generics/itds/binaryweaving" vm="1.5" title="binary weaving ITDs - 1">
  4168. <compile files="BaseClass.java" outjar="code.jar" options="-1.9"/>
  4169. <compile files="A1.aj" inpath="code.jar" options="-1.9"/>
  4170. <run class="BaseClass">
  4171. <stderr>
  4172. <line text="Advice count=1"/>
  4173. </stderr>
  4174. </run>
  4175. </ajc-test>
  4176. <ajc-test dir="java5/generics/itds/binaryweaving" vm="1.5" title="binary weaving ITDs - 2">
  4177. <compile files="BaseClass.java,A1.aj" outjar="code.jar" options="-1.9,-showWeaveInfo">
  4178. <message kind="weave" text="Type 'BaseClass' (BaseClass.java) has intertyped field from 'A1' (A1.aj:'java.util.List&lt;java.lang.String&gt; BaseClass.list1')"/>
  4179. <message kind="weave" text="Type 'BaseClass' (BaseClass.java:12) advised by after advice from 'A1' (A1.aj:7)"/>
  4180. </compile>
  4181. <compile files="A2.aj" inpath="code.jar" options="-1.9,-showWeaveInfo">
  4182. <message kind="weave" text="Type 'BaseClass' (BaseClass.java) has intertyped field from 'A1' (A1.aj:'java.util.List&lt;java.lang.String&gt; BaseClass.list1')"/>
  4183. <message kind="weave" text="Type 'BaseClass' (BaseClass.java:12) advised by after advice from 'A1' (code.jar!A1.class:7(from A1.aj))"/>
  4184. <message kind="weave" text="Type 'BaseClass' (BaseClass.java) has intertyped field from 'A2' (A2.aj:'java.util.List&lt;N&gt; BaseClass.list2')"/>
  4185. <message kind="weave" text="Type 'BaseClass' (BaseClass.java:13) advised by after advice from 'A2' (A2.aj:8)"/>
  4186. </compile>
  4187. <run class="BaseClass">
  4188. <stderr>
  4189. <line text="Advice count=2"/>
  4190. </stderr>
  4191. </run>
  4192. </ajc-test>
  4193. <ajc-test dir="java5/generics/itds/binaryweaving" vm="1.5" title="binary weaving ITDs - 3">
  4194. <compile files="BaseClass.java,A1.aj,A2.aj" outjar="code.jar" options="-1.9"/>
  4195. <compile files="A3.aj" inpath="code.jar" options="-1.9"/>
  4196. <run class="BaseClass">
  4197. <stderr>
  4198. <line text="Advice count=3"/>
  4199. </stderr>
  4200. </run>
  4201. </ajc-test>
  4202. <!-- end of generics/itds and binary weaving -->
  4203. <!-- generics/itds and bridge methods -->
  4204. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridge methods - 1">
  4205. <compile files="Sub1.java,Super1.java,X1.aj" options="-1.9"/>
  4206. <run class="X1"/>
  4207. </ajc-test>
  4208. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridge methods - 1 - binary">
  4209. <compile files="Sub1.java,Super1.java" outjar="code.jar" options="-1.9"/>
  4210. <compile files="X1.aj" inpath="code.jar" options ="-1.9"/>
  4211. <run class="X1"/>
  4212. </ajc-test>
  4213. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridge methods - 2">
  4214. <compile files="Sub2.java,Super2.java,X2.aj" options="-1.9"/>
  4215. <run class="X2"/>
  4216. </ajc-test>
  4217. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridge methods - 2 - binary">
  4218. <compile files="Sub2.java,Super2.java" outjar="code.jar" options="-1.9"/>
  4219. <compile files="X2.aj,Util.java" inpath="code.jar" options ="-1.9"/>
  4220. <run class="X2"/>
  4221. </ajc-test>
  4222. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridge methods - 3">
  4223. <compile files="Sub3.java,Super3.java,X3.aj" options="-1.9"/>
  4224. <run class="X3"/>
  4225. </ajc-test>
  4226. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridge methods - 3 - binary">
  4227. <compile files="Sub3.java,Super3.java" outjar="code.jar" options="-1.9"/>
  4228. <compile files="X3.aj" inpath="code.jar" options ="-1.9"/>
  4229. <run class="X3"/>
  4230. </ajc-test>
  4231. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridge methods - 4">
  4232. <compile files="Sub4.java,Super4.java,X4.aj" options="-1.9"/>
  4233. <run class="X4"/>
  4234. </ajc-test>
  4235. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridge methods - 4 - binary">
  4236. <compile files="Sub4.java,Super4.java" outjar="code.jar" options="-1.9"/>
  4237. <compile files="X4.aj" inpath="code.jar" options ="-1.9"/>
  4238. <run class="X4"/>
  4239. </ajc-test>
  4240. <ajc-test dir="java5/generics/binaryBridging" title="binary bridge methods - one">
  4241. <compile files="OneA.java" outjar="onea.jar" options="-1.9"/>
  4242. <compile files="OneB.java" outjar="oneb.jar" options="-1.9"/>
  4243. <compile files="OneX.java" inpath="onea.jar,oneb.jar" options="-1.9"/>
  4244. </ajc-test>
  4245. <ajc-test dir="java5/generics/binaryBridging" title="binary bridge methods - two">
  4246. <compile files="TwoA.java" outjar="twoa.jar" options="-1.9"/>
  4247. <compile files="TwoB.java" outjar="twob.jar" options="-1.9"/>
  4248. <compile files="TwoX.java" inpath="twoa.jar,twob.jar" options="-1.9"/>
  4249. </ajc-test>
  4250. <ajc-test dir="java5/generics/binaryBridging" title="binary bridge methods - three">
  4251. <compile files="ThreeA.java" outjar="threea.jar" options="-1.9"/>
  4252. <compile files="ThreeB.java" outjar="threeb.jar" options="-1.9"/>
  4253. <compile files="ThreeX.java" inpath="threea.jar,threeb.jar" options="-1.9"/>
  4254. </ajc-test>
  4255. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="abstract intertype methods and covariant returns">
  4256. <compile files="pr91381.aj" options="-1.9"/>
  4257. <run class="pr91381"/>
  4258. </ajc-test>
  4259. <ajc-test dir="java5/generics/itds/bridgeMethods" title="abstract intertype methods and covariant returns - error">
  4260. <compile files="pr91381_2.aj" options="-1.4">
  4261. <message kind="error" line="15" text="The return type is incompatible with A.foo()"/>
  4262. </compile>
  4263. </ajc-test>
  4264. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridging with covariance 1 - normal">
  4265. <compile files="Bridging1.aj,Util.java" options="-1.9"/>
  4266. <run class="Bridging1">
  4267. <stderr>
  4268. <line text="Number of methods defined for D is 2"/>
  4269. <line text="C D.method1() [BridgeMethod]"/>
  4270. <line text="D D.method1()"/>
  4271. </stderr>
  4272. </run>
  4273. </ajc-test>
  4274. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridging with covariance 1 - itd">
  4275. <compile files="BridgingITD1.aj,Util.java" options="-1.9"/>
  4276. <run class="BridgingITD1">
  4277. <stderr>
  4278. <line text="Number of methods defined for D is 2"/>
  4279. <line text="C D.method1() [BridgeMethod]"/>
  4280. <line text="D D.method1()"/>
  4281. </stderr>
  4282. </run>
  4283. </ajc-test>
  4284. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="basic bridging with type vars - 1 - normal">
  4285. <compile files="Bridging2.aj,Util.java" options="-1.9"/>
  4286. <run class="Bridging2">
  4287. <stderr>
  4288. <line text="Number of methods defined for D is 2"/>
  4289. <line text="java.lang.Object D.next() [BridgeMethod]"/>
  4290. <line text="java.lang.String D.next()"/>
  4291. </stderr>
  4292. </run>
  4293. </ajc-test>
  4294. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="basic bridging with type vars - 1 - itd">
  4295. <compile files="BridgingITD2.aj,Util.java" options="-1.9"/>
  4296. <run class="BridgingITD2">
  4297. <stderr>
  4298. <line text="Number of methods defined for D is 2"/>
  4299. <line text="java.lang.Object D.next() [BridgeMethod]"/>
  4300. <line text="java.lang.String D.next()"/>
  4301. </stderr>
  4302. </run>
  4303. </ajc-test>
  4304. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="basic bridging with type vars - 2 - normal">
  4305. <compile files="Bridging3.aj,Util.java" options="-1.9"/>
  4306. <run class="Bridging3">
  4307. <stderr>
  4308. <line text="Number of methods defined for D is 2"/>
  4309. <line text="java.lang.Object D.id(java.lang.Object) [BridgeMethod]"/>
  4310. <line text="java.lang.String D.id(java.lang.String)"/>
  4311. </stderr>
  4312. </run>
  4313. </ajc-test>
  4314. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="basic bridging with type vars - 2 - itd">
  4315. <compile files="BridgingITD3.aj,Util.java" options="-1.9"/>
  4316. <run class="BridgingITD3">
  4317. <stderr>
  4318. <line text="Number of methods defined for D is 2"/>
  4319. <line text="java.lang.Object D.id(java.lang.Object) [BridgeMethod]"/>
  4320. <line text="java.lang.String D.id(java.lang.String)"/>
  4321. </stderr>
  4322. </run>
  4323. </ajc-test>
  4324. <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="Abstract intertype method and covariant returns" pr="91381">
  4325. <compile files="pr91381.aj" options="-1.9,-showWeaveInfo">
  4326. <message kind="weave" text="Type 'A' (pr91381.aj) has intertyped method from 'pr91381' (pr91381.aj:'java.lang.Object A.foo()')"/>
  4327. </compile>
  4328. <run class="pr91381"/>
  4329. </ajc-test>
  4330. <!-- end of generics/itds and bridge methods -->
  4331. <!-- generics and pointcuts -->
  4332. <ajc-test dir="java5/generics/pointcuts" title="handler pcd and generics / type vars">
  4333. <compile files="GenericInterface.java,HandlerPointcutTests.aj" options="-1.9">
  4334. <message kind="error" line="4" text="Syntax error on token"/>
  4335. <message kind="error" line="8" text="a parameterized type pattern may not be used in a handler pointcut expression"/>
  4336. <message kind="warning" line="8" text="no match for this type name: T"/>
  4337. <message kind="error" line="11" text="a parameterized type pattern may not be used in a handler pointcut expression"/>
  4338. </compile>
  4339. </ajc-test>
  4340. <ajc-test dir="java5/generics/pointcuts" title="pointcuts that dont allow type vars">
  4341. <compile files="PointcutsThatDontAllowTypeVars.aj" options="-1.9">
  4342. <message kind="error" line="3" text="Syntax error on token"/>
  4343. <message kind="error" line="5" text="Syntax error on token"/>
  4344. <message kind="error" line="7" text="Syntax error on token"/>
  4345. <message kind="error" line="9" text="Syntax error on token"/>
  4346. <message kind="error" line="11" text="Syntax error on token"/>
  4347. <message kind="error" line="13" text="Syntax error on token"/>
  4348. <message kind="error" line="15" text="Syntax error on token"/>
  4349. <message kind="error" line="17" text="Syntax error on token"/>
  4350. <message kind="error" line="19" text="Syntax error on token"/>
  4351. <message kind="error" line="21" text="Syntax error on token"/>
  4352. <message kind="error" line="23" text="Syntax error on token"/>
  4353. <message kind="error" line="25" text="Syntax error on token"/>
  4354. <message kind="error" line="27" text="Syntax error on token"/>
  4355. </compile>
  4356. </ajc-test>
  4357. <ajc-test dir="java5/generics/pointcuts" title="annotation pcds with parameterized types">
  4358. <compile files="ParameterizedTypesInAtPCDs.aj" options="-1.9">
  4359. <message kind="error" line="3" text="Syntax error on token"/>
  4360. <message kind="error" line="5" text="Syntax error on token"/>
  4361. <message kind="error" line="7" text="Syntax error on token"/>
  4362. <message kind="error" line="9" text="Syntax error on token"/>
  4363. <message kind="error" line="11" text="Syntax error on token"/>
  4364. <message kind="error" line="13" text="Syntax error on token"/>
  4365. </compile>
  4366. </ajc-test>
  4367. <ajc-test dir="java5/generics/pointcuts" title="annotation patterns with parameterized types">
  4368. <compile files="ParameterizedTypesInAnnotationPatterns.aj" options="-1.9">
  4369. <message kind="error" line="5" text="is not an annotation type"/>
  4370. </compile>
  4371. </ajc-test>
  4372. <ajc-test dir="java5/generics/pointcuts" title="staticinitialization and parameterized types">
  4373. <compile files="GenericInterface.java,GenericImplementingClass.java,StaticInitializationWithParameterizedTypes.aj" options="-1.9">
  4374. <message kind="error" line="4" text="no static initialization join points for parameterized types, use raw type instead"/>
  4375. <message kind="error" line="6" text="no static initialization join points for parameterized types, use raw type instead"/>
  4376. <message kind="error" line="9" text="no static initialization join points for parameterized types, use raw type instead"/>
  4377. <message kind="error" line="11" text="no static initialization join points for parameterized types, use raw type instead"/>
  4378. <message kind="error" line="14" text="no static initialization join points for parameterized types, use raw type instead"/>
  4379. </compile>
  4380. </ajc-test>
  4381. <ajc-test dir="java5/generics/pointcuts" title="staticinitialization and parameterized type matching">
  4382. <compile files="GenericInterface.java,GenericImplementingClass.java,ConcreteImplementingClass.java,ConcreteExtendingClass.java,StaticInitializationWithParameterizedTypesMatching.aj" options="-1.9">
  4383. <message kind="warning" line="1" text="clinit(GenericInterface&lt;Double&gt;+)"/>
  4384. <message kind="warning" line="3" text="clinit(GenericInterface&lt;Double&gt;+)"/>
  4385. <message kind="warning" line="3" text="clinit(GenericImplementingClass&lt;Double&gt;+)"/>
  4386. <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"/>
  4387. <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)"/>
  4388. </compile>
  4389. </ajc-test>
  4390. <ajc-test dir="java5/generics/pointcuts" title="staticinitialization with generic types">
  4391. <compile files="GenericInterface.java,GenericImplementingClass.java,StaticInitializationWithGenericTypes.aj" options="-1.9">
  4392. <message kind="warning" line="1" text="one generic param, correct bounds"/>
  4393. <message kind="warning" line="1" text="doesn't matter what type variable name you use"/>
  4394. <message kind="warning" line="1" text="works with classes too"/>
  4395. <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"/>
  4396. <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)"/>
  4397. <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"/>
  4398. </compile>
  4399. </ajc-test>
  4400. <ajc-test dir="java5/generics/pointcuts" title="staticinitialization with generic types - advanced">
  4401. <compile files="StaticInitializationWithGenericTypesAdvanced.aj" options="-1.9">
  4402. <message kind="warning" line="76" text="simple match"/>
  4403. <message kind="warning" line="76" text="matches since R and R extends Object are equivalent"/>
  4404. <message kind="warning" line="63" text="raw type should match"/>
  4405. <message kind="warning" line="63" text="matches all bounds"/>
  4406. <message kind="warning" line="63" text="still matches with interfaces specified in a different order"/>
  4407. <message kind="warning" line="69" text="matches with type variable inter-dependencies"/>
  4408. <message kind="warning" line="76" text="matches any generic type with one unbound type var"/>
  4409. <message kind="warning" line="82" text="any generic type with one type var bound to Number or subtype"/>
  4410. <message kind="warning" line="63" text="matches a generic type with any upper bound and i/f bounds"/>
  4411. <message kind="warning" line="76" text="matches a generic type with any upper bound and i/f bounds"/>
  4412. <message kind="warning" line="82" text="matches a generic type with any upper bound and i/f bounds"/>
  4413. <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"/>
  4414. <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"/>
  4415. <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"/>
  4416. </compile>
  4417. </ajc-test>
  4418. <ajc-test dir="java5/generics/pointcuts" title="within pcd with various parameterizations and generic types - errors">
  4419. <compile files="WithinPointcutMatching.aj" options="-1.9">
  4420. <message kind="warning" line="4" text="no match for this type name: T"/>
  4421. <message kind="error" line="4" text="parameterized type pattern not supported by 'within', use a raw type pattern instead"/>
  4422. <message kind="error" line="5" text="parameterized type pattern not supported by 'within', use a raw type pattern instead"/>
  4423. <message kind="error" line="6" text="parameterized type pattern not supported by 'within', use a raw type pattern instead"/>
  4424. </compile>
  4425. </ajc-test>
  4426. <ajc-test dir="java5/generics/pointcuts" title="within pcd with various parameterizations and generic types - warnings">
  4427. <compile files="WithinPointcutMatchingWarnings.aj" options="-1.9">
  4428. <message kind="warning" line="16" text="matched set correctly"/>
  4429. <message kind="warning" line="18" text="matched execution correctly"/>
  4430. <message kind="warning" line="24" text="init matched correctly"/>
  4431. <message kind="warning" line="32" text="matched parameterization ok"/>
  4432. </compile>
  4433. </ajc-test>
  4434. <ajc-test dir="java5/generics/pointcuts" title="this and target with various parameterizations and generic types - errors">
  4435. <compile files="ThisAndTargetPointcutMatching.aj" options="-1.9">
  4436. <message kind="warning" line="4" text="no match for this type name: T"/>
  4437. <message kind="warning" line="5" text="no match for this type name: T"/>
  4438. <message kind="error" line="4" text="parameterized types not supported for this and target pointcuts (erasure limitation)"/>
  4439. <message kind="error" line="5" text="parameterized types not supported for this and target pointcuts (erasure limitation)"/>
  4440. <message kind="error" line="6" text="parameterized types not supported for this and target pointcuts (erasure limitation)"/>
  4441. <message kind="error" line="7" text="parameterized types not supported for this and target pointcuts (erasure limitation)"/>
  4442. </compile>
  4443. </ajc-test>
  4444. <ajc-test dir="java5/generics/pointcuts" title="this and target with various parameterizations and generic types - runtime">
  4445. <compile files="ThisAndTargetPointcutMatchingRuntime.aj" options="-1.9"/>
  4446. <run class="ThisAndTargetPointcutMatchingRuntime">
  4447. <stdout>
  4448. <line text="set and this matched ok"/>
  4449. <line text="set and target matched ok"/>
  4450. <line text="call and target matched ok"/>
  4451. <line text="execution and this matched ok"/>
  4452. <line text="execution and target matched ok"/>
  4453. <line text="parameterized call and target matched ok"/>
  4454. <line text="parameterized call and this matched ok"/>
  4455. <line text="parameterized call and target matched ok"/>
  4456. </stdout>
  4457. </run>
  4458. </ajc-test>
  4459. <ajc-test dir="java5/generics/pointcuts" title="get and set with various parameterizations and generic types - errors">
  4460. <compile files="GetAndSetPointcutMatching.aj" options="-1.9">
  4461. <message kind="warning" line="4" text="no match for this type name: T"/>
  4462. <message kind="warning" line="5" text="no match for this type name: T"/>
  4463. <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)"/>
  4464. <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)"/>
  4465. <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)"/>
  4466. <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)"/>
  4467. <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)"/>
  4468. </compile>
  4469. </ajc-test>
  4470. <ajc-test dir="java5/generics/pointcuts" title="get and set with various parameterizations and generic declaring types">
  4471. <compile files="GetAndSetPointcutMatchingDeclaringType.aj" options="-1.9">
  4472. <message kind="warning" line="15" text="generic/param get matching ok"/>
  4473. <message kind="warning" line="33" text="generic/param get matching ok"/>
  4474. <message kind="warning" line="12" text="generic/param set matching ok"/>
  4475. <message kind="warning" line="32" text="generic/param set matching ok"/>
  4476. </compile>
  4477. </ajc-test>
  4478. <ajc-test dir="java5/generics/pointcuts" title="get and set with various parameterizations and generic field types">
  4479. <compile files="GetAndSetPointcutMatchingFieldType.aj" options="-1.9">
  4480. <message kind="warning" line="13" text="raw field type matching in get ok"/>
  4481. <message kind="warning" line="14" text="raw field type matching in set ok"/>
  4482. <message kind="warning" line="49" text="erasure matching in get ok"/>
  4483. <message kind="warning" line="45" text="erasure matching in set ok"/>
  4484. <message kind="warning" line="53" text="erasure matching in get with params ok"/>
  4485. <message kind="warning" line="46" text="erasure matching in set with params ok"/>
  4486. <message kind="warning" line="72" text="parameterized type matching in set ok"/>
  4487. <message kind="warning" line="73" text="parameterized type matching in get ok"/>
  4488. <message kind="warning" line="74" text="parameterized type matching in set ok x2"/>
  4489. <message kind="warning" line="75" text="parameterized type matching in get ok x2"/>
  4490. <message kind="warning" line="83" text="wildcard set matching ok"/>
  4491. <message kind="warning" line="84" text="wildcard get matching ok"/>
  4492. <message kind="warning" line="85" text="wildcard extends set matching ok"/>
  4493. <message kind="warning" line="86" text="wildcard extends get matching ok"/>
  4494. <message kind="warning" line="87" text="wildcard super set matching ok"/>
  4495. <message kind="warning" line="88" text="wildcard super get matching ok"/>
  4496. <message kind="warning" line="73" text="the really wild show"/>
  4497. <message kind="warning" line="84" text="the really wild show"/>
  4498. <message kind="warning" line="86" text="the really wild show"/>
  4499. <message kind="warning" line="88" text="the really wild show"/>
  4500. <message kind="warning" line="53" text="the really wild show"/>
  4501. </compile>
  4502. </ajc-test>
  4503. <ajc-test dir="java5/generics/pointcuts" title="init and preinit with parameterized declaring types">
  4504. <compile files="InitializationPointcutMatching.aj" options="-1.9">
  4505. <message kind="warning" line="4" text="no match for this type name: T"/>
  4506. <message kind="warning" line="5" text="no match for this type name: T"/>
  4507. <message kind="error" line="4" text="no [pre]initialization join points for parameterized types, use raw type instead"/>
  4508. <message kind="error" line="5" text="no [pre]initialization join points for parameterized types, use raw type instead"/>
  4509. <message kind="error" line="6" text="no [pre]initialization join points for parameterized types, use raw type instead"/>
  4510. <message kind="error" line="7" text="no [pre]initialization join points for parameterized types, use raw type instead"/>
  4511. <message kind="error" line="8" text="no [pre]initialization join points for parameterized types, use raw type instead"/>
  4512. <message kind="error" line="9" text="invalid throws pattern: a generic class may not be a direct or indirect subclass of Throwable"/>
  4513. </compile>
  4514. </ajc-test>
  4515. <ajc-test dir="java5/generics/pointcuts" title="init and preinit with raw declaring type pattern">
  4516. <compile files="InitializationPointcutMatchingDeclaringType.aj" options="-1.9">
  4517. <message kind="warning" line="10" text="generic/param init matching ok"/>
  4518. <message kind="warning" line="10" text="generic/param preinit matching ok"/>
  4519. </compile>
  4520. </ajc-test>
  4521. <ajc-test dir="java5/generics/pointcuts" title="init and preinit with parameterized parameter types">
  4522. <compile files="InitializationPointcutMatchingParamTypes.aj" options="-1.9">
  4523. <message kind="warning" line="36" text="raw param type matching in init ok"/>
  4524. <message kind="warning" line="36" text="raw param type matching in preinit ok"/>
  4525. <message kind="warning" line="37" text="erasure matching in init ok"/>
  4526. <message kind="warning" line="37" text="erasure matching in preinit ok"/>
  4527. <message kind="warning" line="38" text="erasure matching in init with params ok"/>
  4528. <message kind="warning" line="38" text="erasure matching in preinit with params ok"/>
  4529. <message kind="warning" line="48" text="parameterized type matching in init ok"/>
  4530. <message kind="warning" line="48" text="parameterized type matching in preinit ok"/>
  4531. <message kind="warning" line="49" text="parameterized type matching in init ok x2"/>
  4532. <message kind="warning" line="49" text="parameterized type matching in preinit ok x2"/>
  4533. <message kind="warning" line="50" text="wildcard init matching ok"/>
  4534. <message kind="warning" line="50" text="wildcard preinit matching ok"/>
  4535. <message kind="warning" line="51" text="wildcard extends init matching ok"/>
  4536. <message kind="warning" line="51" text="wildcard extends preinit matching ok"/>
  4537. <message kind="warning" line="52" text="wildcard super init matching ok"/>
  4538. <message kind="warning" line="52" text="wildcard super preinit matching ok"/>
  4539. <message kind="warning" line="48" text="the really wild show"/>
  4540. <message kind="warning" line="50" text="the really wild show"/>
  4541. <message kind="warning" line="51" text="the really wild show"/>
  4542. <message kind="warning" line="52" text="the really wild show"/>
  4543. </compile>
  4544. </ajc-test>
  4545. <ajc-test dir="java5/generics/pointcuts" title="withincode with various parameterizations and generic types - errors">
  4546. <compile files="WithincodePointcutMatching.aj" options="-1.9">
  4547. <message kind="warning" line="4" text="no match for this type name: T"/>
  4548. <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)"/>
  4549. <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)"/>
  4550. <message kind="error" line="6" text="invalid throws pattern: a generic class may not be a direct or indirect subclass of Throwable"/>
  4551. </compile>
  4552. </ajc-test>
  4553. <ajc-test dir="java5/generics/pointcuts" title="withincode with various parameterizations and generic types - matching">
  4554. <compile files="WithinCodePointcutMatchingParamAndReturnTypes.aj" options="-1.9">
  4555. <message kind="warning" line="35" text="raw param type matching in withincode ok"/>
  4556. <message kind="warning" line="36" text="raw param type matching in withincode ok"/>
  4557. <message kind="warning" line="67" text="raw return type matching in withincode ok"/>
  4558. <message kind="warning" line="38" text="erasure type matching in withincode ok"/>
  4559. <message kind="warning" line="39" text="erasure type matching in withincode ok"/>
  4560. <message kind="warning" line="42" text="erasure type matching in withincode ok"/>
  4561. <message kind="warning" line="62" text="withincode and parameterized method ok"/>
  4562. <message kind="warning" line="62" text="withincode and generic interface ok"/>
  4563. <message kind="warning" line="65" text="withincode and interface control test"/>
  4564. <message kind="warning" line="35" text="match on parameterized args"/>
  4565. <message kind="warning" line="36" text="match on parameterized args"/>
  4566. <message kind="warning" line="67" text="match on parameterized return type"/>
  4567. </compile>
  4568. </ajc-test>
  4569. <ajc-test dir="java5/generics/pointcuts" title="withincode with overriding of inherited generic members">
  4570. <compile files="WithinCodeOverriding.aj" options="-1.9">
  4571. <message kind="warning" line="37" text="wildcard declaring type match on erasure"/>
  4572. <message kind="warning" line="50" text="wildcard declaring type match on erasure"/>
  4573. <message kind="warning" line="63" text="wildcard declaring type match on erasure"/>
  4574. <message kind="warning" line="37" text="base declaring type match on erasure"/>
  4575. <message kind="warning" line="50" text="base declaring type match on erasure"/>
  4576. <message kind="warning" line="63" text="base declaring type match on erasure"/>
  4577. <message kind="warning" line="50" text="sub type match on erasure"/>
  4578. <message kind="warning" line="63" text="parameterized match on erasure"/>
  4579. <message kind="warning" line="80" text="erasure match on base interface"/>
  4580. <message kind="warning" line="80" text="wildcard match on erasure"/>
  4581. <message kind="warning" line="80" text="parameterized match"/>
  4582. </compile>
  4583. </ajc-test>
  4584. <ajc-test dir="java5/generics/pointcuts" title="execution pcd with raw type matching">
  4585. <compile files="GenericInterface.java,ConcreteImplementingClass.java,GenericImplementingClass.java,RawTypeMatching.aj" options="-1.9">
  4586. <message kind="warning" line="4" text="execution(* GenericInterface.*(..))"/>
  4587. <message kind="warning" line="5" text="execution(* GenericInterface.*(..))"/>
  4588. </compile>
  4589. </ajc-test>
  4590. <ajc-test dir="java5/generics/pointcuts" title="execution pcd with raw signature matching">
  4591. <compile files="GenericInterface.java,ConcreteImplementingClass.java,GenericImplementingClass.java,RawSignatureMatching.aj" options="-1.9">
  4592. <message kind="warning" line="4" text="execution(* GenericInterface.asInt(Number))"/>
  4593. <message kind="warning" line="5" text="execution(* GenericInterface.asInt(Number))"/>
  4594. </compile>
  4595. </ajc-test>
  4596. <ajc-test dir="java5/generics/pointcuts" title="execution with various parameterizations and generic types - errors">
  4597. <compile files="ExecutionPointcutMatchingErrorCases.aj" options="-1.9">
  4598. <message kind="warning" line="4" text="no match for this type name: T"/>
  4599. <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)"/>
  4600. <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)"/>
  4601. <message kind="error" line="6" text="invalid throws pattern: a generic class may not be a direct or indirect subclass of Throwable"/>
  4602. </compile>
  4603. </ajc-test>
  4604. <ajc-test dir="java5/generics/pointcuts" title="execution with various parameterizations and generic types - matching">
  4605. <compile files="ExecutionPointcutMatchingParamAndReturnTypes.aj" options="-1.9">
  4606. <message kind="warning" line="35" text="raw param type matching in execution ok"/>
  4607. <message kind="warning" line="67" text="raw return type matching in execution ok"/>
  4608. <message kind="warning" line="38" text="erasure type matching in execution ok"/>
  4609. <message kind="warning" line="42" text="erasure type matching in execution ok"/>
  4610. <message kind="warning" line="61" text="execution and parameterized method ok"/>
  4611. <message kind="warning" line="61" text="execution and generic interface ok"/>
  4612. <message kind="warning" line="65" text="execution and interface control test"/>
  4613. <message kind="warning" line="35" text="match on parameterized args"/>
  4614. <message kind="warning" line="67" text="match on parameterized return type"/>
  4615. </compile>
  4616. </ajc-test>
  4617. <ajc-test dir="java5/generics/pointcuts" title="execution with overriding of inherited generic members">
  4618. <compile files="ExecutionOverriding.aj" options="-1.9">
  4619. <message kind="warning" line="36" text="wildcard declaring type match on erasure"/>
  4620. <message kind="warning" line="49" text="wildcard declaring type match on erasure"/>
  4621. <message kind="warning" line="62" text="wildcard declaring type match on erasure"/>
  4622. <message kind="warning" line="36" text="base declaring type match on erasure"/>
  4623. <message kind="warning" line="49" text="base declaring type match on erasure"/>
  4624. <message kind="warning" line="62" text="base declaring type match on erasure"/>
  4625. <message kind="warning" line="49" text="sub type match on erasure"/>
  4626. <message kind="warning" line="62" text="parameterized match on erasure"/>
  4627. <message kind="warning" line="79" text="erasure match on base interface"/>
  4628. <message kind="warning" line="79" text="wildcard match on erasure"/>
  4629. <message kind="warning" line="79" text="parameterized match"/>
  4630. </compile>
  4631. </ajc-test>
  4632. <ajc-test dir="java5/generics/pointcuts" title="execution pcd with generic declaring type and erased parameter types">
  4633. <compile files="GenericInterface.java,ConcreteImplementingClass.java,GenericImplementingClass.java,GenericDeclaringTypeWithParameterErasure.aj" options="-1.9"/>
  4634. </ajc-test>
  4635. <ajc-test dir="java5/generics/pointcuts" title="execution pcd with generic signature matching">
  4636. <compile files="GenericInterface.java,ConcreteImplementingClass.java,GenericImplementingClass.java,GenericSignatureMatching.aj" options="-1.9">
  4637. <message kind="warning" line="4" text="execution&lt;T&gt;(* GenericInterface&lt;T extends Number&gt;.asInt(T))"/>
  4638. <message kind="warning" line="5" text="execution&lt;T&gt;(* GenericInterface&lt;T extends Number&gt;.asInt(T))"/>
  4639. </compile>
  4640. </ajc-test>
  4641. <ajc-test dir="java5/generics/pointcuts" title="call with various parameterizations and generic types - errors">
  4642. <compile files="CallPointcutMatchingErrorCases.aj" options="-1.9">
  4643. <message kind="warning" line="4" text="no match for this type name: T"/>
  4644. <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)"/>
  4645. <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)"/>
  4646. <message kind="error" line="6" text="invalid throws pattern: a generic class may not be a direct or indirect subclass of Throwable"/>
  4647. </compile>
  4648. </ajc-test>
  4649. <ajc-test dir="java5/generics/pointcuts" title="call with various parameterizations and generic types - matching">
  4650. <compile files="CallPointcutMatchingParamAndReturnTypes.aj" options="-1.9">
  4651. <message kind="warning" line="7" text="raw param type matching in call ok"/>
  4652. <message kind="warning" line="8" text="raw return type matching in call ok"/>
  4653. <message kind="warning" line="9" text="erasure type matching in call ok"/>
  4654. <message kind="warning" line="10" text="erasure type matching in call ok"/>
  4655. <message kind="warning" line="11" text="call and parameterized method ok"/>
  4656. <message kind="warning" line="11" text="call and generic interface ok"/>
  4657. <message kind="warning" line="12" text="call and interface control test"/>
  4658. <message kind="warning" line="7" text="match on parameterized args"/>
  4659. <message kind="warning" line="8" text="match on parameterized return type"/>
  4660. </compile>
  4661. </ajc-test>
  4662. <ajc-test dir="java5/generics/pointcuts" title="call with overriding of inherited generic members">
  4663. <compile files="CallOverriding.aj" options="-1.9">
  4664. <message kind="warning" line="8" text="wildcard declaring type match on erasure"/>
  4665. <message kind="warning" line="9" text="wildcard declaring type match on erasure"/>
  4666. <message kind="warning" line="10" text="wildcard declaring type match on erasure"/>
  4667. <message kind="warning" line="8" text="base declaring type match on erasure"/>
  4668. <message kind="warning" line="9" text="base declaring type match on erasure"/>
  4669. <message kind="warning" line="10" text="base declaring type match on erasure"/>
  4670. <message kind="warning" line="9" text="sub type match on erasure"/>
  4671. <message kind="warning" line="10" text="parameterized match on erasure"/>
  4672. <message kind="warning" line="87" text="erasure match on base interface"/>
  4673. <message kind="warning" line="87" text="wildcard match on erasure"/>
  4674. <message kind="warning" line="87" text="parameterized match"/>
  4675. </compile>
  4676. </ajc-test>
  4677. <ajc-test dir="java5/generics/pointcuts" title="call with bridge methods">
  4678. <compile files="CallWithBridgeMethods.aj" options="-1.9">
  4679. <!-- see testcode
  4680. <message kind="warning" line="23" text="should match call to bridge method on L23, this is a real call!"/>
  4681. -->
  4682. </compile>
  4683. </ajc-test>
  4684. <ajc-test dir="java5/generics/pointcuts" title="args with raw type and generic / parameterized sigs">
  4685. <compile files="RawArgs.aj" options="-1.9"/>
  4686. <run class="RawArgs">
  4687. <stdout>
  4688. <line text="args(List) match at call(void Generic.foo(List))"/>
  4689. <line text="args(List) match at call(void Generic.bar(List))"/>
  4690. <line text="args(List) match at call(void Generic.tada(List))"/>
  4691. <line text="args(List) match at call(void Generic.tada(List))"/>
  4692. <line text="args(List) match at call(void Generic.tada(List))"/>
  4693. </stdout>
  4694. </run>
  4695. </ajc-test>
  4696. <ajc-test dir="java5/generics/pointcuts" title="args with parameterized type and generic / parameterized sigs">
  4697. <compile files="ArgsParameterized.aj" options="-1.9">
  4698. <message kind="warning" line="28" text="unchecked match of List&lt;String&gt; with List"/>
  4699. </compile>
  4700. <run class="ArgsParameterized">
  4701. <stdout>
  4702. <line text="args(List&lt;String&gt; matched at call(void Generic.foo(List))"/>
  4703. <line text="args(List&lt;String&gt; matched at call(void Generic.bar(List))"/>
  4704. <line text="args(List&lt;String&gt; matched at call(void Generic.tada(List))"/>
  4705. <line text="args(List&lt;String&gt; matched at call(void Generic.something(List))"/>
  4706. <line text="args(List&lt;String&gt; matched at call(void MustBeString.listit(List))"/>
  4707. </stdout>
  4708. </run>
  4709. </ajc-test>
  4710. <ajc-test dir="java5/generics/pointcuts" title="args with parameterized type and wildcards">
  4711. <compile files="ArgsParameterizedWithWildcards.aj" options="-1.9">
  4712. <message kind="warning" line="10" text="unchecked match of List&lt;Double&gt; with List when argument is an instance of List"/>
  4713. <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"/>
  4714. <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"/>
  4715. <message kind="warning" line="10" text="unchecked match of List&lt;Double&gt; with List&lt;?&gt; when argument is an instance of List"/>
  4716. </compile>
  4717. <run class="ArgsParameterizedWithWildcards">
  4718. <stdout>
  4719. <line text="List&lt;Double&gt; matched at execution(void C.rawList(List))"/>
  4720. <line text="List&lt;Double&gt; matched at execution(void C.listOfSomething(List))"/>
  4721. <line text="List&lt;Double&gt; matched at execution(void C.listOfSomeNumber(List))"/>
  4722. <line text="List&lt;Double&gt; matched at execution(void C.listOfDouble(List))"/>
  4723. <line text="List&lt;Double&gt; matched at execution(void C.listOfSomeDouble(List))"/>
  4724. </stdout>
  4725. </run>
  4726. </ajc-test>
  4727. <ajc-test dir="java5/generics/pointcuts" title="args with generic wildcard">
  4728. <compile files="ArgsListOfSomething.aj" options="-1.9 -Xlint:ignore"/>
  4729. <run class="ArgsListOfSomething">
  4730. <stdout>
  4731. <line text="List&lt;?&gt; matches execution(void ArgsListOfSomething.rawList(List))"/>
  4732. <line text="List&lt;?&gt; matches execution(void ArgsListOfSomething.listOfString(List))"/>
  4733. <line text="List&lt;?&gt; matches execution(void ArgsListOfSomething.listOfSomething(List))"/>
  4734. <line text="List&lt;?&gt; matches execution(void ArgsListOfSomething.listOfSomethingExtends(List))"/>
  4735. <line text="List&lt;?&gt; matches execution(void ArgsListOfSomething.listOfSomethingSuper(List))"/>
  4736. <line text="wild map matches execution(void ArgsListOfSomething.mapit(Map))"/>
  4737. <line text="exact wild map matches execution(void ArgsListOfSomething.mapit(Map))"/>
  4738. <line text="super type exact matches execution(void ArgsListOfSomething.setOf(HashSet))"/>
  4739. <line text="super wild type matches execution(void ArgsListOfSomething.setOf(HashSet))"/>
  4740. </stdout>
  4741. </run>
  4742. </ajc-test>
  4743. <ajc-test dir="java5/generics/pointcuts" title="args with generic wildcard extends">
  4744. <compile files="ArgsListOfSomethingExtends.aj" options="-1.9">
  4745. <message kind="warning" line="27" text="unchecked match of List&lt;? extends Number&gt; with List"/>
  4746. <message kind="warning" line="27" text="unchecked match of List&lt;? extends Number&gt; with List&lt;?&gt;"/>
  4747. </compile>
  4748. <run class="ArgsListOfSomethingExtends">
  4749. <stdout>
  4750. <line text="List&lt;? extends Number&gt; matches execution(void ArgsListOfSomethingExtends.rawList(List))"/>
  4751. <line text="List&lt;? extends Number&gt; matches execution(void ArgsListOfSomethingExtends.listOfNumber(List))"/>
  4752. <line text="List&lt;? extends Number&gt; matches execution(void ArgsListOfSomethingExtends.listOfDouble(List))"/>
  4753. <line text="List&lt;? extends Number&gt; matches execution(void ArgsListOfSomethingExtends.listOfSomething(List))"/>
  4754. <line text="List&lt;? extends Number&gt; matches execution(void ArgsListOfSomethingExtends.listOfSomethingExtends(List))"/>
  4755. </stdout>
  4756. </run>
  4757. </ajc-test>
  4758. <ajc-test dir="java5/generics/pointcuts" title="args with generic wildcard super">
  4759. <compile files="ArgsListOfSomethingSuper.aj" options="-1.9">
  4760. <message kind="warning" line="32" text="unchecked match of List&lt;? super Number&gt; with List"/>
  4761. <message kind="warning" line="32" text="unchecked match of List&lt;? super Number&gt; with List&lt;?&gt;"/>
  4762. <message kind="warning" line="32" text="unchecked match of List&lt;? super Number&gt; with List&lt;? extends Number&gt;"/>
  4763. </compile>
  4764. <run class="ArgsListOfSomethingSuper">
  4765. <stdout>
  4766. <line text="List&lt;? super Number&gt; matches execution(void ArgsListOfSomethingSuper.rawList(List))"/>
  4767. <line text="List&lt;? super Number&gt; matches execution(void ArgsListOfSomethingSuper.listOfObject(List))"/>
  4768. <line text="List&lt;? super Number&gt; matches execution(void ArgsListOfSomethingSuper.listOfNumber(List))"/>
  4769. <line text="List&lt;? super Number&gt; matches execution(void ArgsListOfSomethingSuper.listOfSomething(List))"/>
  4770. <line text="List&lt;? super Number&gt; matches execution(void ArgsListOfSomethingSuper.listOfSomethingSuper(List))"/>
  4771. <line text="List&lt;? super Number&gt; matches execution(void ArgsListOfSomethingSuper.listOfSomethingExtendsNumber(List))"/>
  4772. </stdout>
  4773. </run>
  4774. </ajc-test>
  4775. <ajc-test dir="java5/generics/pointcuts" title="generic method matching">
  4776. <compile files="GenericMethods.aj" options="-1.9">
  4777. <message kind="warning" line="19" text="static generic method match"/>
  4778. <message kind="warning" line="34" text="static generic method match"/>
  4779. <message kind="warning" line="24" text="instance generic method match"/>
  4780. <message kind="warning" line="39" text="instance generic method match"/>
  4781. </compile>
  4782. </ajc-test>
  4783. <ajc-test dir="java5/generics/pointcuts" title="generic wildcards in signature matching">
  4784. <compile files="GenericWildcardsInSignatureMatching.aj" options="-1.9">
  4785. <message kind="warning" line="5" text="set of a list"/>
  4786. <message kind="warning" line="7" text="exact nested wildcard match"/>
  4787. <message kind="warning" line="7" text="wildcard nested wildcard match"/>
  4788. <message kind="warning" line="11" text="super"/>
  4789. <message kind="warning" line="15" text="super wild match"/>
  4790. </compile>
  4791. </ajc-test>
  4792. <!-- end of generics and pointcuts tests -->
  4793. <ajc-test dir="java5/generics/afterAdvice" title="after throwing with parameterized throw type">
  4794. <compile files="AfterThrowing.aj" options="-1.9">
  4795. <message kind="error" line="6" text="cannot convert from List&lt;String&gt; to Throwable"/>
  4796. </compile>
  4797. </ajc-test>
  4798. <ajc-test dir="java5/generics/afterAdvice" title="after returning with raw type and generic / parameterized sigs">
  4799. <compile files="AfterReturningRawType.aj" options="-1.9"/>
  4800. <run class="AfterReturningRawType">
  4801. <stdout>
  4802. <line text="returning(List) match at call(List Generic.foo(List))"/>
  4803. <line text="returning(List) match at call(List Generic.bar(List))"/>
  4804. <line text="returning(List) match at call(List Generic.tada(List))"/>
  4805. <line text="returning(List) match at call(List Generic.tada(List))"/>
  4806. <line text="returning(List) match at call(List Generic.tada(List))"/>
  4807. </stdout>
  4808. </run>
  4809. </ajc-test>
  4810. <ajc-test dir="java5/generics/afterAdvice" title="after returning with parameterized type and generic / parameterized sigs">
  4811. <compile files="AfterReturningParameterized.aj" options="-1.9">
  4812. <message kind="warning" line="28" text="unchecked match of List&lt;String&gt; with List"/>
  4813. </compile>
  4814. <run class="AfterReturningParameterized">
  4815. <stdout>
  4816. <line text="returning(List&lt;String&gt; matched at call(List Generic.foo(List))"/>
  4817. <line text="returning(List&lt;String&gt; matched at call(List Generic.bar(List))"/>
  4818. <line text="returning(List&lt;String&gt; matched at call(List Generic.tada(List))"/>
  4819. <line text="returning(List&lt;String&gt; matched at call(List Generic.something(List))"/>
  4820. <line text="returning(List&lt;String&gt; matched at call(List MustBeString.listit(List))"/>
  4821. </stdout>
  4822. </run>
  4823. </ajc-test>
  4824. <ajc-test dir="java5/generics/afterAdvice" title="after returning with parameterized type and wildcards">
  4825. <compile files="AfterReturningParameterizedWithWildcards.aj" options="-1.9">
  4826. <message kind="warning" line="10" text="unchecked match of List&lt;Double&gt; with List when argument is an instance of List"/>
  4827. <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"/>
  4828. <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"/>
  4829. <message kind="warning" line="10" text="unchecked match of List&lt;Double&gt; with List&lt;?&gt; when argument is an instance of List"/>
  4830. </compile>
  4831. <run class="AfterReturningParameterizedWithWildcards">
  4832. <stdout>
  4833. <line text="List&lt;Double&gt; matched at call(List C.rawList(List))"/>
  4834. <line text="List&lt;Double&gt; matched at call(List C.listOfSomething(List))"/>
  4835. <line text="List&lt;Double&gt; matched at call(List C.listOfSomeNumber(List))"/>
  4836. <line text="List&lt;Double&gt; matched at call(List C.listOfDouble(List))"/>
  4837. <line text="List&lt;Double&gt; matched at call(List C.listOfSomeDouble(List))"/>
  4838. </stdout>
  4839. </run>
  4840. </ajc-test>
  4841. <ajc-test dir="java5/generics/afterAdvice" title="after returning with generic wildcard">
  4842. <compile files="AfterReturningListOfSomething.aj" options="-1.9">
  4843. <!-- warning is unchecked match of List<?> from line 28 onto line 15. -->
  4844. <!-- some sets may be lists unless the set is final, so as a cast is allowed, the match is allowed -->
  4845. <message kind="warning" line="28"/>
  4846. <message kind="warning" line="44"/>
  4847. <message kind="warning" line="48"/>
  4848. </compile>
  4849. <run class="AfterReturningListOfSomething">
  4850. <stdout>
  4851. <line text="List&lt;?&gt; matches execution(List AfterReturningListOfSomething.rawList(List))"/>
  4852. <line text="List&lt;?&gt; matches execution(List AfterReturningListOfSomething.listOfString(List))"/>
  4853. <line text="List&lt;?&gt; matches execution(List AfterReturningListOfSomething.listOfSomething(List))"/>
  4854. <line text="List&lt;?&gt; matches execution(List AfterReturningListOfSomething.listOfSomethingExtends(List))"/>
  4855. <line text="List&lt;?&gt; matches execution(List AfterReturningListOfSomething.listOfSomethingSuper(List))"/>
  4856. <line text="wild map matches execution(Map AfterReturningListOfSomething.mapit(Map))"/>
  4857. <line text="exact wild map matches execution(Map AfterReturningListOfSomething.mapit(Map))"/>
  4858. <line text="super type exact matches execution(HashSet AfterReturningListOfSomething.setOf(HashSet))"/>
  4859. <line text="super wild type matches execution(HashSet AfterReturningListOfSomething.setOf(HashSet))"/>
  4860. </stdout>
  4861. </run>
  4862. </ajc-test>
  4863. <ajc-test dir="java5/generics/afterAdvice" title="after returning with generic wildcard extends">
  4864. <compile files="AfterReturningListOfSomethingExtends.aj" options="-1.9">
  4865. <message kind="warning" line="27" text="unchecked match of List&lt;? extends Number&gt; with List"/>
  4866. <message kind="warning" line="27" text="unchecked match of List&lt;? extends Number&gt; with List&lt;?&gt;"/>
  4867. </compile>
  4868. <run class="AfterReturningListOfSomethingExtends">
  4869. <stdout>
  4870. <line text="List&lt;? extends Number&gt; matches execution(List AfterReturningListOfSomethingExtends.rawList(List))"/>
  4871. <line text="List&lt;? extends Number&gt; matches execution(List AfterReturningListOfSomethingExtends.listOfNumber(List))"/>
  4872. <line text="List&lt;? extends Number&gt; matches execution(List AfterReturningListOfSomethingExtends.listOfDouble(List))"/>
  4873. <line text="List&lt;? extends Number&gt; matches execution(List AfterReturningListOfSomethingExtends.listOfSomething(List))"/>
  4874. <line text="List&lt;? extends Number&gt; matches execution(List AfterReturningListOfSomethingExtends.listOfSomethingExtends(List))"/>
  4875. </stdout>
  4876. </run>
  4877. </ajc-test>
  4878. <ajc-test dir="java5/generics/afterAdvice" title="after returning with generic wildcard super">
  4879. <compile files="AfterReturningListOfSomethingSuper.aj" options="-1.9">
  4880. <message kind="warning" line="32" text="unchecked match of List&lt;? super Number&gt; with List"/>
  4881. <message kind="warning" line="32" text="unchecked match of List&lt;? super Number&gt; with List&lt;?&gt;"/>
  4882. <message kind="warning" line="32" text="unchecked match of List&lt;? super Number&gt; with List&lt;? extends Number&gt;"/>
  4883. </compile>
  4884. <run class="AfterReturningListOfSomethingSuper">
  4885. <stdout>
  4886. <line text="List&lt;? super Number&gt; matches execution(List AfterReturningListOfSomethingSuper.rawList(List))"/>
  4887. <line text="List&lt;? super Number&gt; matches execution(List AfterReturningListOfSomethingSuper.listOfObject(List))"/>
  4888. <line text="List&lt;? super Number&gt; matches execution(List AfterReturningListOfSomethingSuper.listOfNumber(List))"/>
  4889. <line text="List&lt;? super Number&gt; matches execution(List AfterReturningListOfSomethingSuper.listOfSomething(List))"/>
  4890. <line text="List&lt;? super Number&gt; matches execution(List AfterReturningListOfSomethingSuper.listOfSomethingSuper(List))"/>
  4891. <line text="List&lt;? super Number&gt; matches execution(List AfterReturningListOfSomethingSuper.listOfSomethingExtendsNumber(List))"/>
  4892. </stdout>
  4893. </run>
  4894. </ajc-test>
  4895. <ajc-test title="ajdk notebook: erasure matching examples" dir="java5/generics/ajdk">
  4896. <compile files="ErasureMatching.aj" options="-1.9">
  4897. <message kind="warning" line="18" text="static generic method match"/>
  4898. <message kind="warning" line="21" text="instance generic method match"/>
  4899. <message kind="warning" line="31" text="method in generic type match"/>
  4900. <message kind="warning" line="28" text="field in generic type match"/>
  4901. </compile>
  4902. </ajc-test>
  4903. <ajc-test title="ajdk notebook: simple parameterized type matching examples" dir="java5/generics/ajdk">
  4904. <compile files="SimpleParameterizedTypeExamples.aj" options="-1.9">
  4905. <message kind="warning" line="34" text="get myStrings 1"/>
  4906. <message kind="warning" line="34" text="get myStrings 2"/>
  4907. <message kind="warning" line="38" text="get myStrings 1"/>
  4908. <message kind="warning" line="38" text="get myStrings 2"/>
  4909. <message kind="warning" line="35" text="get myFloats 1"/>
  4910. <message kind="warning" line="35" text="get myFloats 2"/>
  4911. <message kind="warning" line="35" text="get myFloats 3"/>
  4912. <message kind="warning" line="34" text="getter 1"/>
  4913. <message kind="warning" line="35" text="getter 1"/>
  4914. <message kind="warning" line="34" text="getter 2"/>
  4915. <message kind="warning" line="35" text="getter 2"/>
  4916. <message kind="warning" line="34" text="getter 3"/>
  4917. <message kind="warning" line="35" text="getter 4"/>
  4918. <message kind="warning" line="25" text="call 1"/>
  4919. <message kind="warning" line="25" text="call 2"/>
  4920. </compile>
  4921. </ajc-test>
  4922. <ajc-test title="ajdk notebook: mixed parameterized types and generic methods" dir="java5/generics/ajdk">
  4923. <compile files="MixedParameterizedAndTypeVariables.aj" options="-1.9">
  4924. <message kind="warning" line="13" text="erasure match"/>
  4925. <message kind="warning" line="13" text="mixed match"/>
  4926. <message kind="warning" line="13" text="params only match"/>
  4927. </compile>
  4928. </ajc-test>
  4929. <ajc-test title="ajdk notebook: signature matching with generic wildcards" dir="java5/generics/ajdk">
  4930. <compile files="SignatureWildcards.aj" options="-1.9">
  4931. <message kind="warning" line="13" text="any list"/>
  4932. <message kind="warning" line="15" text="any list"/>
  4933. <message kind="warning" line="17" text="any list"/>
  4934. <message kind="warning" line="13" text="only foo"/>
  4935. <message kind="warning" line="15" text="some list"/>
  4936. <message kind="warning" line="13" text="any list with upper bound"/>
  4937. <message kind="warning" line="15" text="any list with upper bound"/>
  4938. </compile>
  4939. </ajc-test>
  4940. <ajc-test title="ajdk notebook: bridge method examples" dir="java5/generics/ajdk">
  4941. <compile files="BridgeMethodExamples.aj" options="-1.9">
  4942. <message kind="warning" line="17" text="double match"/>
  4943. <message kind="warning" line="25" text="double match"/>
  4944. <message kind="warning" line="9" text="match"/>
  4945. <message kind="warning" line="11" text="match"/>
  4946. </compile>
  4947. </ajc-test>
  4948. <ajc-test title="ajdk notebook: args examples" dir="java5/generics/ajdk">
  4949. <compile files="ArgsExamples.aj" options="-1.9">
  4950. <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]"/>
  4951. <message kind="warning" line="53" text="unchecked match"/>
  4952. </compile>
  4953. <run class="ArgsExamples">
  4954. <stdout>
  4955. <line text="args(List)"/>
  4956. <line text="args List of String"/>
  4957. <line text="args(List)"/>
  4958. <line text="args List of Double"/>
  4959. <line text="args(List)"/>
  4960. <line text="args List of Double"/>
  4961. </stdout>
  4962. </run>
  4963. </ajc-test>
  4964. <ajc-test title="ajdk notebook: after returning examples" dir="java5/generics/ajdk">
  4965. <compile files="AfterReturningExamples.aj" options="-1.9">
  4966. <message kind="warning" line="20" text="unchecked match of List&lt;Double&gt; with List&lt;? extends Number&gt;"/>
  4967. </compile>
  4968. <run class="AfterReturningExamples">
  4969. <stdout>
  4970. <line text="execution(List C.foo(List))"/>
  4971. <line text="raw s1"/>
  4972. <line text="raw s2"/>
  4973. <line text="execution(List C.bar(List))"/>
  4974. <line text="raw 5.0"/>
  4975. <line text="raw 10.0"/>
  4976. <line text="a1 5.0"/>
  4977. <line text="a1 10.0"/>
  4978. <line text="a2 5.0"/>
  4979. <line text="a2 10.0"/>
  4980. <line text="a3 5.0"/>
  4981. <line text="a3 10.0"/>
  4982. <line text="execution(List C.goo(List))"/>
  4983. <line text="raw 5.0"/>
  4984. <line text="raw 10.0"/>
  4985. <line text="a1 5.0"/>
  4986. <line text="a1 10.0"/>
  4987. <line text="a3 5.0"/>
  4988. <line text="a3 10.0"/>
  4989. </stdout>
  4990. </run>
  4991. </ajc-test>
  4992. <ajc-test title="ajdk notebook: args and wildcards examples" dir="java5/generics/ajdk">
  4993. <compile files="WildcardArgsExamples.aj" options="-1.9">
  4994. <message kind="warning" line="6" text="unchecked match of List&lt;? extends Number&gt; with List"/>
  4995. </compile>
  4996. <run class="WildcardArgsExamples">
  4997. <stdout>
  4998. <line text="advice match at call(void C.foo(Object))"/>
  4999. <line text="advice match at call(void C.foo(Object))"/>
  5000. <line text="advice match 2 at call(void C.goo1(List))"/>
  5001. <line text="advice match 2 at call(void C.goo2(List))"/>
  5002. <line text="advice match 2 at call(void C.goo4(List))"/>
  5003. </stdout>
  5004. </run>
  5005. </ajc-test>
  5006. <ajc-test title="ajdk notebook: pointcut in generic class example" dir="java5/generics/ajdk">
  5007. <compile files="PointcutInGenericClassExample.aj" options="-1.9">
  5008. <message kind="warning" line="23" text="parameterized with C"/>
  5009. <message kind="warning" line="29" text="parameterized with D"/>
  5010. </compile>
  5011. </ajc-test>
  5012. <!-- ============================================================== -->
  5013. <!-- End of generics tests -->
  5014. <!-- ============================================================== -->
  5015. <ajc-test dir="bugs150/pr98901" title="public method with declare @method">
  5016. <compile files="Case01.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5017. <run class="B01">
  5018. <stdout>
  5019. <line text="@anInterface()"/>
  5020. </stdout>
  5021. </run>
  5022. </ajc-test>
  5023. <ajc-test dir="bugs150" title="Compiler error due to a wrong exception check in try blocks">
  5024. <compile files="pr82989.aj" options="-1.9"/>
  5025. </ajc-test>
  5026. <ajc-test dir="bugs150/pr98901" title="public method on the aspect that declares @method on it">
  5027. <compile files="Case02.aj" options="-1.9 -Xlint:error"/>
  5028. <run class="B02">
  5029. <stdout>
  5030. <line text="@anInterface()"/>
  5031. </stdout>
  5032. </run>
  5033. </ajc-test>
  5034. <ajc-test dir="bugs150/pr98901" title="public annotated method">
  5035. <compile files="Case03.aj" options="-1.9 -Xlint:error"/>
  5036. <run class="B03">
  5037. <stdout>
  5038. <line text="@anInterface()"/>
  5039. </stdout>
  5040. </run>
  5041. </ajc-test>
  5042. <ajc-test dir="bugs150/pr98901" title="public ITD method with declare @method">
  5043. <compile files="Case04.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5044. <run class="B04">
  5045. <stdout>
  5046. <line text="@anInterface()"/>
  5047. </stdout>
  5048. </run>
  5049. </ajc-test>
  5050. <ajc-test dir="bugs150/pr98901" title="public annotated ITD method">
  5051. <compile files="Case05.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5052. <run class="B05">
  5053. <stdout>
  5054. <line text="@anInterface()"/>
  5055. </stdout>
  5056. </run>
  5057. </ajc-test>
  5058. <ajc-test dir="bugs150/pr98901" title="public ITD-on-itself method with declare @method">
  5059. <compile files="Case06.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5060. <run class="B06">
  5061. <stdout>
  5062. <line text="@anInterface()"/>
  5063. </stdout>
  5064. </run>
  5065. </ajc-test>
  5066. <ajc-test dir="bugs150/pr98901" title="public annotated ITD-on-itself method">
  5067. <compile files="Case07.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5068. <run class="B07">
  5069. <stdout>
  5070. <line text="@anInterface()"/>
  5071. </stdout>
  5072. </run>
  5073. </ajc-test>
  5074. <ajc-test dir="bugs150/pr98901" title="public method on an Interface with declare @method">
  5075. <compile files="Case08.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5076. <run class="B08">
  5077. <stdout>
  5078. <line text="@anInterface()"/>
  5079. </stdout>
  5080. </run>
  5081. </ajc-test>
  5082. <ajc-test dir="bugs150/pr98901" title="public annotated method on an Interface">
  5083. <compile files="Case09.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5084. <run class="B09">
  5085. <stdout>
  5086. <line text="@anInterface()"/>
  5087. </stdout>
  5088. </run>
  5089. </ajc-test>
  5090. <ajc-test dir="bugs150/pr98901" title="public ITD method onto an Interface with declare @method">
  5091. <compile files="Case10.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5092. <run class="B10">
  5093. <stdout>
  5094. <line text="@anInterface()"/>
  5095. </stdout>
  5096. </run>
  5097. </ajc-test>
  5098. <ajc-test dir="bugs150/pr98901" title="public annotated ITD method onto an Interface">
  5099. <compile files="Case11.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5100. <run class="B11">
  5101. <stdout>
  5102. <line text="@anInterface()"/>
  5103. </stdout>
  5104. </run>
  5105. </ajc-test>
  5106. <ajc-test dir="bugs150/pr98901" title="public abstract method with declare @method">
  5107. <compile files="Case12.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5108. <run class="B12">
  5109. <stdout>
  5110. <line text="@anInterface()"/>
  5111. </stdout>
  5112. </run>
  5113. </ajc-test>
  5114. <ajc-test dir="bugs150/pr98901" title="public abstract method on the aspect that declares @method on it">
  5115. <compile files="Case13.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5116. <run class="B13">
  5117. <stdout>
  5118. <line text="@anInterface()"/>
  5119. </stdout>
  5120. </run>
  5121. </ajc-test>
  5122. <ajc-test dir="bugs150/pr98901" title="public abstract annotated method">
  5123. <compile files="Case14.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5124. <run class="B14">
  5125. <stdout>
  5126. <line text="@anInterface()"/>
  5127. </stdout>
  5128. </run>
  5129. </ajc-test>
  5130. <ajc-test dir="bugs150/pr98901" title="public abstract ITD method with declare @method">
  5131. <compile files="Case15.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5132. <run class="B15">
  5133. <stdout>
  5134. <line text="@anInterface()"/>
  5135. </stdout>
  5136. </run>
  5137. </ajc-test>
  5138. <ajc-test dir="bugs150/pr98901" title="public abstract annotated ITD method">
  5139. <compile files="Case16.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5140. <run class="B16">
  5141. <stdout>
  5142. <line text="@anInterface()"/>
  5143. </stdout>
  5144. </run>
  5145. </ajc-test>
  5146. <ajc-test dir="bugs150/pr98901" title="public abstract ITD-on-itself method with declare @method">
  5147. <compile files="Case17.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5148. <run class="B17">
  5149. <stdout>
  5150. <line text="@anInterface()"/>
  5151. </stdout>
  5152. </run>
  5153. </ajc-test>
  5154. <ajc-test dir="bugs150/pr98901" title="public abstract annotated ITD-on-itself method">
  5155. <compile files="Case18.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5156. <run class="B18">
  5157. <stdout>
  5158. <line text="@anInterface()"/>
  5159. </stdout>
  5160. </run>
  5161. </ajc-test>
  5162. <ajc-test dir="bugs150/pr98901" title="public abstract method on an Interface with declare @method">
  5163. <compile files="Case19.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5164. <run class="B19">
  5165. <stdout>
  5166. <line text="@anInterface()"/>
  5167. </stdout>
  5168. </run>
  5169. </ajc-test>
  5170. <ajc-test dir="bugs150/pr98901" title="public abstract annotated method on an Interface">
  5171. <compile files="Case20.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5172. <run class="B20">
  5173. <stdout>
  5174. <line text="@anInterface()"/>
  5175. </stdout>
  5176. </run>
  5177. </ajc-test>
  5178. <ajc-test dir="bugs150/pr98901" title="public abstract ITD method onto an Interface with declare @method">
  5179. <compile files="Case21.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5180. <run class="B21">
  5181. <stdout>
  5182. <line text="@anInterface()"/>
  5183. </stdout>
  5184. </run>
  5185. </ajc-test>
  5186. <ajc-test dir="bugs150/pr98901" title="public abstract annotated ITD method onto an Interface">
  5187. <compile files="Case22.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5188. <run class="B22">
  5189. <stdout>
  5190. <line text="@anInterface()"/>
  5191. </stdout>
  5192. </run>
  5193. </ajc-test>
  5194. <ajc-test dir="bugs150/pr98901" title="public field with declare @field">
  5195. <compile files="Case23.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5196. <run class="B23">
  5197. <stdout>
  5198. <line text="@anInterface()"/>
  5199. </stdout>
  5200. </run>
  5201. </ajc-test>
  5202. <ajc-test dir="bugs150/pr98901" title="public field on the aspect that declares @field on it">
  5203. <compile files="Case24.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5204. <run class="B24">
  5205. <stdout>
  5206. <line text="@anInterface()"/>
  5207. </stdout>
  5208. </run>
  5209. </ajc-test>
  5210. <ajc-test dir="bugs150/pr98901" title="public annotated field">
  5211. <compile files="Case25.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5212. <run class="B25">
  5213. <stdout>
  5214. <line text="@anInterface()"/>
  5215. </stdout>
  5216. </run>
  5217. </ajc-test>
  5218. <ajc-test dir="bugs150/pr98901" title="public ITD field with declare @field">
  5219. <compile files="Case26.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5220. <run class="B26">
  5221. <stdout>
  5222. <line text="@anInterface()"/>
  5223. </stdout>
  5224. </run>
  5225. </ajc-test>
  5226. <ajc-test dir="bugs150/pr98901" title="public annotated ITD field">
  5227. <compile files="Case27.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5228. <run class="B27">
  5229. <stdout>
  5230. <line text="@anInterface()"/>
  5231. </stdout>
  5232. </run>
  5233. </ajc-test>
  5234. <ajc-test dir="bugs150/pr98901" title="public ITD-on-itself field with declare @field">
  5235. <compile files="Case28.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5236. <run class="B28">
  5237. <stdout>
  5238. <line text="@anInterface()"/>
  5239. </stdout>
  5240. </run>
  5241. </ajc-test>
  5242. <ajc-test dir="bugs150/pr98901" title="public annotated ITD-on-itself field">
  5243. <compile files="Case29.aj" options="-1.9 -Xlint:error -Xdev:NoAtAspectJProcessing"/>
  5244. <run class="B29">
  5245. <stdout>
  5246. <line text="@anInterface()"/>
  5247. </stdout>
  5248. </run>
  5249. </ajc-test>
  5250. <ajc-test dir="bugs150" title="Unable to build shadows">
  5251. <compile files="pr109728.java" options="-1.9"/>
  5252. </ajc-test>
  5253. <ajc-test dir="bugs150/pr110788" title="bad generic decp - 1">
  5254. <compile files="Case1.java" options="-1.9">
  5255. <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"/>
  5256. </compile>
  5257. </ajc-test>
  5258. <ajc-test dir="bugs150/pr110788" title="bad generic decp - 2">
  5259. <compile files="Case2.java" options="-1.9">
  5260. <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"/>
  5261. </compile>
  5262. </ajc-test>
  5263. <ajc-test dir="bugs150/pr110788" title="bad generic decp - 3">
  5264. <compile files="Case3.java" options="-1.9"/>
  5265. </ajc-test>
  5266. <ajc-test dir="bugs150/pr110788" title="bad generic decp - 4">
  5267. <compile files="Case4.java" options="-1.9"/>
  5268. </ajc-test>
  5269. <ajc-test dir="bugs150/pr110927" title="cant create signature attribute">
  5270. <compile files="Case1.java" options="-1.9"/>
  5271. </ajc-test>
  5272. <ajc-test dir="bugs150/pr72834" title="broken dispatch">
  5273. <compile files="Trouble.java" options="-1.9">
  5274. <message kind="error" line="7" text="package visible abstract inter-type declarations are not allowed"/>
  5275. <message kind="error" line="9" text="The method getName() is undefined for the type A"/>
  5276. </compile>
  5277. </ajc-test>
  5278. <ajc-test dir="bugs150/pr73856" title="missing accessor">
  5279. <compile files="MissingAccessor.java" options="-1.9"/>
  5280. <run class="MissingAccessor"/>
  5281. </ajc-test>
  5282. <ajc-test dir="bugs150/pr90143" title="cant call super methods">
  5283. <compile files="A.aj" options="-1.9"/>
  5284. </ajc-test>
  5285. <ajc-test dir="bugs150" title="cunning declare parents">
  5286. <compile files="pr92311.aj" options="-1.9"/>
  5287. </ajc-test>
  5288. <ajc-test dir="bugs150" title="ITD varargs problem">
  5289. <compile files="pr110906.aj" options="-1.9"/>
  5290. <run class="pr110906">
  5291. <stdout>
  5292. <line text="a"/>
  5293. <line text="a"/>
  5294. <line text="a"/>
  5295. </stdout>
  5296. </run>
  5297. </ajc-test>
  5298. <ajc-test dir="bugs150" title="generic itds and abstract method error">
  5299. <compile files="pr102357.aj" options="-1.9"/>
  5300. <run class="pr102357"/>
  5301. </ajc-test>
  5302. <ajc-test dir="bugs150" title="unexpected error unboundFormalInPC">
  5303. <compile files="pr112027.aj" options="-1.9"/>
  5304. </ajc-test>
  5305. <ajc-test dir="bugs150" title="ITD varargs in constructor">
  5306. <compile files="pr111481.aj" options="-1.9"/>
  5307. <run class="pr111481">
  5308. <stdout>
  5309. <line text="a"/>
  5310. <line text="a"/>
  5311. </stdout>
  5312. </run>
  5313. </ajc-test>
  5314. <ajc-test dir="bugs150/pr112602" title="ClassCastException with generic wildcard">
  5315. <compile files="GenericInterface.java,Implementation.java" options="-1.9,-emacssym"/>
  5316. </ajc-test>
  5317. <ajc-test dir="bugs150/pr110307" title="Cant provide default implementation via ITD - 1">
  5318. <compile files="Case1.java" options="-1.9">
  5319. <message kind="warning" line="27" text="no match for this type name: Branch [Xlint:invalidAbsoluteTypeName]"/>
  5320. <message kind="error" line="26" text="can't bind type name 'Branch'"/>
  5321. <message kind="error" line="27" text="can't bind type name 'Revision'"/>
  5322. <message kind="error" line="33" text="List cannot be resolved to a type"/>
  5323. <message kind="error" line="38" text="List cannot be resolved to a type"/>
  5324. <message kind="error" line="39" text="List cannot be resolved to a type"/>
  5325. </compile>
  5326. </ajc-test>
  5327. <ajc-test dir="bugs150/pr110307" title="Cant provide default implementation via ITD - 2">
  5328. <compile files="Case2.java" options="-1.9"/>
  5329. </ajc-test>
  5330. <ajc-test dir="bugs150/pr110307" title="Cant provide default implementation via ITD - 3">
  5331. <compile files="Case3.java" options="-1.9"/>
  5332. </ajc-test>
  5333. <ajc-test dir="bugs150/pr110307" title="Cant provide default implementation via ITD - 4">
  5334. <compile files="Case4.java" options="-1.9"/>
  5335. </ajc-test>
  5336. <ajc-test dir="bugs150/pr110307" title="Cant provide default implementation via ITD - 5">
  5337. <compile files="Case5.java" options="-1.9">
  5338. <!-- might possibly need more diagnostics in this case to explain what has happened -->
  5339. <message kind="error" line="10" text="can't override java.util.List&lt;java.lang.String&gt; I.foo() with java.util.List&lt;java.lang.Integer&gt; A.foo() return types don't match"/>
  5340. <message kind="error" line="15" text="can't override java.util.List&lt;java.lang.String&gt; I.foo() with java.util.List&lt;java.lang.Integer&gt; A.foo() return types don't match"/>
  5341. </compile>
  5342. </ajc-test>
  5343. <ajc-test dir="bugs150/pr110307" title="Cant provide default implementation via ITD - 6">
  5344. <compile files="Case6.java" options="-1.9">
  5345. <message kind="error" line="8" text="N cannot be resolved to a type"/>
  5346. <!--message kind="error" line="7" text="T cannot be resolved to a type"/-->
  5347. </compile>
  5348. </ajc-test>
  5349. <ajc-test dir="bugs150/pr110307" title="Cant provide default implementation via ITD - 7">
  5350. <compile files="Case7.java" options="-1.9"/>
  5351. <run class="Case7">
  5352. <stderr>
  5353. <line text="in=hello out=hello"/>
  5354. <line text="in=35 out=35"/>
  5355. <line text="in=[] out=[]"/>
  5356. </stderr>
  5357. </run>
  5358. </ajc-test>
  5359. <!-- generic ITDs -->
  5360. <ajc-test dir="java5/generics/itds/design" title="generic itds - design A">
  5361. <compile files="DesignA.java" options="-1.9"/>
  5362. </ajc-test>
  5363. <ajc-test dir="java5/generics/itds/design" title="generic itds - design B">
  5364. <compile files="DesignB.java" options="-1.9"/>
  5365. </ajc-test>
  5366. <ajc-test dir="java5/generics/itds/design" title="generic itds - design C">
  5367. <compile files="DesignC.java" options="-1.9"/>
  5368. </ajc-test>
  5369. <ajc-test dir="java5/generics/itds/design" title="generic itds - design D">
  5370. <compile files="DesignD.java" options="-1.9"/>
  5371. </ajc-test>
  5372. <ajc-test dir="java5/generics/itds/design" title="generic itds - design E">
  5373. <compile files="DesignE.java" options="-1.9"/>
  5374. </ajc-test>
  5375. <ajc-test dir="java5/generics/itds/design" title="generic itds - design F">
  5376. <compile files="DesignF.java" options="-1.9"/>
  5377. </ajc-test>
  5378. <ajc-test dir="java5/generics/itds/design" title="generic itds - design G">
  5379. <compile files="DesignG.java" options="-1.9"/>
  5380. </ajc-test>
  5381. <ajc-test dir="bugs150/pr116626" title="NPE in WeavingAdaptor">
  5382. <compile files="com/foo/bar/Test.java, TestAspect.aj" options="-1.9"/>
  5383. <run class="com.foo.bar.Test" ltw="aop.xml"
  5384. >
  5385. </run>
  5386. </ajc-test>
  5387. <ajc-test dir="bugs150/pr119657" title="IllegalAccessError with around advice on interface method call">
  5388. <compile files="services/account/StockQuoteServiceTest.java, services/accountdata/StockAccount.java, services/stockquote/StockQuoteService.java, services/stockquote/StockQuoteServiceImpl.java, services/account/AccountReport.java, accounts/recovery/Recovery.aj" options="-1.9"/>
  5389. <run class="services.account.StockQuoteServiceTest">
  5390. <stdout>
  5391. <line text="Recovery.around() call(float services.stockquote.StockQuoteService.getQuote(String))"/>
  5392. </stdout>
  5393. </run>
  5394. <run class="services.account.StockQuoteServiceTest" ltw="aop.xml">
  5395. <stdout>
  5396. <line text="Recovery.around() call(float services.stockquote.StockQuoteService.getQuote(String))"/>
  5397. </stdout>
  5398. </run>
  5399. </ajc-test>
  5400. <ajc-test dir="bugs150/pr119657" title="IllegalAccessError with around advice on interface method call not self">
  5401. <compile files="services/account/StockQuoteServiceTest.java, services/accountdata/StockAccount.java, services/stockquote/StockQuoteService.java, services/stockquote/StockQuoteServiceImpl.java, services/account/AccountReport.java, accounts/recovery/RecoveryNotSelf.aj" options="-1.9"/>
  5402. <run class="services.account.StockQuoteServiceTest">
  5403. <stdout>
  5404. <line text="RecoveryNotSelf.around() call(float services.stockquote.StockQuoteService.getQuote(String))"/>
  5405. </stdout>
  5406. </run>
  5407. <run class="services.account.StockQuoteServiceTest" ltw="aop-notself.xml">
  5408. <stdout>
  5409. <line text="RecoveryNotSelf.around() call(float services.stockquote.StockQuoteService.getQuote(String))"/>
  5410. </stdout>
  5411. </run>
  5412. </ajc-test>
  5413. <ajc-test dir="bugs150/pr119657" title="IllegalAccessError with around advice on interface method call using -XterminateAfterCompilation and LTW">
  5414. <compile files="services/account/StockQuoteServiceTest.java, services/accountdata/StockAccount.java, services/stockquote/StockQuoteService.java, services/stockquote/StockQuoteServiceImpl.java, services/account/AccountReport.java" options="-1.9"/>
  5415. <compile files="accounts/recovery/Recovery.aj" options="-1.9 -XterminateAfterCompilation"/>
  5416. <run class="services.account.StockQuoteServiceTest" ltw="aop.xml">
  5417. <stdout>
  5418. <line text="Recovery.around() call(float services.stockquote.StockQuoteService.getQuote(String))"/>
  5419. </stdout>
  5420. </run>
  5421. </ajc-test>
  5422. <ajc-test dir="bugs150/pr119657" title="IllegalAccessError with around advice on interface method call using LTW">
  5423. <compile files="services/account/StockQuoteServiceTest.java, services/accountdata/StockAccount.java, services/stockquote/StockQuoteService.java, services/stockquote/StockQuoteServiceImpl.java, services/account/AccountReport.java" options="-1.9"/>
  5424. <compile files="accounts/recovery/Recovery.aj" options="-1.9"/>
  5425. <run class="services.account.StockQuoteServiceTest" ltw="aop.xml">
  5426. <stdout>
  5427. <line text="Recovery.around() call(float services.stockquote.StockQuoteService.getQuote(String))"/>
  5428. </stdout>
  5429. </run>
  5430. </ajc-test>
  5431. <ajc-test dir="bugs150/pr119657" title="IllegalAccessError with around advice on interface method call not self using LTW">
  5432. <compile files="services/account/StockQuoteServiceTest.java, services/accountdata/StockAccount.java, services/stockquote/StockQuoteService.java, services/stockquote/StockQuoteServiceImpl.java, services/account/AccountReport.java" options="-1.9"/>
  5433. <compile files="accounts/recovery/RecoveryNotSelf.aj" options="-1.4"/>
  5434. <run class="services.account.StockQuoteServiceTest" ltw="aop-notself.xml">
  5435. <stdout>
  5436. <line text="RecoveryNotSelf.around() call(float services.stockquote.StockQuoteService.getQuote(String))"/>
  5437. </stdout>
  5438. </run>
  5439. </ajc-test>
  5440. <ajc-test dir="bugs150/pr119657" title="IllegalAccessError with around advice on interface method call self and not self using LTW">
  5441. <compile files="services/account/StockQuoteServiceTest.java, services/accountdata/StockAccount.java, services/stockquote/StockQuoteService.java, services/stockquote/StockQuoteServiceImpl.java, services/account/AccountReport.java" options="-1.9"/>
  5442. <compile files="accounts/recovery/Recovery.aj, accounts/recovery/RecoveryNotSelf.aj" options="-1.9"/>
  5443. <run class="services.account.StockQuoteServiceTest" ltw="aop-selfandnotself.xml">
  5444. <stdout>
  5445. <line text="Recovery.around() call(float services.stockquote.StockQuoteService.getQuote(String))"/>
  5446. <line text="RecoveryNotSelf.around() call(float services.stockquote.StockQuoteService.getQuote(String))"/>
  5447. </stdout>
  5448. </run>
  5449. </ajc-test>
  5450. <ajc-test dir="bugs150/pr119657" title="IllegalAccessError with around advice on interface method call using LTW and -XnoInline">
  5451. <compile files="services/account/StockQuoteServiceTest.java, services/accountdata/StockAccount.java, services/stockquote/StockQuoteService.java, services/stockquote/StockQuoteServiceImpl.java, services/account/AccountReport.java" options="-1.9"/>
  5452. <compile files="accounts/recovery/Recovery.aj" options="-1.9"/>
  5453. <run class="services.account.StockQuoteServiceTest" ltw="aop-noinline.xml">
  5454. <stdout>
  5455. <line text="Recovery.around() call(float services.stockquote.StockQuoteService.getQuote(String))"/>
  5456. </stdout>
  5457. </run>
  5458. </ajc-test>
  5459. <ajc-test dir="bugs150/pr121385" title="override protected pointcut in aop.xml concrete aspect">
  5460. <compile files="Hello.java" options="-1.5"/>
  5461. <compile files="World.aj, ConcreteWorld.aj" options="-1.4"/>
  5462. <run class="Hello" ltw="aop.xml">
  5463. <stdout>
  5464. <line text="around start!"/>
  5465. <line text="Hello"/>
  5466. <line text="around start!"/>
  5467. <line text="World"/>
  5468. <line text="around end!"/>
  5469. <line text="around end!"/>
  5470. </stdout>
  5471. </run>
  5472. </ajc-test>
  5473. </suite>