xref: /aosp_15_r20/external/apache-commons-lang/src/site/resources/release-notes/RELEASE-NOTES-3.0.txt (revision 455610af95f3bf5f4bc8a9eda520f57e389a4c42)
1Licensed to the Apache Software Foundation (ASF) under one or more
2contributor license agreements.  See the NOTICE file distributed with
3this work for additional information regarding copyright ownership.
4The ASF licenses this file to You under the Apache License, Version 2.0
5(the "License"); you may not use this file except in compliance with
6the License.  You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15
16=============================================================================
17
18                        Commons Lang Package
19                            Version 3.0
20                           Release Notes
21
22
23INTRODUCTION:
24
25This document contains the release notes for the 3.0 version of Apache Commons Lang.
26Commons Lang is a set of utility functions and reusable components that should be of use in any
27Java environment.
28
29Lang 3.0 now targets Java 5.0, making use of features that arrived with Java 5.0 such as generics,
30variable arguments, autoboxing, concurrency and formatted output.
31
32For the latest advice on upgrading, see the following page:
33
34    https://commons.apache.org/lang/article3_0.html
35
36ADDITIONS IN 3.0
37================
38
39    [LANG-276] MutableBigDecimal and MutableBigInteger.
40    [LANG-285] Wish : method unaccent.
41    [LANG-358] ObjectUtils.coalesce.
42    [LANG-386] LeftOf/RightOfNumber in Range convenience methods necessary.
43    [LANG-435] Add ClassUtils.isAssignable() variants with autoboxing.
44    [LANG-444] StringUtils.emptyToNull.
45    [LANG-482] Enhance StrSubstitutor to support nested ${var-${subvr}} expansion
46    [LANG-482] StrSubstitutor now supports substitution in variable names.
47    [LANG-496] A generic implementation of the Lazy initialization pattern.
48    [LANG-497] Addition of ContextedException and ContextedRuntimeException.
49    [LANG-498] Add StringEscapeUtils.escapeText() methods.
50    [LANG-499] Add support for the handling of ExecutionExceptions.
51    [LANG-501] Add support for background initialization.
52    [LANG-529] Add a concurrent package.
53    [LANG-533] Validate: support for validating blank strings.
54    [LANG-537] Add ArrayUtils.toArray to create generic arrays.
55    [LANG-545] Add ability to create a Future for a constant.
56    [LANG-546] Add methods to Validate to check whether the index is valid for the array/list/string.
57    [LANG-553] Add TypeUtils class to provide utility code for working with generic types.
58    [LANG-559] Added isAssignableFrom and isInstanceOf validation methods.
59    [LANG-559] Added validState validation method.
60    [LANG-560] New TimedSemaphore class.
61    [LANG-582] Provide an implementation of the ThreadFactory interface.
62    [LANG-588] Create a basic Pair<L, R> class.
63    [LANG-594] DateUtils equal & compare functions up to most significant field.
64    [LANG-601] Add Builder Interface / Update Builders to Implement It.
65    [LANG-609] Support lazy initialization using atomic variables
66    [LANG-610] Extend exception handling in ConcurrentUtils to runtime exceptions.
67    [LANG-614] StringUtils.endsWithAny method
68    [LANG-640] Add normalizeSpace to StringUtils
69    [LANG-644] Provide documentation about the new concurrent package
70    [LANG-649] BooleanUtils.toBooleanObject to support single character input
71    [LANG-651] Add AnnotationUtils
72    [LANG-653] Provide a very basic ConcurrentInitializer implementation
73    [LANG-655] Add StringUtils.defaultIfBlank()
74    [LANG-667] Add a Null-safe compare() method to ObjectUtils
75    [LANG-676] Documented potential NPE if auto-boxing occurs for some BooleanUtils methods
76    [LANG-678] Add support for ConcurrentMap.putIfAbsent()
77    [LANG-692] Add hashCodeMulti varargs method
78    [LANG-697] Add FormattableUtils class
79    [LANG-684] Levenshtein Distance Within a Given Threshold
80
81REMOVALS IN 3.0
82===============
83
84    [LANG-438] Remove @deprecateds.
85    [LANG-492] Remove code handled now by the JDK.
86    [LANG-493] Remove code that does not hold enough value to remain.
87    [LANG-590] Remove JDK 1.2/1.3 bug handling in StringUtils.indexOf(String, String, int).
88    [LANG-673] WordUtils.abbreviate() removed
89    [LANG-691] Removed DateUtils.UTC_TIME_ZONE
90
91IMPROVEMENTS IN 3.0
92===================
93
94    [LANG-290] EnumUtils for JDK 5.0.
95    [LANG-336] Finally start using generics.
96    [LANG-355] StrBuilder should implement CharSequence and Appendable.
97    [LANG-396] Investigate for vararg usages.
98    [LANG-424] Improve Javadoc for StringUtils class.
99    [LANG-458] Refactor Validate.java to eliminate code redundancy.
100    [LANG-479] Document where in SVN trunk is.
101    [LANG-504] bring ArrayUtils.isEmpty to the generics world.
102    [LANG-505] Rewrite StringEscapeUtils.
103    [LANG-507] StringEscapeUtils.unescapeJava should support \u+ notation.
104    [LANG-510] Convert StringUtils API to take CharSequence.
105    [LANG-513] Better EnumUtils.
106    [LANG-528] Mutable classes should implement an appropriately typed Mutable interface.
107    [LANG-539] Compile commons.lang for CDC 1.1/Foundation 1.1.
108    [LANG-540] Make NumericEntityEscaper immutable.
109    [LANG-541] Replace StringBuffer with StringBuilder.
110    [LANG-548] Use Iterable on API instead of Collection.
111    [LANG-551] Replace Range classes with generic version.
112    [LANG-562] Change Maven groupId.
113    [LANG-563] Change Java package name.
114    [LANG-570] Do the test cases really still require main() and suite() methods?.
115    [LANG-579] Add new Validate methods.
116    [LANG-599] ClassUtils.getClass(): Allow Dots as Inner Class Separators.
117    [LANG-605] DefaultExceptionContext overwrites values in recursive situations.
118    [LANG-668] Change ObjectUtils min() & max() functions to use varargs rather than just two parameters
119    [LANG-681] Push down WordUtils to "text" sub-package.
120    [LANG-711] Add includeantruntime=false to javac targets to quell warnings in ant 1.8.1 and better (and modest performance gain).
121    [LANG-713] Increase test coverage of FieldUtils read methods and tweak javadoc.
122    [LANG-718] build.xml Java 1.5+ updates.
123
124BUG FIXES IN 3.0
125================
126
127    [LANG-11]  Depend on JDK 1.5+.
128    [LANG-302] StrBuilder does not implement clone().
129    [LANG-339] StringEscapeUtils.escapeHtml() escapes multibyte characters like Chinese, Japanese, etc.
130    [LANG-369] ExceptionUtils not thread-safe.
131    [LANG-418] Javadoc incorrect for StringUtils.endsWithIgnoreCase.
132    [LANG-428] StringUtils.isAlpha, isAlphanumeric and isNumeric now return false for ""
133    [LANG-439] StringEscapeUtils.escapeHTML() does not escape chars (0x00-0x20).
134    [LANG-448] Lower Ascii Characters don't get encoded by Entities.java.
135    [LANG-468] JDK 1.5 build/runtime failure on LANG-393 (EqualsBuilder).
136    [LANG-474] Fixes for thread safety.
137    [LANG-478] StopWatch does not resist to system time changes.
138    [LANG-480] StringEscapeUtils.escapeHtml incorrectly converts unicode characters above U+00FFFF into 2 characters.
139    [LANG-481] Possible race-conditions in hashCode of the range classes.
140    [LANG-564] Improve StrLookup API documentation.
141    [LANG-568] @SuppressWarnings("unchecked") is used too generally.
142    [LANG-571] ArrayUtils.add(T[] array, T element) can create unexpected ClassCastException.
143    [LANG-585] exception.DefaultExceptionContext.getFormattedExceptionMessage catches Throwable.
144    [LANG-596] StrSubstitutor should also handle the default properties of a java.util.Properties class
145    [LANG-600] Javadoc is incorrect for public static int lastIndexOf(String str, String searchStr).
146    [LANG-602] ContextedRuntimeException no longer an 'unchecked' exception.
147    [LANG-606] EqualsBuilder causes StackOverflowException.
148    [LANG-608] Some StringUtils methods should take an int character instead of char to use String API features.
149    [LANG-617] StringEscapeUtils.escapeXML() can't process UTF-16 supplementary characters
150    [LANG-624] SystemUtils.getJavaVersionAsFloat throws StringIndexOutOfBoundsException on Android runtime/Dalvik VM
151    [LANG-629] Charset may not be threadsafe, because the HashSet is not synch.
152    [LANG-638] NumberUtils createNumber throws a StringIndexOutOfBoundsException when argument containing "e" and "E" is passed in
153    [LANG-643] Javadoc StringUtils.left() claims to throw on negative len, but doesn't
154    [LANG-645] FastDateFormat.format() outputs incorrect week of year because locale isn't respected
155    [LANG-646] StringEscapeUtils.unescapeJava doesn't handle octal escapes and Unicode with extra u
156    [LANG-656] Example StringUtils.indexOfAnyBut("zzabyycdxx", '') = 0 incorrect
157    [LANG-658] Some entities like &Ouml; are not matched properly against its ISO8859-1 representation
158    [LANG-659] EntityArrays typo: {"\u2122", "&minus;"}, // minus sign, U+2212 ISOtech
159    [LANG-66]  StringEscaper.escapeXml() escapes characters > 0x7f.
160    [LANG-662] org.apache.commons.lang3.math.Fraction does not reduce (Integer.MIN_VALUE, 2^k)
161    [LANG-663] org.apache.commons.lang3.math.Fraction does not always succeed in multiplyBy and divideBy
162    [LANG-664] NumberUtils.isNumber(String) is not right when the String is "1.1L"
163    [LANG-672] Doc bug in DateUtils#ceiling
164    [LANG-677] DateUtils.isSameLocalTime compares using 12-hour clock and not 24-hour
165    [LANG-685] EqualsBuilder synchronizes on HashCodeBuilder.
166    [LANG-703] StringUtils.join throws NPE when toString returns null for one of objects in collection
167    [LANG-710] StringIndexOutOfBoundsException when calling unescapeHtml4("&#03")
168    [LANG-714] StringUtils doc/comment spelling fixes.
169	[LANG-715] CharSetUtils.squeeze() speedup.
170    [LANG-716] swapCase and *capitalize speedups.
171