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.

README-168.html 4.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  2. <html> <head>
  3. <title>AspectJ 1.6.8 Readme</title>
  4. <style type="text/css">
  5. <!--
  6. P { margin-left: 20px; }
  7. PRE { margin-left: 20px; }
  8. LI { margin-left: 20px; }
  9. H4 { margin-left: 20px; }
  10. H3 { margin-left: 10px; }
  11. -->
  12. </style>
  13. </head>
  14. <body>
  15. <div align="right"><small>
  16. &copy; Copyright 2009 Contributors.
  17. All rights reserved.
  18. </small></div>
  19. <h1>AspectJ 1.6.8 Readme</h1>
  20. <p>The first sentence in the 1.6.7 readme was 'AspectJ 1.6.7 includes some radical internal changes.'</p>
  21. <p>Unfortunately not enough testing was done on 1.6.7 and two nasty issues were found that really needed addressing. Fixes for
  22. these issues are all that is new in 1.6.8.</p>
  23. <h2>Incorrect treatment of some aop.xml include/exclude patterns</h2>
  24. <p>See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298786">Bug 298786</a></p>
  25. <p>Basically, if a certain combination of includes and excludes were specified in the within section, then the weaver
  26. would fail to merge them correctly. The conditions for the failure are: </p>
  27. <ul>
  28. <li>you need an exclude pattern that the weaver is not optimizing for (basically a pattern that could not be matched based upon
  29. the typename alone, eg. based on whether the type has an annotation)
  30. <li>you need two include patterns - one that is being optimized and one that is not
  31. </ul>
  32. <p>
  33. These three meet that spec:</p>
  34. <code><pre>
  35. &lt;include within="*"/&gt;
  36. &lt;include within="@Foo *"/&gt;
  37. &lt;exclude within="*Funk*y*"/&gt;
  38. </pre></code>
  39. <p>The include="*" can be optimized. The include="@Foo *" is not optimized. The exclude="*Funk*y*" is not
  40. optimized (this one could be but isn't right now as it includes multiple wildcards).</p>
  41. <p>With that configuration any types that the include="*" would have accepted are
  42. not accepted.</p>
  43. <h2>Stack overflow problem in ReferenceType.isAssignableFrom()</h2>
  44. <p>See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298908">Bug 298908</a></p>
  45. <p>This is actually a problem AspectJ has had for a long time, but has always proved elusive to recreate. It turns out
  46. that it is memory related and the more aggressive policy in 1.6.7 causes it to occur much more frequently.</p>
  47. <p>The stack trace when this is hit looks like:</p>
  48. <code><pre>
  49. ...
  50. at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:393)
  51. at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:427)
  52. at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:393)
  53. at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:427)
  54. at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:393)
  55. at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:427)
  56. at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:393)
  57. at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:427)
  58. at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:393)
  59. at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:427)
  60. at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:393)
  61. ...
  62. </pre></code>
  63. <p>The weaver has changed over the 1.5 and 1.6 releases and is now reaching a point where it really shrinks quite
  64. small when not in use (maybe in a loadtime environment you have finished loading all your classes). The aim is that
  65. it can rebuild any required state that is needed later. With the move in 1.6.7 from Soft to Weak references, things are
  66. being discarded much sooner and this is exercising the state rebuilding code that wasn't used that often prior to 1.6.7.</p>
  67. <p>The problem is actually because the call on a generic type to get the raw type was actually broken
  68. and returning the generic type. This then loops forever trying to get the raw type from the generic type. This happens because
  69. the world should store only raw types (which point to their generic form) but there was a bug in state rebuilding that instead
  70. put the generic type directly in the world.</p>
  71. <hr>
  72. Thanks to everyone who helped get to the bottom of these problems.
  73. <h4>
  74. <!-- ============================== -->
  75. </body>
  76. </html>