xref: /aosp_15_r20/external/apache-commons-lang/src/site/xdoc/upgradeto2_3.xml (revision 455610af95f3bf5f4bc8a9eda520f57e389a4c42)
1*455610afSAndroid Build Coastguard Worker<?xml version="1.0"?>
2*455610afSAndroid Build Coastguard Worker<!--
3*455610afSAndroid Build Coastguard WorkerLicensed to the Apache Software Foundation (ASF) under one or more
4*455610afSAndroid Build Coastguard Workercontributor license agreements.  See the NOTICE file distributed with
5*455610afSAndroid Build Coastguard Workerthis work for additional information regarding copyright ownership.
6*455610afSAndroid Build Coastguard WorkerThe ASF licenses this file to You under the Apache License, Version 2.0
7*455610afSAndroid Build Coastguard Worker(the "License"); you may not use this file except in compliance with
8*455610afSAndroid Build Coastguard Workerthe License.  You may obtain a copy of the License at
9*455610afSAndroid Build Coastguard Worker
10*455610afSAndroid Build Coastguard Worker     http://www.apache.org/licenses/LICENSE-2.0
11*455610afSAndroid Build Coastguard Worker
12*455610afSAndroid Build Coastguard WorkerUnless required by applicable law or agreed to in writing, software
13*455610afSAndroid Build Coastguard Workerdistributed under the License is distributed on an "AS IS" BASIS,
14*455610afSAndroid Build Coastguard WorkerWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15*455610afSAndroid Build Coastguard WorkerSee the License for the specific language governing permissions and
16*455610afSAndroid Build Coastguard Workerlimitations under the License.
17*455610afSAndroid Build Coastguard Worker-->
18*455610afSAndroid Build Coastguard Worker<document>
19*455610afSAndroid Build Coastguard Worker <properties>
20*455610afSAndroid Build Coastguard Worker  <title>2.3 Release Notes</title>
21*455610afSAndroid Build Coastguard Worker  <author email="[email protected]">Commons Documentation Team</author>
22*455610afSAndroid Build Coastguard Worker </properties>
23*455610afSAndroid Build Coastguard Worker<body>
24*455610afSAndroid Build Coastguard Worker
25*455610afSAndroid Build Coastguard Worker<section name="Lang 2.3 Release Notes">
26*455610afSAndroid Build Coastguard Worker<p>
27*455610afSAndroid Build Coastguard WorkerThese are the release notes and advice for upgrading Commons-Lang from
28*455610afSAndroid Build Coastguard Workerversion 2.2 to version 2.3.
29*455610afSAndroid Build Coastguard Worker<source>
30*455610afSAndroid Build Coastguard WorkerINTRODUCTION:
31*455610afSAndroid Build Coastguard Worker
32*455610afSAndroid Build Coastguard WorkerThis document contains the release notes for the 2.3 version of Apache
33*455610afSAndroid Build Coastguard WorkerJakarta Commons Lang.
34*455610afSAndroid Build Coastguard WorkerCommons Lang is a set of utility functions and reusable components that
35*455610afSAndroid Build Coastguard Workershould be of use in any Java environment.
36*455610afSAndroid Build Coastguard Worker
37*455610afSAndroid Build Coastguard WorkerINCOMPATIBLE CHANGES WITH VERSION 2.2:
38*455610afSAndroid Build Coastguard Worker
39*455610afSAndroid Build Coastguard Worker- Calling stop on a suspended StopWatch will no longer change the underlying time.
40*455610afSAndroid Build Coastguard Worker  It's very unlikely anyone was relying on that bug as a feature.
41*455610afSAndroid Build Coastguard Worker
42*455610afSAndroid Build Coastguard WorkerADDITIONAL INCOMPATIBLE CHANGES WITH VERSION 2.0:
43*455610afSAndroid Build Coastguard Worker
44*455610afSAndroid Build Coastguard Worker- The Nestable interface defines the method indexOfThrowable(Class).
45*455610afSAndroid Build Coastguard WorkerPreviously the implementations checked only for a specific Class.
46*455610afSAndroid Build Coastguard WorkerNow they check for subclasses of that Class as well.
47*455610afSAndroid Build Coastguard WorkerFor most situations this will be the expected behavior (i.e. it's a bug fix).
48*455610afSAndroid Build Coastguard WorkerIf it causes problems, please use the ExceptionUtils.indexOfThrowable(Class) method instead.
49*455610afSAndroid Build Coastguard WorkerNote that the ExceptionUtils method is available in v1.0 and v2.0 of commons-lang and has not been changed.
50*455610afSAndroid Build Coastguard Worker(An alternative to this is to change the public static matchSubclasses flag on NestableDelegate.
51*455610afSAndroid Build Coastguard WorkerHowever, we don't recommend that as a long-term solution.)
52*455610afSAndroid Build Coastguard Worker
53*455610afSAndroid Build Coastguard Worker- The StopWatch class has had much extra validation added.
54*455610afSAndroid Build Coastguard WorkerIf your code previously relied on unusual aspects, it may no longer work.
55*455610afSAndroid Build Coastguard Worker
56*455610afSAndroid Build Coastguard Worker- Starting with version 2.1, Ant version 1.6.x is required to build. Copy
57*455610afSAndroid Build Coastguard Workerjunit.jar to ANT_HOME/lib. You can get JUnit from https://www.junit.org. See the developer's guide
58*455610afSAndroid Build Coastguard Workerfor more details.
59*455610afSAndroid Build Coastguard Worker
60*455610afSAndroid Build Coastguard WorkerDEPRECATIONS FROM 2.2 to 2.3:
61*455610afSAndroid Build Coastguard Worker
62*455610afSAndroid Build Coastguard Worker- None
63*455610afSAndroid Build Coastguard Worker
64*455610afSAndroid Build Coastguard WorkerDEPRECATIONS FROM 2.1 to 2.2:
65*455610afSAndroid Build Coastguard Worker
66*455610afSAndroid Build Coastguard Worker- None
67*455610afSAndroid Build Coastguard Worker
68*455610afSAndroid Build Coastguard WorkerDEPRECATIONS FROM 2.0 to 2.1:
69*455610afSAndroid Build Coastguard Worker
70*455610afSAndroid Build Coastguard Worker- The enum package has been renamed to enums for JDK 1.5 compliance.
71*455610afSAndroid Build Coastguard WorkerAll functionality is identical, just the package has changed.
72*455610afSAndroid Build Coastguard WorkerThis package will be removed in v3.0.
73*455610afSAndroid Build Coastguard Worker
74*455610afSAndroid Build Coastguard Worker- NumberUtils.stringToInt - renamed to toInt
75*455610afSAndroid Build Coastguard Worker
76*455610afSAndroid Build Coastguard Worker- DateUtils - four constants, MILLIS_IN_* have been deprecated as they were defined
77*455610afSAndroid Build Coastguard Workeras int not long. The replacements are MILLIS_PER_*.
78*455610afSAndroid Build Coastguard Worker
79*455610afSAndroid Build Coastguard Worker
80*455610afSAndroid Build Coastguard WorkerBUG FIXES IN 2.3:
81*455610afSAndroid Build Coastguard Worker
82*455610afSAndroid Build Coastguard Worker    * [LANG-69 ] - ToStringBuilder throws StackOverflowError when an Object cycle exists
83*455610afSAndroid Build Coastguard Worker    * [LANG-102] - Refactor Entities methods
84*455610afSAndroid Build Coastguard Worker    * [LANG-153] - Can't XMLDecode an Enum
85*455610afSAndroid Build Coastguard Worker    * [LANG-262] - Use of enum prevents a classloader from being garbage collected resulting in out of memory exceptions.
86*455610afSAndroid Build Coastguard Worker    * [LANG-279] - HashCodeBuilder throws java.lang.StackOverflowError when an object contains a cycle.
87*455610afSAndroid Build Coastguard Worker    * [LANG-281] - DurationFormatUtils returns wrong result
88*455610afSAndroid Build Coastguard Worker    * [LANG-286] - Serialization - not backwards compatible
89*455610afSAndroid Build Coastguard Worker    * [LANG-292] - unescapeXml("&amp;12345678;") should be "&amp;12345678;"
90*455610afSAndroid Build Coastguard Worker    * [LANG-294] - StrBuilder.replaceAll and StrBuilder.deleteAll can throw ArrayIndexOutOfBoundsException.
91*455610afSAndroid Build Coastguard Worker    * [LANG-295] - StrBuilder contains usages of thisBuf.length when they should use size
92*455610afSAndroid Build Coastguard Worker    * [LANG-299] - Bug in method appendFixedWidthPadRight of class StrBuilder causes an ArrayIndexOutOfBoundsException
93*455610afSAndroid Build Coastguard Worker    * [LANG-300] - NumberUtils.createNumber throws NumberFormatException for one digit long
94*455610afSAndroid Build Coastguard Worker    * [LANG-303] - FastDateFormat.mRules is not transient or serializable
95*455610afSAndroid Build Coastguard Worker    * [LANG-304] - NullPointerException in isAvailableLocale(Locale)
96*455610afSAndroid Build Coastguard Worker    * [LANG-313] - Wrong behavior of Entities.unescape
97*455610afSAndroid Build Coastguard Worker    * [LANG-315] - StopWatch: suspend() acts as split(), if followed by stop()
98*455610afSAndroid Build Coastguard Worker
99*455610afSAndroid Build Coastguard WorkerIMPROVEMENTS IN 2.3:
100*455610afSAndroid Build Coastguard Worker
101*455610afSAndroid Build Coastguard Worker    * [LANG-258] - Enum Javadoc
102*455610afSAndroid Build Coastguard Worker    * [LANG-266] - Wish for StringUtils.join(Collection, *)
103*455610afSAndroid Build Coastguard Worker    * [LANG-268] - StringUtils.join should allow you to pass a range for it (so it only joins a part of the array)
104*455610afSAndroid Build Coastguard Worker    * [LANG-275] - StringUtils substringsBetween
105*455610afSAndroid Build Coastguard Worker    * [LANG-282] - Create more tests to test out the +=31 replacement code in DurationFormatUtils.
106*455610afSAndroid Build Coastguard Worker    * [LANG-287] - Optimize StringEscapeUtils.unescapeXml(String)
107*455610afSAndroid Build Coastguard Worker    * [LANG-289] - NumberUtils.max(byte[]) and NumberUtils.min(byte[]) are missing
108*455610afSAndroid Build Coastguard Worker    * [LANG-291] - Null-safe comparison methods for finding most recent / least recent dates.
109*455610afSAndroid Build Coastguard Worker    * [LANG-306] - StrBuilder appendln/appendAll/appendSeparator
110*455610afSAndroid Build Coastguard Worker    * [LANG-310] - BooleanUtils isNotTrue/isNotFalse
111*455610afSAndroid Build Coastguard Worker    * [LANG-314] - Tests fail to pass when building with Maven 2
112*455610afSAndroid Build Coastguard Worker
113*455610afSAndroid Build Coastguard Worker</source>
114*455610afSAndroid Build Coastguard Worker</p>
115*455610afSAndroid Build Coastguard Worker</section>
116*455610afSAndroid Build Coastguard Worker
117*455610afSAndroid Build Coastguard Worker</body>
118*455610afSAndroid Build Coastguard Worker</document>
119