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

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