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.

misuse.xml 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <!-- AspectJ v1.5.0 Tests -->
  3. <suite>
  4. <comment>this one is ok - too simple - could be removed..</comment>
  5. <ajc-test dir="java5/ataspectj"
  6. pr="" title="@Aspect class extending @Aspect class">
  7. <compile files="ataspectj/misuse/Test005.java" options="-1.5 -Xdev:NoAtAspectJProcessing">
  8. </compile>
  9. </ajc-test>
  10. <comment>just a warning - might be skept if further optimized in Aj5Attributes..</comment>
  11. <ajc-test dir="java5/ataspectj"
  12. pr="" title="class with @Before extending @Aspect class">
  13. <compile files="ataspectj/misuse/Test006.java" options="-1.5 -Xdev:NoAtAspectJProcessing">
  14. <!-- FIXME AV - optim in place. Check and remove useless test -->
  15. <!--<message kind="warning" line="11" text="Found @AspectJ annotations in a non @Aspect type 'ataspectj.misuse.Test006B'"/>-->
  16. </compile>
  17. </ajc-test>
  18. <comment>a warning. We ignore the pointcut (TBD) - line is enclosing class (TBD Andy do better ?)</comment>
  19. <ajc-test dir="java5/ataspectj"
  20. pr="" title="@Pointcut not returning void">
  21. <compile files="ataspectj/misuse/Test008.java" options="-1.5 -Xdev:NoAtAspectJProcessing">
  22. <message kind="warning" line="9" text="Found @Pointcut on a method not returning void 'someCall()I'"/>
  23. </compile>
  24. </ajc-test>
  25. <!-- <ajc-test dir="java5/ataspectj"-->
  26. <!-- pr="" title="@Aspect on interface">-->
  27. <!-- <compile files="ataspectj/misuse/Test010.java" options="-1.5 -Xdev:NoAtAspectJProcessing">-->
  28. <!-- <message kind="warning" line="7" text="Found @Aspect on an interface type 'ataspectj.misuse.Test010'"/>-->
  29. <!-- </compile>-->
  30. <!-- </ajc-test>-->
  31. <comment>line is enclosing class - TBD</comment>
  32. <ajc-test dir="java5/ataspectj"
  33. pr="" title="@Pointcut with garbage string">
  34. <compile files="ataspectj/misuse/Test014.java" options="-1.5 -Xdev:NoAtAspectJProcessing">
  35. <message kind="error" line="7" text="Cannot parse @Pointcut 'call%dddd"/>
  36. </compile>
  37. </ajc-test>
  38. <comment>line is enclosing class - TBD</comment>
  39. <ajc-test dir="java5/ataspectj"
  40. pr="" title="@Pointcut with throws clause">
  41. <compile files="ataspectj/misuse/Test016.java" options="-1.5 -Xdev:NoAtAspectJProcessing">
  42. <message kind="warning" line="7" text="Found @Pointcut on a method throwing exception 'someCall()V'"/>
  43. </compile>
  44. </ajc-test>
  45. <comment>very dirty hack - can't get this location to work properly so added match all error..</comment>
  46. <ajc-test dir="java5/ataspectj"
  47. pr="" title="@AfterReturning with wrong number of args">
  48. <compile files="ataspectj/misuse/Test019.java" options="-1.5 -Xdev:NoAtAspectJProcessing -Xlint:ignore">
  49. <message kind="error" line="1" text="the parameter x is not bound"/>
  50. <message kind="error"/>
  51. </compile>
  52. </ajc-test>
  53. <comment>line number is enclosing type</comment>
  54. <ajc-test dir="java5/ataspectj"
  55. pr="" title="@Before on non-public method">
  56. <compile files="ataspectj/misuse/Test020.java" options="-1.5 -Xdev:NoAtAspectJProcessing -Xlint:ignore">
  57. <message kind="error" line="7" text="Found @AspectJ annotation on a non public advice 'someCall()V'"/>
  58. </compile>
  59. </ajc-test>
  60. <comment>line number is enclosing type</comment>
  61. <ajc-test dir="java5/ataspectj"
  62. pr="" title="@Before on method not returning void">
  63. <compile files="ataspectj/misuse/Test021.java" options="-1.5 -Xdev:NoAtAspectJProcessing -Xlint:ignore">
  64. <message kind="error" line="7" text="Found @AspectJ annotation on a non around advice not returning void 'someCall()I'"/>
  65. </compile>
  66. </ajc-test>
  67. <!--
  68. ALEX: todo
  69. <ajc-test dir="java5/ataspectj/coverage"
  70. pr="" title="@Pointcut with wrong number of args">
  71. <compile files="ataspectj/misuse/Test022.java" options="-1.5 -Xdev:NoAtAspectJProcessing">
  72. <message kind="error" line="8" text="int x is not declared in the pointcut parameters"/>
  73. </compile>
  74. </ajc-test>
  75. <ajc-test dir="java5/ataspectj/coverage"
  76. pr="" title="@Around given an extension of ProceedingJoinPoint">
  77. <compile files="ataspectj/misuse/Test031.java" options="-1.5 -Xdev:NoAtAspectJProcessing">
  78. <message kind="error" line="9" text="Is this an error?"/>
  79. </compile>
  80. </ajc-test>
  81. <ajc-test dir="java5/ataspectj/coverage"
  82. pr="" title="calling @Before advice explicitly as a method">
  83. <compile files="ataspectj/misuse/Test032.java" options="-1.5 -Xdev:NoAtAspectJProcessing">
  84. <message kind="error" line="14" text="Advice should never be called explicitly"/>
  85. </compile>
  86. </ajc-test>
  87. <ajc-test dir="java5/ataspectj/coverage"
  88. pr="" title="@Before on Interface method">
  89. <compile files="ataspectj/misuse/Test033.java" options="-1.5 -Xdev:NoAtAspectJProcessing">
  90. <message kind="error" line="4" text="The annotation @Before is disallowed for this location"/>
  91. </compile>
  92. </ajc-test>
  93. <ajc-test dir="java5/ataspectj/coverage"
  94. pr="" title="@Before and @After on one method">
  95. <compile files="ataspectj/misuse/Test035.java" options="-1.5 -Xdev:NoAtAspectJProcessing">
  96. <message kind="error" line="7" text="A method may only be declared as advice once"/>
  97. </compile>
  98. </ajc-test>
  99. <ajc-test dir="java5/ataspectj/coverage"
  100. pr="" title="@Before advice with empty string">
  101. <compile files="ataspectj/misuse/Test037.java" options="-1.5 -Xdev:NoAtAspectJProcessing">
  102. </compile>
  103. </ajc-test>
  104. <ajc-test dir="java5/ataspectj/coverage"
  105. pr="" title="@Pointcut with an empty string">
  106. <compile files="ataspectj/misuse/Test039.java" options="-1.5 -Xdev:NoAtAspectJProcessing">
  107. </compile>
  108. </ajc-test>
  109. <ajc-test dir="java5/ataspectj/coverage"
  110. pr="" title="@Before with AND in string">
  111. <compile files="ataspectj/misuse/Test040.java" options="-1.5 -Xdev:NoAtAspectJProcessing">
  112. </compile>
  113. </ajc-test>
  114. -->
  115. </suite>