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-1.2.1.adoc 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. = AspectJ 1.2.1
  2. _© Copyright 2004 Contributors. All rights reserved._
  3. AspectJ 1.2.1 is largely a bug-fix release and the definition of the
  4. AspectJ language is unchanged from the 1.2.0 release (with the exception
  5. that AspectJ 1.2.1 permits the use of the '+' operator to concatenate
  6. the messages for declare error and warning statements). This document
  7. describes the tools differences between AspectJ versions 1.2 and 1.2.1.
  8. Users familiar with AspectJ 1.2 may find this document a quicker way to
  9. learn what changed in the tools.
  10. This document summarizes changes in:
  11. * Weaver messages
  12. * Dump support
  13. * JDT Compiler version
  14. * Line number information for join points
  15. * Runtime performance
  16. * String concatentation in declare error and warning statements
  17. * Load-time weaving support
  18. * Use of aspect libraries generated by ajc 1.2.1 with earlier versions
  19. of ajc
  20. See the link:changes.html[changes document] for more details, or
  21. xref:#allchanges[all the changes] as detailed in the bugzilla database.
  22. == Weaver Informational Messages
  23. The AspectJ 1.2.1 compiler can produce informational messages about the
  24. weaving process. To see these messages, use the -showWeaveInfo compiler
  25. option, or set showweaveinfo=true in the iajc ant task.
  26. The following is an example of the messages produced when this option is
  27. enabled:
  28. [source, text]
  29. ....
  30. C:\aspectj1.2.1\doc\examples\tjp>ajc -showWeaveInfo *.java
  31. Type 'tjp.Demo' (Demo.java:20) advised by around advice from 'tjp.GetInfo'
  32. (GetInfo.java:26) [RuntimeTest=true]
  33. Type 'tjp.Demo' (Demo.java:30) advised by around advice from 'tjp.GetInfo'
  34. (GetInfo.java:26) [RuntimeTest=true]
  35. Type 'tjp.Demo' (Demo.java:34) advised by around advice from 'tjp.GetInfo'
  36. (GetInfo.java:26) [RuntimeTest=true]
  37. ....
  38. == Dump Support
  39. In the event of a compiler crash, AspectJ 1.2.1 will produce a dump file
  40. giving important information about the state of the compiler at the time
  41. of the crash. These dump files should enable us to analyze problems more
  42. effectively. In the rare event that you witness a compiler crash, please
  43. attach the dump file to the bug report.
  44. In addition to producing a dump file when an abort condition is
  45. detected, the AspectJ 1.2.1 compiler can also be requested to create a
  46. dump file on detection of a compilation error. Set the property
  47. org.aspectj.weaver.Dump.condition=error to enable this behaviour.
  48. == JDT Compiler Version
  49. AspectJ 1.2.1 is based on the Eclipse 3.0 final JDT compiler.
  50. == Line Number Information for Join Points
  51. For source files compiled by ajc (as opposed to binary inputs to the
  52. compiler compiled with some other java compiler), ajc now emits better
  53. line number information for execution join points. In particular, for a
  54. method, constructor or advice execution join point (as matched for
  55. example by a declare error or declare warning statement), ajc 1.2.1
  56. reports the first line number of the declaration, as opposed to the line
  57. number of the first line of code in the body.
  58. == Runtime Performance
  59. AspectJ 1.2.1 contains a small number of runtime performance
  60. optimisations, including optimisations of if(true) and if(false)
  61. pointcut expressions, caching of getSignature() and toString() results
  62. on JoinPoint objects, and an optimised implementation of cflow.
  63. In the case where there are no arguments bound in the cflow pointcut,
  64. programs compiled under AspectJ 1.2.1 and that make heavy use of cflow
  65. will run significantly faster. Thanks to the abc compiler team for
  66. detecting this performance related bug and for piloting the fix.
  67. == String Concatentation in Declare Error/Warning Statements
  68. String concatentation in declare error and warning statements is now
  69. supported. For example, you can write:
  70. [source, java]
  71. ....
  72. declare warning : jdbcCall() && !inDataLayer()
  73. : "Please don't make calls to JDBC " +
  74. "outside of the data layer.";
  75. ....
  76. == Load-time Weaving Support
  77. The AspectJ 1.2.1 distribution contains a new jar in the lib directory,
  78. aspectjweaver.jar, that contains the subset of aspectjtools.jar needed
  79. for weaving only. This jar may be used in situations where you wish to
  80. exploit AspectJ's binary weaving capabilities, but do not want the full
  81. aspectjtools.jar around (aspectjweaver.jar is approx. 5 times smaller).
  82. In addition, the load-time weaving "aj" script which was included in the
  83. doc/examples/ltw directory in the 1.2 distribution has been moved into
  84. the regular bin directory. See xref:README-1.2.adoc[README-1.2] for
  85. details of using this script.
  86. == Binary Compatibility
  87. AspectJ 1.2.1 introduces a backwards-incompatible change to the class
  88. file format generated by the AspectJ compiler. Classes generated by ajc
  89. v1.2.1 cannot be used on the inpath or aspectpath of a weaver from a
  90. prior version of the compiler. Classes generated by prior versions of
  91. the compiler can of course be placed on the inpath or aspectpath of the
  92. 1.2.1 weaver.
  93. As ever, you should use the AspectJ runtime library (aspectjrt.jar) that
  94. comes with the distribution you used to build your application.
  95. '''''
  96. [[allchanges]]
  97. == All changes are listed in the bug database
  98. For a complete list of changes in the 1.2.1 release, search for
  99. `target 1.2.1` in the bug database:
  100. https://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&component=Compiler&target_milestone=1.2.1[https://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&target_milestone=1.2.1&bug_status=RESOLVED&resolution=FIXED]