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.

Changes.md 16KB

5 months ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. ### Changes
  2. #### version 3.30.1 on December 17, 2023
  3. * GitHub Issue #471
  4. #### version 3.30 on December 17, 2023
  5. * GitHub PR #434, 448, 463 (Issue #462), 466, 467, 468, 469, 470,
  6. #### version 3.29.2 on September 14, 2022
  7. - GitHub Issue #427.
  8. #### version 3.29.1 on August 11, 2022
  9. * GitHub Issue #423.
  10. * `Readme.html` was deleted (GitHub Issue #414).
  11. #### version 3.29 on May 13, 2022
  12. * GitHub Issue #378, PR #278, #299, #382, #383, #390, #391, #395, #399, #409.
  13. #### version 3.28 on May 8, 2021
  14. * GitHub Issue #305, #328, #339, #350, #357, and PR #363.
  15. #### version 3.27 on March 19, 2020
  16. * GitHub Issue #271 (PR #279), #280 (PR #281), #282, and PR #294.
  17. #### version 3.26 on October 3, 2019
  18. * GitHub Issue #270 (PR #272), #265 (PR #267), #271, #222, and #275.
  19. #### version 3.25 on April 16, 2019
  20. * GitHub Issue #72 (PR #231), #241, #242 (PR #243), PR #244,
  21. #246 (PR #247), PR #250, #252 (PR #253), PR #254.
  22. #### version 3.24.1 on December 9, 2018
  23. * GitHub Issue #228, #229
  24. #### version 3.24 on November 1, 2018
  25. * Java 11 supports.
  26. * JIRA JASSIST-267.
  27. * Github PR #218.
  28. #### version 3.23.1 on July 2, 2018
  29. * Github PR #171.
  30. #### version 3.23 on June 21, 2018
  31. * Fix leaking file handlers in ClassPool and removed ClassPath.close(). Github issue #165.
  32. #### version 3.22 on October 10, 2017
  33. * Java 9 supports.
  34. * JIRA JASSIST-261.
  35. #### version 3.21 on October 4, 2016
  36. * JIRA JASSIST-244, 245, 248, 250, 255, 256, 259, 262.
  37. * `javassist.tools.Callback` was modified to be Java 1.4 compatible.
  38. The parameter type of `Callback#result()` was changed.
  39. * The algorithm for generating a stack-map table was modified to fix github issue #83.
  40. * A bug of ProxyFactory related to default methods was fixed. It is github issue #45.
  41. #### version 3.20 on June 25, 2015
  42. * JIRA JASSIST-241, 242, 246.
  43. #### version 3.19 on January 6, 2015
  44. * JIRA JASSIST-158, 205, 206, 207, 208, 209, 211, 212, 216, 220, 223, 224,
  45. 227, 230, 234, 235, 236, 237, 238, 240.
  46. #### version 3.18 on June 3, 2013
  47. * The source code repository has been moved to [GitHub](https://github.com/jboss-javassist/javassist).
  48. * JIRA JASSIST-181, 183, 184, 189, 162, 185, 186, 188, 190, 195, 199, 201.
  49. #### version 3.17.1 on December 3, 2012
  50. * JIRA JASSIST-177, 178, 182.
  51. #### version 3.17 on November 8, 2012
  52. * OSGi bundle info is now included in the jar file.
  53. * A stackmap generator has been rewritten.
  54. * JIRA JASSIST-160, 163, 166, 168, 170, 171, 174, 175, 176 have been fixed.
  55. #### version 3.16.1 on March 6, 2012
  56. * Maven now works. JIRA JASSIST-44, 106, 156 have been fixed.
  57. #### version 3.16 on February 19, 2012
  58. * JIRA JASSIST-126, 127, 144, 145, 146, 147, 149, 150, 151, 152, 153, 155.
  59. * `javassist.bytecode.analysis.ControlFlow` was added.
  60. * Java 7 compatibility.
  61. #### version 3.15 on July 8, 2011
  62. * The license was changed to MPL/LGPL/Apache triple.
  63. * JIRA JASSIST-138 and 142 were fixed.
  64. #### version 3.14 on October 5, 2010
  65. * JIRA JASSIST-121, 123, 128, 129, 130, 131, 132.
  66. #### version 3.13 on July 19, 2010
  67. * JIRA JASSIST-118, 119, 122, 124, 125.
  68. #### version 3.12.1 on June 10, 2010
  69. #### version 3.12 on April 16, 2010
  70. #### version 3.11 on July 3, 2009
  71. * JIRA JASSIST-67, 68, 74, 75, 76, 77, 81, 83, 84, 85, 86, 87 were fixed.
  72. * Now javassist.bytecode.CodeIterator can insert a gap into
  73. a large method body more than 32KB. (JIRA JASSIST-79, 80)
  74. #### version 3.10 on March 5, 2009
  75. * JIRA JASSIST-69, 70, 71 were fixed.
  76. #### version 3.9 on October 9, 2008
  77. * ClassPool.makeClassIfNew(InputStream) was implemented.
  78. * CtNewMethod.wrapped(..) and CtNewConstructor.wrapped(..)
  79. implicitly append a method like _added_m$0.
  80. This method now has a synthetic attribute.
  81. * JIRA JASSIST-66 has been fixed.
  82. #### version 3.8.1 on July 17, 2008
  83. * CtClass.rebuildClassFile() has been added.
  84. * A few bugs of javassist.bytecode.analysis have been fixed.
  85. 3.8.0 could not correctly deal with one letter class name
  86. such as I and J.
  87. #### version 3.8.0 on June 13, 2008
  88. * javassist.bytecode.analysis was implemented.
  89. * JASSIST-45, 47, 51, 54-57, 60, 62 were fixed.
  90. #### version 3.7.1 on March 10, 2008
  91. * a bug of javassist.util.proxy has been fixed.
  92. #### version 3.7 on January 20, 2008
  93. * Several minor bugs have been fixed.
  94. #### version 3.6.0 on September 13, 2007
  95. #### version 3.6.0.CR1 on July 27, 2007
  96. * The stack map table introduced since Java 6 has been supported.
  97. * CtClass#getDeclaredBehaviors() now returns a class initializer
  98. as well as methods and constructors.
  99. * The default status of automatic pruning was made off.
  100. Instead of pruning, this version of Javassist compresses
  101. the data structure of a class file after toBytecode() is called.
  102. The compressed class file is automatically decompressed when needed.
  103. This saves memory space better than pruning.
  104. * [JIRA JASSIST-33](http://jira.jboss.com/jira/browse/JASSIST-33) has been fixed.
  105. #### version 3.5 on April 29, 2007
  106. * Various minor updates.
  107. #### version 3.4 on November 17, 2006
  108. * A bug in CodeConverter#replaceFieldRead() and CodeConverter#replaceFieldWrite()
  109. was fixed. [JBAOP-284](http://jira.jboss.com/jira/browse/JBAOP-284).
  110. * A synchronization bug and a performance bug in `javassist.util.proxy`
  111. have been fixed
  112. ([JASSIST-28](http://jira.jboss.com/jira/browse/JASSIST-28)).
  113. Now generated proxy classes are cached. To turn the caching off,
  114. set `ProxyFactory.useCache` to `false`.
  115. #### version 3.3 on August 17, 2006
  116. * CtClass#toClass() and ClassPool#toClass() were modified to accept a
  117. `ProtectionDomain`
  118. ([JASSIST-23](http://jira.jboss.com/jira/browse/JASSIST-23)).
  119. Now ClassPool#toClass(CtClass, ClassLoader) should not be overridden. All
  120. subclasses of ClassPool must override toClass(CtClass, ClassLoader,
  121. ProtectionDomain).
  122. * CtClass#getAvailableAnnotations() etc. have been implemented.
  123. * A bug related to a way of dealing with a bridge method was fixed
  124. ([HIBERNATE-37](http://jira.jboss.com/jira/browse/HIBERNATE-37)).
  125. * javassist.scopedpool package was added.
  126. #### version 3.2 on June 21, 2006
  127. * The behavior of CtBehavior#getParameterAnnotations() has been changed.
  128. It is now compatible to Java Reflection API
  129. ([JASSIST-19](http://jira.jboss.com/jira/browse/JASSIST-19)).
  130. #### version 3.2.0.CR2 on May 9, 2006
  131. * A bug of replace(String,ExprEditor) in javassist.expr.Expr has been fixed.
  132. * Updated ProxyFactory getClassLoader to choose the javassit class loader
  133. when the proxy superclass has a null class loader (a jdk/endorsed class)
  134. ([JASSIST-18](http://jira.jboss.com/jira/browse/JASSIST-18)).
  135. * Updated the throws clause of the javassist.util.proxy.MethodHandler
  136. to be Throwable rather than Exception
  137. ([JASSIST-16](http://jira.jboss.com/jira/browse/JASSIST-16)).
  138. #### version 3.2.0.CR1 on March 18, 2006
  139. * Annotations enhancements to javassist.bytecode.MethodInfo.
  140. * Allow a ClassPool to override the "guess" at the classloader to use.
  141. #### version 3.1 on February 23, 2006
  142. * getFields(), getMethods(), and getConstructors() in CtClass
  143. were changed to return non-private memebers instead of only
  144. public members.
  145. * getEnclosingClass() in javassist.CtClass was renamed
  146. to getEnclosingMethod().
  147. * getModifiers() was extended to return Modifier.STATIC if the class
  148. is a static inner class.
  149. * The return type of CtClass.stopPruning() was changed from void
  150. to boolean.
  151. * toMethod() in javassist.CtConstructor has been implemented.
  152. * It includes new javassist.util.proxy package
  153. similar to Enhancer of CGLIB.
  154. * The subpackages of Javassist were restructured.
  155. * javassist.tool package was renamed to javassist.tools.
  156. * HotSwapper was moved to javassist.util.
  157. * Several subpackages were moved to javassist.tools.
  158. * javassist.preproc package was elminated and the source was
  159. moved to the sample directory.
  160. #### version 3.1 RC2 on September 7, 2005
  161. * RC2 is released mainly for an administrative reason.
  162. * A few bugs have been fixed.
  163. #### version 3.1 RC1 on August 29, 2005
  164. * Better annotation supports. See `CtClass.getAnnotations()`
  165. * javassist.tool.HotSwapper was added.
  166. * javassist.ClassPool.importPackage() was added.
  167. * The compiler now accepts array initializers
  168. (only one dimensional arrays).
  169. * javassist.Dump was moved to javassist.tool.Dump.
  170. * Many bugs were fixed.
  171. #### version 3.0 on January 18, 2005
  172. * The compiler now supports synchronized statements and finally
  173. clauses.
  174. * You can now remove a method and a field.
  175. #### version 3.0 RC1 on September 13, 2004.
  176. * CtClass.toClass() has been reimplemented. The behavior has been
  177. changed.
  178. * javassist.expr.NewArray has been implemented. It enables modifying
  179. an expression for array creation.
  180. * `.class` notation has been supported. The modified class
  181. file needs javassist.runtime.DotClass at runtime.
  182. * a bug in `CtClass.getMethods()` has been fixed.
  183. * The compiler supports a switch statement.
  184. #### version 3.0 beta on May 18th, 2004.
  185. * The ClassPool framework has been redesigned.
  186. * writeFile(), write(), ... in ClassPool have been moved to CtClass.
  187. * The design of javassist.Translator has been changed.
  188. * javassist.bytecode.annotation has been added for meta tags.
  189. * CtClass.makeNestedClass() has been added.
  190. * The methods declared in javassist.bytecode.InnerClassesAttribute
  191. have been renamed a bit.
  192. * Now local variables were made available in the source text passed to
  193. CtBehavior.insertBefore(), MethodCall.replace(), etc.
  194. * CtClass.main(), which prints the version number, has been added.
  195. * ClassPool.SimpleLoader has been public.
  196. * javassist.bytecode.DeprecatedAttribute has been added.
  197. * javassist.bytecode.LocalVariableAttribute has been added.
  198. * CtClass.getURL() and javassist.ClassPath.find() has been added.
  199. * CtBehavior.insertAt() has been added.
  200. * CtClass.detach() has been added.
  201. * CodeAttribute.computeMaxStack() has been added.
  202. #### version 2.6 in August, 2003.
  203. * The behavior of CtClass.setSuperclass() was changed.
  204. To obtain the previous behavior, call CtClass.replaceClassName().
  205. * CtConstructor.setBody() now works for class initializers.
  206. * CtNewMethod.delegator() now works for static methods.
  207. * javassist.expr.Expr.indexOfBytecode() has been added.
  208. * javassist.Loader has been modified so that getPackage() returns
  209. a package object.
  210. * Now, the compiler can correctly compile a try statement and an
  211. infinite while-loop.
  212. #### version 2.5.1 in May, 2003.
  213. Simple changes for integration with JBoss AOP
  214. * Made ClassPool.get0 protected so that subclasses of ClassPool can call it.
  215. * Moved all access to the class cache (the field ClassPool.classes) to a method called getCached(String classname). This is so subclasses of ClassPool can override this behavior.
  216. #### version 2.5 in May, 2003.
  217. From this version, Javassist is part of the JBoss project.
  218. * The license was changed from MPL to MPL/LGPL dual.
  219. * ClassPool.removeClassPath() and ClassPath.close() have been added.
  220. * ClassPool.makeClass(InputStream) has been added.
  221. * CtClass.makeClassInitializer() has been added.
  222. * javassist.expr.Expr has been changed to a public class.
  223. * javassist.expr.Handler has been added.
  224. * javassist.expr.MethodCall.isSuper() has been added.
  225. * CtMethod.isEmpty() and CtConstructor.isEmpty() have been added.
  226. * LoaderClassPath has been implemented.
  227. #### version 2.4 in February, 2003.
  228. * The compiler included in Javassist did not correctly work with
  229. interface methods. This bug was fixed.
  230. * Now javassist.bytecode.Bytecode allows more than 255 local
  231. variables in the same method.
  232. * javassist.expr.Instanceof and Cast have been added.
  233. * javassist.expr.{MethodCall,NewExpr,FieldAccess,Instanceof,Cast}.where()
  234. have been added. They return the caller-side method surrounding the
  235. expression.
  236. * javassist.expr.{MethodCall,NewExpr,FieldAccess,Instanceof,Cast}.mayThrow()
  237. have been added.
  238. * $class has been introduced.
  239. * The parameters to replaceFieldRead(), replaceFieldWrite(),
  240. and redirectFieldAccess() in javassist.CodeConverter are changed.
  241. * The compiler could not correctly handle a try-catch statement.
  242. This bug has been fixed.
  243. #### version 2.3 in December, 2002.
  244. * The tutorial has been revised a bit.
  245. * SerialVersionUID class was donated by Bob Lee. Thanks.
  246. * CtMethod.setBody() and CtConstructor.setBody() have been added.
  247. * javassist.reflect.ClassMetaobject.useContextClassLoader has been added.
  248. If true, the reflection package does not use Class.forName() but uses
  249. a context class loader specified by the user.
  250. * $sig and $type are now available.
  251. * Bugs in Bytecode.write() and read() have been fixed.
  252. #### version 2.2 in October, 2002.
  253. * The tutorial has been revised.
  254. * A new package `javassist.expr` has been added.
  255. This is replacement of classic `CodeConverter`.
  256. * javassist.ConstParameter was changed into
  257. javassist.CtMethod.ConstParameter.
  258. * javassist.FieldInitializer was renamed into
  259. javassist.CtField.Initializer.
  260. * A bug in javassist.bytecode.Bytecode.addInvokeinterface() has been
  261. fixed.
  262. * In javassist.bytecode.Bytecode, addGetfield(), addGetstatic(),
  263. addInvokespecial(), addInvokestatic(), addInvokevirtual(),
  264. and addInvokeinterface()
  265. have been modified to update the current statck depth.
  266. #### version 2.1 in July, 2002.
  267. * javassist.CtMember and javassist.CtBehavior have been added.
  268. * javassist.CtClass.toBytecode() has been added.
  269. * javassist.CtClass.toClass() and javassist.ClassPool.writeAsClass()
  270. has been added.
  271. * javassist.ByteArrayClassPath has been added.
  272. * javassist.bytecode.Mnemonic has been added.
  273. * Several bugs have been fixed.
  274. #### version 2.0 (major update) in November, 2001.
  275. * The javassist.bytecode package has been provided. It is a
  276. lower-level API for directly modifying a class file although
  277. the users must have detailed knowledge of the Java bytecode.
  278. * The mechanism for creating CtClass objects have been changed.
  279. * javassist.tool.Dump moves to the javassist package.
  280. version 1.0 in July, 2001.
  281. * javassist.reflect.Metaobject and ClassMetaobject was changed.
  282. Now they throw the same exception that they receive from a
  283. base-level object.
  284. #### version 0.8
  285. * javassist.tool.Dump was added. It is a class file viewer.
  286. * javassist.FiledInitializer.byNewArray() was added. It is for
  287. initializing a field with an array object.
  288. * javassist.CodeConverter.redirectMethodCall() was added.
  289. * javassist.Run was added.
  290. #### version 0.7
  291. * javassit.Loader was largely modified. javassist.UserLoader was
  292. deleted. Instead, Codebase was renamed to ClassPath
  293. and UserClassPath was added. Now programmers who want to
  294. customize Loader must write a class implementing UserClassPath
  295. instead of UserLoader. This change is for sharing class search paths
  296. between Loader and CtClass.CtClass(String).
  297. * CtClass.addField(), addMethod(), addConstructor(), addWrapper() were
  298. also largely modified so that it receives CtNewMethod, CtNewConstructor,
  299. or CtNewField. The static methods for creating these objects were
  300. added to the API.
  301. * Constructors are now represented by CtConstructor objects.
  302. CtConstructor is a subclass of CtMethod.
  303. * CtClass.getUserAttribute() was removed. Use CtClass.getAttribute().
  304. * javassist.rmi.RmiLoader was added.
  305. * javassist.reflect.Metalevel._setMetaobject() was added. Now
  306. metaobjects can be replaced at runtime.
  307. #### version 0.6
  308. * Javassist was modified to correctly deal with array types appearing
  309. in signatures.
  310. * A bug crashed resulting bytecode if a class includes a private static
  311. filed. It has been fixed.
  312. * javassist.CtNewInterface was added.
  313. * javassist.Loader.recordClass() was renamed into makeClass().
  314. * javassist.UserLoader.loadClass() was changed to take the second
  315. parameter.
  316. #### version 0.5
  317. * a bug-fix version.
  318. #### version 0.4
  319. * Major update again. Many classes and methods were changed.
  320. Most of methods taking java.lang.Class have been changed to
  321. take javassist.CtClass.
  322. #### version 0.3
  323. * Major update. Many classes and methods were changed.
  324. #### version 0.2
  325. * Jar/zip files are supported.
  326. #### version 0.1 on April 16, 1999.
  327. * The first release.