Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

ajc153.xml 28KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <!-- AspectJ v1.5.3 Tests -->
  3. <suite>
  4. <ajc-test dir="bugs153/pr159143" title="declare method annotations">
  5. <compile files="DeclareMethodAnnotation.java" options="-1.5">
  6. <message line="16" kind="warning" text="all"/>
  7. <message line="17" kind="warning" text="all"/>
  8. <message line="18" kind="warning" text="all"/>
  9. <message line="22" kind="warning" text="all"/>
  10. <message line="23" kind="warning" text="all"/>
  11. <message line="24" kind="warning" text="all"/>
  12. <message line="27" kind="warning" text="all"/>
  13. <message line="28" kind="warning" text="all"/>
  14. <message line="29" kind="warning" text="all"/>
  15. <message line="33" kind="warning" text="all"/>
  16. <message line="34" kind="warning" text="all"/>
  17. <message line="35" kind="warning" text="all"/>
  18. <message line="39" kind="warning" text="all"/>
  19. <message line="40" kind="warning" text="all"/>
  20. <message line="41" kind="warning" text="all"/>
  21. </compile>
  22. </ajc-test>
  23. <ajc-test dir="bugs153/pr148908" title="ensure getSourceSignature correct with static field">
  24. <compile files="BadInterface.java" options="-emacssym"/>
  25. </ajc-test>
  26. <ajc-test dir="bugs153/pr158624" title="generics and arrays">
  27. <compile files="ValueChange.java" options="-1.5"/>
  28. </ajc-test>
  29. <ajc-test dir="bugs153/pr153845" title="IllegalStateException at GenericSignatureParser.java">
  30. <compile files="GenericType.java,Aspect.java,Aspect2.java,Interface.java" options="-1.5" outjar="blob.jar"/>
  31. <compile files="Nothing.java" aspectpath="blob.jar" options="-1.5" outjar="bang.jar"/>
  32. </ajc-test>
  33. <ajc-test dir="bugs153/pr158412" title="annotation style pointcut npe">
  34. <compile files="layering/Layering.aj,layering/SystemArchitektur.java" options="-1.5"/>
  35. </ajc-test>
  36. <ajc-test dir="bugs153/pr153464" title="negated annotation matching problem">
  37. <compile files="Bug.java" options="-1.5">
  38. <message kind="warning" line="99"/>
  39. </compile>
  40. </ajc-test>
  41. <ajc-test dir="bugs153/pr158412" title="annotation style pointcut npe - 2">
  42. <compile files="layering/Layering.aj,layering/SystemArchitektur.java,dao/Foo.java" options="-1.5">
  43. <message kind="warning" line="3" text="Whatever"/>
  44. </compile>
  45. </ajc-test>
  46. <ajc-test dir="bugs153/pr158126" title="annotations, call and constructors problem">
  47. <compile files="A.java,B.java,MyAnnotation.java,MyAspect.java" options="-1.5 -showWeaveInfo">
  48. <message kind="weave" text="Join point 'constructor-call(void B.&lt;init&gt;())' in Type 'A' (A.java:5) advised by before advice from 'MyAspect' (MyAspect.java:3)"/>
  49. <message kind="weave" text="Join point 'constructor-call(void B.&lt;init&gt;(int))' in Type 'A' (A.java:10) advised by before advice from 'MyAspect' (MyAspect.java:3)"/>
  50. <message kind="weave" text="Join point 'constructor-call(void A.&lt;init&gt;())' in Type 'A' (A.java:14) advised by before advice from 'MyAspect' (MyAspect.java:3)"/>
  51. <message kind="weave" text="Join point 'constructor-call(void A.&lt;init&gt;(int))' in Type 'A' (A.java:15) advised by before advice from 'MyAspect' (MyAspect.java:3)"/>
  52. </compile>
  53. </ajc-test>
  54. <ajc-test dir="bugs153/pr156058" title="no IllegalStateException with generic inner aspect">
  55. <compile files="Bug.java" options="-1.5">
  56. <message kind="warning" line="2" text="advice defined in MyAspect has not been applied [Xlint:adviceDidNotMatch]"/>
  57. </compile>
  58. </ajc-test>
  59. <ajc-test dir="bugs153/pr153490" title="no illegal state exception from AsmDelegate - 1">
  60. <compile files="Foo.java" options="-1.5" classpath="jarForFoo.jar" />
  61. </ajc-test>
  62. <ajc-test dir="bugs153/pr153490" title="no illegal state exception from AsmDelegate - 2">
  63. <compile files="Bar.java" options="-1.5" classpath="jarForBar.jar" />
  64. </ajc-test>
  65. <ajc-test dir="bugs153/pr153490" title="no illegal state exception from AsmDelegate - 3">
  66. <compile files="Goo.java" options="-1.5" classpath="jarForGoo.jar" />
  67. </ajc-test>
  68. <ajc-test dir="bugs153/pr156962" title="Test Annot Method">
  69. <compile files="Sample.java, WarnDeprecatedMethod.aj" options="-1.5">
  70. <message kind="warning" line="2" text="deprecated method"/>
  71. </compile>
  72. </ajc-test>
  73. <ajc-test dir="bugs153/pr156962" title="Test Annot Method Has Member">
  74. <compile files="Sample.java, LiftDeprecation.aj" options="-1.5 -XhasMember -showWeaveInfo -Xlint:ignore">
  75. <message kind="weave" text="'Sample' (Sample.java:1) is annotated with @Deprecated type annotation from 'LiftDeprecation' (LiftDeprecation.aj:2)"/>
  76. </compile>
  77. </ajc-test>
  78. <ajc-test dir="bugs153/pr152848" title="mixing generics">
  79. <compile files="PairGeneric.java" options="-1.5" outjar="pair.jar"/>
  80. <compile files="BaseType.java" options="-1.5" outjar="basetype.jar" classpath="pair.jar"/>
  81. <compile files="PairNormal.java" outjar="pair.jar"/>
  82. <compile files="AnAspect.java" options="-1.5 -Xset:runMinimalMemory=true" inpath="basetype.jar;pair.jar"/>
  83. </ajc-test>
  84. <ajc-test dir="bugs153/pr152871" title="parsing bytecode less">
  85. <compile files="MyClass.java" options="-1.5"/>
  86. <compile files="MyAspect.java" options="-1.5 -Xlint:ignore"/>
  87. <run class="a.MyClass" ltw="aop.xml">
  88. <stdout>
  89. <line text="advice running"/>
  90. <line text="hello"/>
  91. <line text="advice running"/>
  92. <line text="world"/>
  93. </stdout>
  94. </run>
  95. </ajc-test>
  96. <ajc-test dir="bugs153/pr153380/case1" title="pipelining decps">
  97. <compile files="Ann.java,Base.java,BaseImpl.java,I1.java,Mixin.java,Runner.java,X.aj" options="-1.5">
  98. <message kind="error" line="1" text="The import java.lang.retention cannot be resolved"/>
  99. <message kind="error" line="3" text="Retention cannot be resolved to a type"/>
  100. </compile>
  101. </ajc-test>
  102. <ajc-test dir="bugs153/pr154332" title="incorrect deprecated annotation processing">
  103. <compile files="Annot.java" options="-1.5">
  104. <message kind="warning" line="5" text="marker"/>
  105. <message kind="warning" line="31" text="marker"/>
  106. <message kind="warning" line="5" text="deprecated"/>
  107. <message kind="warning" line="31" text="deprecated"/>
  108. </compile>
  109. </ajc-test>
  110. <ajc-test dir="bugs153/pr148381" title="argNames and javac">
  111. <!--compile files="C.java" options="-1.5"/>
  112. <compile files="A.java" options="-1.5"/-->
  113. <compile files="Main.java,Monitor.java" options="-1.5" outjar="foo.jar" classpath="code.jar"/>
  114. <run class="test.Main" classpath="$sandbox/code.jar" ltw="aop.xml">
  115. <stderr>
  116. <line text="goo"/>
  117. </stderr>
  118. </run>
  119. </ajc-test>
  120. <ajc-test dir="bugs153/PR148219" title="unwanted warning for pointcut">
  121. <compile files="MyMessages.java" options="-1.5 -Xlint:ignore -warn:+unusedArgument"/>
  122. </ajc-test>
  123. <ajc-test dir="bugs153/pr148737" title="illegalstateexception for non generic type">
  124. <compile files="A.java" options="-source 5 -target 5">
  125. <message kind="warning" line="18" text="advice defined in TestAspect has not been applied"/>
  126. </compile>
  127. </ajc-test>
  128. <ajc-test dir="bugs153/pr149096" title="cflow xml concrete aspect">
  129. <compile files="SimpleTracing.aj" outjar="out.jar"/>
  130. <compile files="TestMain.aj"/>
  131. <run class="TestMain" ltw="aop-pr149096.xml"/>
  132. </ajc-test>
  133. <ajc-test dir="bugs153/pr149305/case1" title="ataj inheritance - 1">
  134. <compile files="AbstractOzonator.java,IdentityOzonator.java,User.java" options="-1.5"/>
  135. </ajc-test>
  136. <ajc-test dir="bugs153/pr149305/case2" title="ataj inheritance - 2">
  137. <compile files="com/codesrc/ozonator/identity/IdentityOzonator.java,com/codesrc/ozonator/identity/User.java,com/codesrc/ozonator/AbstractOzonator.java" options="-1.5"/>
  138. </ajc-test>
  139. <ajc-test dir="bugs153/pr149305/case2" title="ataj inheritance - 3">
  140. <compile files="com/codesrc/ozonator/AbstractOzonator.java,com/codesrc/ozonator/identity/IdentityOzonator.java,com/codesrc/ozonator/identity/User.java" options="-1.5"/>
  141. </ajc-test>
  142. <ajc-test dir="bugs153/pr148693" title="verification problem">
  143. <compile files="MyAspect.java" options="-1.5 -XterminateAfterCompilation=true"/>
  144. </ajc-test>
  145. <ajc-test dir="bugs153/pr148537" title="incorrect annotation value">
  146. <compile files="MyClass.java" options="-1.5">
  147. <message kind="error" line="5" text="Type mismatch: cannot convert from RetentionPolicy[] to RetentionPolicy"/>
  148. </compile>
  149. </ajc-test>
  150. <ajc-test dir="bugs153/pr145693" title="verifyErrNoTypeCflowField">
  151. <compile files="Event.java" outjar="cpath.jar"/>
  152. <compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar"/>
  153. <compile files="Sample.java" options="-Xlint:ignore" aspectpath="apath.jar" outjar="run.jar">
  154. <message kind="warning" line="8" text="Unable to determine match at this join point because the type 'Event' cannot be found"/>
  155. </compile>
  156. <run class="Sample" classpath="run.jar,apath.jar">
  157. <stderr>
  158. <line text="method running"/>
  159. </stderr>
  160. </run>
  161. </ajc-test>
  162. <ajc-test dir="bugs153/pr145693" title="verifyErrInpathNoTypeCflowField">
  163. <compile files="Event.java" outjar="cpath.jar"/>
  164. <compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar"/>
  165. <compile files="Sample.java" options="-Xlint:ignore" inpath="cpath.jar" aspectpath="apath.jar" outjar="run.jar"/>
  166. <run class="Sample" classpath="run.jar,apath.jar"/>
  167. </ajc-test>
  168. <ajc-test dir="bugs153/pr145693" title="cpathNoTypeCflowField">
  169. <compile files="Event.java" outjar="cpath.jar"/>
  170. <compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar"/>
  171. <compile files="Sample.java" options="-Xlint:ignore" classpath="cpath.jar" aspectpath="apath.jar" outjar="run.jar"/>
  172. <run class="Sample" classpath="run.jar,apath.jar"/>
  173. </ajc-test>
  174. <ajc-test dir="bugs153/pr148409" title="generic signature problem">
  175. <compile files="Blurgh.java" options="-1.5"/>
  176. <compile files="X.java" options="-1.5 -Xlint:ignore"/>
  177. <run class="Blurgh" options="-1.5" ltw="aop.xml"/>
  178. </ajc-test>
  179. <ajc-test dir="bugs153/pr149071" title="visibility problem">
  180. <compile files="AspectItd.java"/>
  181. <run class="AspectItd"/>
  182. </ajc-test>
  183. <ajc-test dir="bugs153/pr147841" title="advice not woven on aspectpath">
  184. <compile files="A.java" options="-Xlint:ignore" outjar="apath.jar"/>
  185. <!--compile files="C.java" outjar="cpa.jar" classpath="cpath.jar"/-->
  186. <compile files="C.java" options="-showWeaveInfo" aspectpath="apath.jar">
  187. <message kind="weave" text="foo"/>
  188. </compile>
  189. <run class="C">
  190. <stderr>
  191. <line text="foo"/>
  192. </stderr>
  193. </run>
  194. </ajc-test>
  195. <ajc-test dir="bugs153/pr145018" title="ataj crashing with cflow, if and args">
  196. <compile files="Broken.aj" options="-1.5"/>
  197. <run class="Broken">
  198. <stderr>
  199. <line text="ahhh"/>
  200. </stderr>
  201. </run>
  202. </ajc-test>
  203. <ajc-test dir="bugs153/pr150095" title="generics, inheritance and decp">
  204. <compile files="Foo.java" options="-1.5"/>
  205. </ajc-test>
  206. <ajc-test dir="bugs153/pr121805" title="ambiguous binding">
  207. <compile files="Complex.java"/>
  208. </ajc-test>
  209. <ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace before">
  210. <compile files="hello/HelloWorld.java hello/ThrowExceptionBefore.aj"/>
  211. <run class="hello.HelloWorld">
  212. <stderr>
  213. <line text="hello.HelloWorld.println(HelloWorld.java:14)"/>
  214. <line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
  215. <line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
  216. </stderr>
  217. </run>
  218. </ajc-test>
  219. <ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace before - binary">
  220. <compile inpath="helloworld.jar" files="hello/ThrowExceptionBefore.aj"/>
  221. <run class="hello.HelloWorld">
  222. <stderr>
  223. <line text="hello.HelloWorld.println(HelloWorld.java:14)"/>
  224. <line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
  225. <line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
  226. </stderr>
  227. </run>
  228. </ajc-test>
  229. <ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace after">
  230. <compile files="hello/HelloWorld.java hello/ThrowExceptionAfter.aj"/>
  231. <run class="hello.HelloWorld">
  232. <stderr>
  233. <line text="hello.HelloWorld.println(HelloWorld.java:15)"/>
  234. <line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
  235. <line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
  236. </stderr>
  237. </run>
  238. </ajc-test>
  239. <ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace around">
  240. <compile files="hello/HelloWorld.java hello/ThrowExceptionAround.aj" options="-XnoInline"/>
  241. <run class="hello.HelloWorld">
  242. <stderr>
  243. <line text="hello.HelloWorld.println(HelloWorld.java:13)"/>
  244. <line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
  245. <line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
  246. </stderr>
  247. </run>
  248. </ajc-test>
  249. <ajc-test dir="bugs153/pr149322" title="can't find type on interface call 1">
  250. <compile files="Interface.java"/>
  251. <compile
  252. files="Missing.java"
  253. outjar="missing.jar"
  254. />
  255. <compile files="TestWithMissing.java" classpath="missing.jar"/>
  256. <compile files="Aspect1.aj" options="-showWeaveInfo -inpath ." classpath="missing.jar">
  257. <message kind="weave" text="void Interface.interfaceMethod()"/>
  258. <message kind="weave" text="void Missing.interfaceMethod()"/>
  259. </compile>
  260. <compile files="Aspect1.aj" options="-Xlint:warning -showWeaveInfo -inpath .">
  261. <message kind="weave" text="void Interface.interfaceMethod()"/>
  262. <message kind="warning" text="can't determine superclass of missing type Missing"/>
  263. </compile>
  264. <run class="TestWithMissing">
  265. <stdout>
  266. <line text="Aspect1.before() interfaceMethod"/>
  267. <line text="Missing.interfaceMethod()"/>
  268. <!--
  269. <line text="Aspect1.before() interfaceMethod"/>
  270. -->
  271. <line text="Missing.interfaceMethod()"/>
  272. <line text="Missing.missingMethod()"/>
  273. </stdout>
  274. </run>
  275. </ajc-test>
  276. <ajc-test dir="bugs153/pr149322" title="can't find type on interface call 2">
  277. <compile files="Interface.java"/>
  278. <compile
  279. files="Missing.java"
  280. outjar="missing.jar"
  281. />
  282. <compile files="TestWithMissing.java" classpath="missing.jar"/>
  283. <compile files="Aspect2.aj" options="-showWeaveInfo -inpath ." classpath="missing.jar">
  284. <message kind="weave" text="void Interface.interfaceMethod()"/>
  285. <message kind="weave" text="void Missing.interfaceMethod()"/>
  286. </compile>
  287. <compile files="Aspect2.aj" options="-Xlint:warning -showWeaveInfo -inpath .">
  288. <message kind="weave" text="void Interface.interfaceMethod()"/>
  289. <message kind="warning" text="can't determine whether missing type Missing is an instance of Interface"/>
  290. <message kind="warning" text="can't determine superclass of missing type Missing"/>
  291. </compile>
  292. <run class="TestWithMissing">
  293. <stdout>
  294. <line text="Aspect2.before() interfaceMethod"/>
  295. <line text="Missing.interfaceMethod()"/>
  296. <!--
  297. <line text="Aspect2.before() interfaceMethod"/>
  298. -->
  299. <line text="Missing.interfaceMethod()"/>
  300. <line text="Missing.missingMethod()"/>
  301. </stdout>
  302. </run>
  303. </ajc-test>
  304. <ajc-test dir="bugs153/pr149322" title="can't find type on interface call 3">
  305. <compile files="Interface.java"/>
  306. <compile
  307. files="Missing.java"
  308. outjar="missing.jar"
  309. />
  310. <compile files="TestWithMissing.java" classpath="missing.jar"/>
  311. <compile files="Aspect3.aj" options="-showWeaveInfo -inpath ." classpath="missing.jar">
  312. <message kind="weave" text="void Interface.interfaceMethod()"/>
  313. <message kind="weave" text="void Missing.interfaceMethod()"/>
  314. </compile>
  315. <compile files="Aspect3.aj" options="-Xlint:warning -showWeaveInfo -inpath .">
  316. <message kind="weave" text="void Interface.interfaceMethod()"/>
  317. <message kind="warning" text="can't determine whether missing type Missing is an instance of Interface"/>
  318. <message kind="warning" text="can't determine superclass of missing type Missing"/>
  319. </compile>
  320. <run class="TestWithMissing">
  321. <stdout>
  322. <line text="Aspect3.before() interfaceMethod"/>
  323. <line text="Missing.interfaceMethod()"/>
  324. <!--
  325. <line text="Aspect3.before() interfaceMethod"/>
  326. -->
  327. <line text="Missing.interfaceMethod()"/>
  328. <line text="Missing.missingMethod()"/>
  329. </stdout>
  330. </run>
  331. </ajc-test>
  332. <ajc-test dir="bugs153" title="match volatile field">
  333. <compile files="pr150671.aj" options="-Xset:activateLightweightDelegates=false">
  334. <message kind="error" line="7" text="Changing state"/>
  335. <message kind="error" line="8" text="test"/>
  336. </compile>
  337. </ajc-test>
  338. <ajc-test dir="java5/ataspectj" title="Duplicate JVMTI agents">
  339. <compile files="HelloWorld.java"/>
  340. <compile files="MessageHandler.java"/>
  341. <!-- <compile files="Aspect.aj" options="-outxml"/> -->
  342. <compile files="Aspect.aj" options="-outxml -outjar aspects.jar"/>
  343. <ant file="ajc-ant.xml" target="Duplicate JVMTI agents" verbose="true"/>
  344. </ajc-test>
  345. <ajc-test dir="bugs153/pr151978" title="generics problem">
  346. <compile files="IMessage.java" options="-1.5">
  347. </compile>
  348. </ajc-test>
  349. <ajc-test dir="bugs153/pr152631" title="decp and cflowadder munger clash">
  350. <compile files="EMA.java" options="-1.5"/>
  351. </ajc-test>
  352. <ajc-test dir="bugs153/pr153572" title="LTWWorld with annotation matching">
  353. <compile
  354. files="Configurable.java, AnnotationMatcher.aj"
  355. options="-1.5"
  356. outjar="aspectlib.jar"
  357. outxmlfile="META-INF/aop.xml"/>
  358. <compile files="Configurable.java,Annotated.java,Main.java" options="-1.5" outjar="myapp.jar"/>
  359. <run class="Main" ltw="">
  360. <stdout>
  361. <line text="annotated type initialized"/>
  362. </stdout>
  363. </run>
  364. </ajc-test>
  365. <ajc-test dir="bugs153/pr149560" title="incorrect staticinitialization weaving - codestyle">
  366. <compile files="CodeStyle.java" options="-1.5 -showWeaveInfo">
  367. <message kind="weave" text="Join point 'staticinitialization(void MyAspect.&lt;clinit&gt;())' in Type 'MyAspect' (CodeStyle.java:3) advised by after advice from 'MyAspect' (CodeStyle.java:4)"/>
  368. <message kind="weave" test="Join point 'staticinitialization(void CodeStyle.&lt;clini&gt;())' in Type 'CodeStyle' (CodeStyle.java:9) advised by after advice from 'MyAspect' (CodeStyle.java:4)"/>
  369. </compile>
  370. <run class="CodeStyle">
  371. <stdout>
  372. <line text="after initialization staticinitialization(MyAspect.&lt;clinit&gt;)"/>
  373. <line text="after initialization staticinitialization(CodeStyle.&lt;clinit&gt;)"/>
  374. <line text="InstanceExists?true"/>
  375. </stdout>
  376. </run>
  377. </ajc-test>
  378. <ajc-test dir="bugs153/pr149560" title="incorrect staticinitialization weaving - annstyle">
  379. <compile files="AnnStyle.java" options="-1.5 -showWeaveInfo">
  380. <message kind="weave" text="Join point 'staticinitialization(void MyAspect.&lt;clinit&gt;())' in Type 'MyAspect' (AnnStyle.java:5) advised by after advice from 'MyAspect' (AnnStyle.java:7)"/>
  381. <message kind="weave" test="Join point 'staticinitialization(void AnnStyle.&lt;clini&gt;())' in Type 'AnnStyle' (AnnStyle.java:12) advised by after advice from 'MyAspect' (AnnStyle.java:7)"/>
  382. </compile>
  383. <run class="AnnStyle">
  384. <stdout>
  385. <line text="after initialization staticinitialization(MyAspect.&lt;clinit&gt;)"/>
  386. <line text="after initialization staticinitialization(AnnStyle.&lt;clinit&gt;)"/>
  387. <line text="InstanceExists?true"/>
  388. </stdout>
  389. </run>
  390. </ajc-test>
  391. <ajc-test dir="ltw" title="reweavableAspectNotRegistered error">
  392. <compile files="HelloWorld.java, ExceptionHandler.aj" options="-showWeaveInfo">
  393. <message kind="weave" text="Join point 'method-execution(void HelloWorld.main(java.lang.String[]))' in Type 'HelloWorld' (HelloWorld.java:3) advised by around advice from 'ExceptionHandler' (ExceptionHandler.aj:2)"/>
  394. </compile>
  395. <compile files="EmptyAspect.aj">
  396. </compile>
  397. <run class="HelloWorld" ltw="aop-missingaspect.xml">
  398. <stdout>
  399. <line text="Hello World!"/>
  400. </stdout>
  401. <stderr>
  402. <line text="error aspect 'ExceptionHandler' woven into 'HelloWorld' must be defined to the weaver (placed on the aspectpath, or defined in an aop.xml file if using LTW)."/>
  403. </stderr>
  404. </run>
  405. </ajc-test>
  406. <ajc-test dir="bugs153/pr155972" title="NPE in ConstructorSignatureImpl">
  407. <compile files="ConstructorTest.java, SignatureImplAspect.aj" options="-Xlint:ignore"/>
  408. <run class="ConstructorTest">
  409. <stdout>
  410. <line text="ConstructorTest"/>
  411. </stdout>
  412. </run>
  413. </ajc-test>
  414. <ajc-test dir="bugs153/pr155972" title="NPE in FieldSignatureImpl">
  415. <compile files="FieldTest.java, SignatureImplAspect.aj" options="-Xlint:ignore"/>
  416. <run class="FieldTest">
  417. <stdout>
  418. <line text="intField"/>
  419. </stdout>
  420. </run>
  421. </ajc-test>
  422. <ajc-test dir="bugs153/pr155972" title="NPE in InitializerSignatureImpl">
  423. <compile files="InitializerTest.java, SignatureImplAspect.aj" options="-Xlint:ignore"/>
  424. <run class="InitializerTest">
  425. <stdout>
  426. <line text="InitializerTest"/>
  427. </stdout>
  428. </run>
  429. </ajc-test>
  430. <ajc-test dir="bugs153/pr155763" title="ensure LineNumberTable correct with generics, for each and continue">
  431. <compile files="Test.java" options="-1.5">
  432. <message kind="warning" line="27" text="adviceDidNotMatch"/>
  433. </compile>
  434. </ajc-test>
  435. <ajc-test dir="bugs153/pr157474" title="TestServer with duplicate configuration" keywords="ltw,server">
  436. <compile files="AbstractTracing.aj" options="-outjar library.jar -outxml"/>
  437. <compile files="HelloWorld.java" options="-outjar application.jar"/>
  438. <ant file="ant-server.xml" target="TestServer with duplicate configuration" verbose="true">
  439. <stdout>
  440. <line text="Starting ..."/>
  441. <line text="Running HelloWorld"/>
  442. <line text="? main"/>
  443. <line text="Hello World!"/>
  444. <line text="Stopping ..."/>
  445. </stdout>
  446. </ant>
  447. </ajc-test>
  448. <ajc-test dir="bugs153/pr151772" title="ensure declare soft doesn't allow undeclared exception in anonymous inner class">
  449. <compile files="Softener.aj"/>
  450. </ajc-test>
  451. <ajc-test dir="bugs153/pr151772" title="ensure declare soft doesn't allow undeclared exception in anonymous inner class - 2">
  452. <compile files="Softener2.aj">
  453. <message kind="error" line="18" text="Unhandled exception type SQLException"/>
  454. </compile>
  455. </ajc-test>
  456. <ajc-test dir="bugs153/pr125981" title="declare soft and inner classes">
  457. <compile files="SampleTest.java"/>
  458. </ajc-test>
  459. <ajc-test dir="bugs153/pr156904/inSameFile" title="ensure no invalidAbsoluteTypeName when do match - 1">
  460. <compile files="A.aj"/>
  461. </ajc-test>
  462. <ajc-test dir="bugs153/pr156904/inDiffPkgAndImport" title="ensure no invalidAbsoluteTypeName when do match - 2">
  463. <compile files="A.aj,Outer.java"/>
  464. </ajc-test>
  465. <ajc-test dir="bugs153/pr156904/inSamePkg" title="ensure no invalidAbsoluteTypeName when do match - 3">
  466. <compile files="A.aj,Outer.java"/>
  467. </ajc-test>
  468. <ajc-test dir="bugs153/pr156904/inDiffPkgWithoutImport" title="ensure no invalidAbsoluteTypeName when do match - 4">
  469. <compile files="A.aj,Outer.java">
  470. <message kind="warning" line="5" text="no match for this type name: Outer [Xlint:invalidAbsoluteTypeName]"/>
  471. </compile>
  472. </ajc-test>
  473. <ajc-test dir="ltw" title="NPE with custom agent" keywords="ltw">
  474. <compile files="java/net/URLClassLoader.java"/>
  475. <compile files="HelloWorld.java" options="-outjar hello.jar"/>
  476. <compile files="ExceptionHandler.aj" options="-outxml -outjar handler.jar"/>
  477. <compile files="NullSecurityManager.java" options="-outjar security.jar"/>
  478. <ant file="ant.xml" target="NPE with custom agent" verbose="true">
  479. <stdout>
  480. <line text="Hello World!"/>
  481. </stdout>
  482. </ant>
  483. </ajc-test>
  484. <ajc-test dir="bugs153/pr132080"
  485. title="Weave concrete sub-aspect with advice"
  486. keywords="aop.xml">
  487. <compile
  488. files="HelloWorld.java"
  489. >
  490. </compile>
  491. <compile files="AbstractSuperAspect.aj"/>
  492. <compile files="TestAdvice.aj"/>
  493. <run class="HelloWorld" ltw="aop-advice.xml">
  494. <stdout>
  495. <line text="? ConcreteAspectWithAdvice()"/>
  496. <line text="? void HelloWorld.main(String[])"/>
  497. <line text="? HelloWorld()"/>
  498. <line text="Hello World!"/>
  499. </stdout>
  500. </run>
  501. </ajc-test>
  502. <ajc-test dir="bugs153/pr132080"
  503. title="Weave concrete sub-aspect with ITD"
  504. keywords="aop.xml">
  505. <!--
  506. <compile files="AbstractSuperAspectWithInterface.aj, TestInterface.java" options="-verbose"/>
  507. <compile files="HelloWorld.java, TestITD.aj, ConcreteAspectWithITD.aj" options="-verbose">
  508. <message line="3" kind="warning" text="this affected type is not exposed to the weaver: AbstractSuperAspectWithInterface"/>
  509. </compile>
  510. <run class="HelloWorld">
  511. <stdout>
  512. <line text="? void TestITD.interfaceMethod()"/>
  513. <line text="? void HelloWorld.main(String[])"/>
  514. <line text="Hello World!"/>
  515. </stdout>
  516. </run>
  517. -->
  518. <compile files="HelloWorld.java"/>
  519. <compile files="AbstractSuperAspectWithInterface.aj, TestInterface.java"/>
  520. <compile files="TestITD.aj">
  521. <message line="3" kind="warning" text="this affected type is not exposed to the weaver: AbstractSuperAspectWithInterface"/>
  522. </compile>
  523. <run class="HelloWorld" ltw="aop-itd.xml">
  524. <stdout>
  525. <line text="? void TestITD.interfaceMethod()"/>
  526. <line text="? void HelloWorld.main(String[])"/>
  527. <line text="Hello World!"/>
  528. </stdout>
  529. </run>
  530. </ajc-test>
  531. <ajc-test dir="bugs153/pr132080" title="Weave concrete sub-aspect with around closure"
  532. keywords="aop.xml">
  533. <compile files="HelloWorld.java"/>
  534. <compile files="AbstractSuperAspect.aj"/>
  535. <compile files="TestAroundClosure.aj"/>
  536. <run class="HelloWorld" ltw="aop-aroundclosure.xml">
  537. <stdout>
  538. <line text="&rt; ConcreteAspectWithAroundClosure()"/>
  539. <line text="&lt; ConcreteAspectWithAroundClosure()"/>
  540. <line text="? void HelloWorld.main(String[])"/>
  541. <line text="&rt; HelloWorld()"/>
  542. <line text="&lt; HelloWorld()"/>
  543. <line text="Hello World!"/>
  544. </stdout>
  545. </run>
  546. </ajc-test>
  547. <ajc-test dir="bugs153/pr149096" title="Weave concrete sub-aspect with cflow">
  548. <compile files="SimpleTracing.aj" outjar="out.jar"/>
  549. <compile files="TestMain.aj"/>
  550. <run class="TestMain" ltw="aop-pr149096.xml"/>
  551. </ajc-test>
  552. </suite>