xref: /aosp_15_r20/external/apache-commons-lang/src/site/resources/release-notes/RELEASE-NOTES-2.1.txt (revision 455610af95f3bf5f4bc8a9eda520f57e389a4c42)
1*455610afSAndroid Build Coastguard WorkerLicensed to the Apache Software Foundation (ASF) under one or more
2*455610afSAndroid Build Coastguard Workercontributor license agreements.  See the NOTICE file distributed with
3*455610afSAndroid Build Coastguard Workerthis work for additional information regarding copyright ownership.
4*455610afSAndroid Build Coastguard WorkerThe ASF licenses this file to You under the Apache License, Version 2.0
5*455610afSAndroid Build Coastguard Worker(the "License"); you may not use this file except in compliance with
6*455610afSAndroid Build Coastguard Workerthe License.  You may obtain a copy of the License at
7*455610afSAndroid Build Coastguard Worker
8*455610afSAndroid Build Coastguard Workerhttp://www.apache.org/licenses/LICENSE-2.0
9*455610afSAndroid Build Coastguard Worker
10*455610afSAndroid Build Coastguard WorkerUnless required by applicable law or agreed to in writing, software
11*455610afSAndroid Build Coastguard Workerdistributed under the License is distributed on an "AS IS" BASIS,
12*455610afSAndroid Build Coastguard WorkerWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*455610afSAndroid Build Coastguard WorkerSee the License for the specific language governing permissions and
14*455610afSAndroid Build Coastguard Workerlimitations under the License.
15*455610afSAndroid Build Coastguard Worker
16*455610afSAndroid Build Coastguard Worker=============================================================================
17*455610afSAndroid Build Coastguard Worker
18*455610afSAndroid Build Coastguard Worker                        Commons Lang Package
19*455610afSAndroid Build Coastguard Worker                            Version 2.1
20*455610afSAndroid Build Coastguard Worker                           Release Notes
21*455610afSAndroid Build Coastguard Worker
22*455610afSAndroid Build Coastguard Worker
23*455610afSAndroid Build Coastguard WorkerINTRODUCTION:
24*455610afSAndroid Build Coastguard Worker
25*455610afSAndroid Build Coastguard WorkerThis document contains the release notes for the 2.1 version of Apache Jakarta Commons Lang.
26*455610afSAndroid Build Coastguard WorkerCommons Lang is a set of utility functions and reusable components that
27*455610afSAndroid Build Coastguard Workershould be of use in any Java environment.
28*455610afSAndroid Build Coastguard Worker
29*455610afSAndroid Build Coastguard Worker
30*455610afSAndroid Build Coastguard WorkerINCOMPATIBLE CHANGES:
31*455610afSAndroid Build Coastguard Worker
32*455610afSAndroid Build Coastguard Worker- The Nestable interface defines the method indexOfThrowable(Class).
33*455610afSAndroid Build Coastguard WorkerPreviously the implementations checked only for a specific Class.
34*455610afSAndroid Build Coastguard WorkerNow they check for subclasses of that Class as well.
35*455610afSAndroid Build Coastguard WorkerFor most situations this will be the expected behavior (i.e. it's a bug fix).
36*455610afSAndroid Build Coastguard WorkerIf it causes problems, please use the ExceptionUtils.indexOfThrowable(Class) method instead.
37*455610afSAndroid Build Coastguard WorkerNote that the ExceptionUtils method is available in v1.0 and v2.0 of commons-lang and has not been changed.
38*455610afSAndroid Build Coastguard Worker(An alternative to this is to change the public static matchSubclasses flag on NestableDelegate.
39*455610afSAndroid Build Coastguard WorkerHowever, we don't recommend that as a long-term solution.)
40*455610afSAndroid Build Coastguard Worker
41*455610afSAndroid Build Coastguard Worker- The StopWatch class has had much extra validation added.
42*455610afSAndroid Build Coastguard WorkerIf your code previously relied on unusual aspects, it may no longer work.
43*455610afSAndroid Build Coastguard Worker
44*455610afSAndroid Build Coastguard Worker- Starting with version 2.1, Ant version 1.6.x is required to build. Copy
45*455610afSAndroid Build Coastguard Workerjunit.jar to ANT_HOME/lib. You can get JUnit from https://www.junit.org. See the developer's guide
46*455610afSAndroid Build Coastguard Workerfor more details.
47*455610afSAndroid Build Coastguard Worker
48*455610afSAndroid Build Coastguard Worker
49*455610afSAndroid Build Coastguard WorkerDEPRECATIONS:
50*455610afSAndroid Build Coastguard Worker
51*455610afSAndroid Build Coastguard Worker- The enum package has been renamed to enums for JDK 1.5 compliance.
52*455610afSAndroid Build Coastguard WorkerAll functionality is identical, just the package has changed.
53*455610afSAndroid Build Coastguard WorkerThis package will be removed in v3.0.
54*455610afSAndroid Build Coastguard Worker
55*455610afSAndroid Build Coastguard Worker- NumberUtils.stringToInt - renamed to toInt
56*455610afSAndroid Build Coastguard Worker
57*455610afSAndroid Build Coastguard Worker- DateUtils - four constants, MILLIS_IN_* have been deprecated as they were defined
58*455610afSAndroid Build Coastguard Workeras int not long. The replacements are MILLIS_PER_*.
59*455610afSAndroid Build Coastguard Worker
60*455610afSAndroid Build Coastguard Worker
61*455610afSAndroid Build Coastguard WorkerNEW FEATURES:
62*455610afSAndroid Build Coastguard Worker
63*455610afSAndroid Build Coastguard WorkerNew:
64*455610afSAndroid Build Coastguard Worker- Mutable package - contains basic classes that hold an Object or primitive
65*455610afSAndroid Build Coastguard Workerand provide both get and set methods.
66*455610afSAndroid Build Coastguard Worker- DurationFormatUtils - provides various methods for formatting durations
67*455610afSAndroid Build Coastguard Worker- CharEncoding - definitions of constants for character encoding work
68*455610afSAndroid Build Coastguard Worker- CharUtils - utilities for working with characters
69*455610afSAndroid Build Coastguard Worker
70*455610afSAndroid Build Coastguard WorkerUpdated:
71*455610afSAndroid Build Coastguard Worker- ArrayUtils - many more methods, especially List-like methods
72*455610afSAndroid Build Coastguard Worker- BooleanUtils - isTrue and isFalse methods that handle null
73*455610afSAndroid Build Coastguard Worker- ClassUtils - primitive to wrapper class conversion methods
74*455610afSAndroid Build Coastguard Worker- ClassUtils - class name comparator
75*455610afSAndroid Build Coastguard Worker- IllegalClassException - extra constructor for common instanceof case
76*455610afSAndroid Build Coastguard Worker- NotImplementedException - supports nested exceptions
77*455610afSAndroid Build Coastguard Worker- ObjectUtils - hashcode method handling null
78*455610afSAndroid Build Coastguard Worker- StringUtils - isAsciiPrintable to check the contents of a string
79*455610afSAndroid Build Coastguard Worker             -- ordinalIndexOf to find the nth index of a string
80*455610afSAndroid Build Coastguard Worker             -- various remove methods to remove parts of a string
81*455610afSAndroid Build Coastguard Worker             -- various split methods to provide more control over splitting a string
82*455610afSAndroid Build Coastguard Worker             -- defaultIfEmpty to default a string if null or empty
83*455610afSAndroid Build Coastguard Worker- SystemUtils - methods to get system properties as File objects
84*455610afSAndroid Build Coastguard Worker             -- extra constants representing system properties
85*455610afSAndroid Build Coastguard Worker- Validate - new methods to check whether all elements in a collection are of a specific type
86*455610afSAndroid Build Coastguard Worker- WordUtils - new methods to capitalize based on a set of specified delimiters
87*455610afSAndroid Build Coastguard Worker
88*455610afSAndroid Build Coastguard Worker- EqualsBuilder - now provides setter to internal state
89*455610afSAndroid Build Coastguard Worker- ToStringStyle - new style, short prefix style
90*455610afSAndroid Build Coastguard Worker- ReflectionToStringBuilder - more flags to control the output with regards to statics
91*455610afSAndroid Build Coastguard Worker
92*455610afSAndroid Build Coastguard Worker- ExceptionUtils - added indexOfType methods that check subclasses, thus leaving the existing
93*455610afSAndroid Build Coastguard WorkerindexOfThrowable method untouched (see incompatible changes section)
94*455610afSAndroid Build Coastguard Worker
95*455610afSAndroid Build Coastguard Worker- NumberUtils - various string to number parsing methods added
96*455610afSAndroid Build Coastguard Worker
97*455610afSAndroid Build Coastguard Worker- DateUtils - methods added to compare dates in various ways
98*455610afSAndroid Build Coastguard Worker           -- method to parse a date string using multiple patterns
99*455610afSAndroid Build Coastguard Worker- FastDateFormat - extra formatting methods that take in a millisecond long value
100*455610afSAndroid Build Coastguard Worker                -- additional static factory methods
101*455610afSAndroid Build Coastguard Worker- StopWatch - new methods for split behavior
102*455610afSAndroid Build Coastguard Worker
103*455610afSAndroid Build Coastguard Worker
104*455610afSAndroid Build Coastguard WorkerBUG FIXES:
105*455610afSAndroid Build Coastguard Worker
106*455610afSAndroid Build Coastguard Worker19331  General case: infinite loop: ToStringBuilder.reflectionToString
107*455610afSAndroid Build Coastguard Worker23174  EqualsBuilder.append(Object[], Object[]) throws NPE
108*455610afSAndroid Build Coastguard Worker23356  Make DurationFormatUtils public!
109*455610afSAndroid Build Coastguard Worker23557  WordUtils.capitalizeFully(String str) should take a delimiters
110*455610afSAndroid Build Coastguard Worker23683  New method for converting a primitive Class to its corresponding wrapper
111*455610afSAndroid Build Coastguard Worker23430  Minor javadoc fixes for StringUtils.contains(String, String)
112*455610afSAndroid Build Coastguard Worker23590  make optional parameters in FastDateFormat really optional
113*455610afSAndroid Build Coastguard Worker24056  Documentation error in StringUtils.replace
114*455610afSAndroid Build Coastguard Worker25227  StringEscapeUtils.unescapeHtml() doesn't handle hex entities
115*455610afSAndroid Build Coastguard Worker25454  new StringUtils.replaceChars behaves differently from old Ch
116*455610afSAndroid Build Coastguard Worker25560  DateUtils.truncate() is off by one hour when using a date in DST switch 'zone'
117*455610afSAndroid Build Coastguard Worker25627  DateUtils constants should be long
118*455610afSAndroid Build Coastguard Worker25683  Add method that validates Collection elements are a correct
119*455610afSAndroid Build Coastguard Worker25849  Add SystemUtils methods for directory properties.
120*455610afSAndroid Build Coastguard Worker26616  ClassCastException in Enum.equals(Object)
121*455610afSAndroid Build Coastguard Worker26699  Tokenizer Enhancements: reset input string, static CSV
122*455610afSAndroid Build Coastguard Worker26734  NullPointerException in EqualsBuilder.append(Object[], Object[])
123*455610afSAndroid Build Coastguard Worker26877  Add SystemUtils.AWT_TOOLKIT and others.
124*455610afSAndroid Build Coastguard Worker26922  public static boolean DateUtils.equals(Date dt1, Date dt2)
125*455610afSAndroid Build Coastguard Worker27592  WordUtils capitalize improvement
126*455610afSAndroid Build Coastguard Worker27876  ReflectionToStringBuilder.toString(null) throws exception by design
127*455610afSAndroid Build Coastguard Worker27877  Make ClassUtils methods null-safe and not throw an IAE.
128*455610afSAndroid Build Coastguard Worker28468  StringUtils.defaultString: Documentation error
129*455610afSAndroid Build Coastguard Worker28554  Add hashCode-support to class ObjectUtils
130*455610afSAndroid Build Coastguard Worker29082  Enhancement of ExceptionUtils.CAUSE_METHOD_NAMES
131*455610afSAndroid Build Coastguard Worker29149  StringEscapeUtils.unescapeHtml() doesn't handle an empty entity
132*455610afSAndroid Build Coastguard Worker29294  lang.math.Fraction class deficiencies
133*455610afSAndroid Build Coastguard Worker29673  ExceptionUtils: new getCause() methodname (for tomcat)
134*455610afSAndroid Build Coastguard Worker29794  Add convenience format(long) methods to FastDateForma
135*455610afSAndroid Build Coastguard Worker30328  HashCodeBuilder does not use the same values as Boolean (fixed as documentation)
136*455610afSAndroid Build Coastguard Worker30334  New class proposal: CharacterEncoding
137*455610afSAndroid Build Coastguard Worker30674  parseDate class from HttpClient's DateParser class
138*455610afSAndroid Build Coastguard Worker30815  ArrayUtils.isEquals() throws ClassCastException when array1
139*455610afSAndroid Build Coastguard Worker30929  Nestable.indexOfThrowable(Class)  uses Class.equals() to match
140*455610afSAndroid Build Coastguard Worker31395  DateUtils.truncate oddity at the far end of the Date spectrum
141*455610afSAndroid Build Coastguard Worker31478  Compile error with JDK 5 "enum" is a keyword
142*455610afSAndroid Build Coastguard Worker31572  o.a.c.lang.enum.ValuedEnum: 'enum' is a keyword in JDK 1.5.0
143*455610afSAndroid Build Coastguard Worker31933  ToStringStyle setArrayEnd handled null incorrectly
144*455610afSAndroid Build Coastguard Worker32133  SystemUtils fails init on HP-UX
145*455610afSAndroid Build Coastguard Worker32198  Error in Javadoc for StringUtils.chomp(String, String)
146*455610afSAndroid Build Coastguard Worker32625  Can't subclass EqualsBuilder because isEquals is private
147*455610afSAndroid Build Coastguard Worker33067  EqualsBuilder.append(Object[], Object[]) crashes with a NullPointerException if an element of the first array is null
148*455610afSAndroid Build Coastguard Worker33069  EqualsBuilder.append(Object[], Object[]) incorrectly checks that rhs[i] is instance of lhs[i]'s class
149*455610afSAndroid Build Coastguard Worker33574  unbalanced ReflectionToStringBuilder
150*455610afSAndroid Build Coastguard Worker33737  ExceptionUtils.addCauseMethodName(String) does not check for duplicates.
151