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.4 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.4 version of Apache Commons Lang. 26*455610afSAndroid Build Coastguard WorkerCommons Lang is a set of utility functions and reusable components that should be of use in any Java environment. 27*455610afSAndroid Build Coastguard Worker 28*455610afSAndroid Build Coastguard WorkerLang 2.4 no longer attempts to target the Java 1.1 environment and now targets Java 1.2. While previous versions 29*455610afSAndroid Build Coastguard Workerwere built for 1.1, some parts were using methods that were only available in 1.2, and the Enum class had 30*455610afSAndroid Build Coastguard Workerbecome dependent on Java 1.3. 31*455610afSAndroid Build Coastguard Worker 32*455610afSAndroid Build Coastguard WorkerINCOMPATIBLE CHANGES WITH VERSION 2.3: 33*455610afSAndroid Build Coastguard Worker 34*455610afSAndroid Build Coastguard Worker- None 35*455610afSAndroid Build Coastguard Worker 36*455610afSAndroid Build Coastguard WorkerINCOMPATIBLE CHANGES WITH VERSION 2.2: 37*455610afSAndroid Build Coastguard Worker 38*455610afSAndroid Build Coastguard Worker- Calling stop on a suspended StopWatch will no longer change the underlying time. 39*455610afSAndroid Build Coastguard Worker It's very unlikely anyone was relying on that bug as a feature. 40*455610afSAndroid Build Coastguard Worker 41*455610afSAndroid Build Coastguard WorkerADDITIONAL INCOMPATIBLE CHANGES WITH VERSION 2.0: 42*455610afSAndroid Build Coastguard Worker 43*455610afSAndroid Build Coastguard Worker- The Nestable interface defines the method indexOfThrowable(Class). 44*455610afSAndroid Build Coastguard WorkerPreviously the implementations checked only for a specific Class. 45*455610afSAndroid Build Coastguard WorkerNow they check for subclasses of that Class as well. 46*455610afSAndroid Build Coastguard WorkerFor most situations this will be the expected behavior (i.e. it's a bug fix). 47*455610afSAndroid Build Coastguard WorkerIf it causes problems, please use the ExceptionUtils.indexOfThrowable(Class) method instead. 48*455610afSAndroid Build Coastguard WorkerNote that the ExceptionUtils method is available in v1.0 and v2.0 of commons-lang and has not been changed. 49*455610afSAndroid Build Coastguard Worker(An alternative to this is to change the public static matchSubclasses flag on NestableDelegate. 50*455610afSAndroid Build Coastguard WorkerHowever, we don't recommend that as a long-term solution.) 51*455610afSAndroid Build Coastguard Worker 52*455610afSAndroid Build Coastguard Worker- The StopWatch class has had much extra validation added. 53*455610afSAndroid Build Coastguard WorkerIf your code previously relied on unusual aspects, it may no longer work. 54*455610afSAndroid Build Coastguard Worker 55*455610afSAndroid Build Coastguard Worker- Starting with version 2.1, Ant version 1.6.x is required to build. Copy 56*455610afSAndroid Build Coastguard Workerjunit.jar to ANT_HOME/lib. You can get JUnit from https://www.junit.org. See the developer's guide 57*455610afSAndroid Build Coastguard Workerfor more details. 58*455610afSAndroid Build Coastguard Worker 59*455610afSAndroid Build Coastguard WorkerDEPRECATIONS FROM 2.3 to 2.4: 60*455610afSAndroid Build Coastguard Worker 61*455610afSAndroid Build Coastguard Worker- ObjectUtils.appendIdentityToString(StringBuffer, Object) - has very odd semantics, use 62*455610afSAndroid Build Coastguard Worker ObjectUtils.identityToString(StringBuffer, Object) instead. 63*455610afSAndroid Build Coastguard Worker 64*455610afSAndroid Build Coastguard Worker- public static java.util.Date add(java.util.Date, int, int) - it is not intended for this 65*455610afSAndroid Build Coastguard Worker method to be public. Please let us know if you use this. 66*455610afSAndroid Build Coastguard Worker 67*455610afSAndroid Build Coastguard WorkerDEPRECATIONS FROM 2.2 to 2.3: 68*455610afSAndroid Build Coastguard Worker 69*455610afSAndroid Build Coastguard Worker- None 70*455610afSAndroid Build Coastguard Worker 71*455610afSAndroid Build Coastguard WorkerDEPRECATIONS FROM 2.1 to 2.2: 72*455610afSAndroid Build Coastguard Worker 73*455610afSAndroid Build Coastguard Worker- None 74*455610afSAndroid Build Coastguard Worker 75*455610afSAndroid Build Coastguard WorkerDEPRECATIONS FROM 2.0 to 2.1: 76*455610afSAndroid Build Coastguard Worker 77*455610afSAndroid Build Coastguard Worker- The enum package has been renamed to enums for JDK 1.5 compliance. 78*455610afSAndroid Build Coastguard WorkerAll functionality is identical, just the package has changed. 79*455610afSAndroid Build Coastguard WorkerThis package will be removed in v3.0. 80*455610afSAndroid Build Coastguard Worker 81*455610afSAndroid Build Coastguard Worker- NumberUtils.stringToInt - renamed to toInt 82*455610afSAndroid Build Coastguard Worker 83*455610afSAndroid Build Coastguard Worker- DateUtils - four constants, MILLIS_IN_* have been deprecated as they were defined 84*455610afSAndroid Build Coastguard Workeras int not long. The replacements are MILLIS_PER_*. 85*455610afSAndroid Build Coastguard Worker 86*455610afSAndroid Build Coastguard Worker 87*455610afSAndroid Build Coastguard WorkerBUG FIXES IN 2.4: 88*455610afSAndroid Build Coastguard Worker 89*455610afSAndroid Build Coastguard Worker * [LANG-76 ] - EnumUtils.getEnum() doesn't work well in 1.5 90*455610afSAndroid Build Coastguard Worker * [LANG-328] - LocaleUtils.toLocale() rejects strings with only language+variant 91*455610afSAndroid Build Coastguard Worker * [LANG-334] - Enum is not thread-safe 92*455610afSAndroid Build Coastguard Worker * [LANG-346] - Dates.round() behaves incorrectly for minutes and seconds 93*455610afSAndroid Build Coastguard Worker * [LANG-349] - Deadlock using ReflectionToStringBuilder 94*455610afSAndroid Build Coastguard Worker * [LANG-353] - Javadoc Example for EqualsBuilder is questionable 95*455610afSAndroid Build Coastguard Worker * [LANG-360] - Why does appendIdentityToString return null? 96*455610afSAndroid Build Coastguard Worker * [LANG-361] - BooleanUtils toBooleanObject javadoc does not match implementation 97*455610afSAndroid Build Coastguard Worker * [LANG-363] - StringEscapeUtils..escapeJavaScript() method did not escape '/' into '\/', it will make IE render page incorrectly 98*455610afSAndroid Build Coastguard Worker * [LANG-364] - Documentation bug for ignoreEmptyTokens accessors in StrTokenizer 99*455610afSAndroid Build Coastguard Worker * [LANG-365] - BooleanUtils.toBoolean() - invalid drop-thru in case statement causes StringIndexOutOfBoundsException 100*455610afSAndroid Build Coastguard Worker * [LANG-367] - FastDateFormat thread safety 101*455610afSAndroid Build Coastguard Worker * [LANG-368] - FastDateFormat getDateInstance() and getDateTimeInstance() assume Locale.getDefault() won't change 102*455610afSAndroid Build Coastguard Worker * [LANG-369] - ExceptionUtils not thread-safe 103*455610afSAndroid Build Coastguard Worker * [LANG-372] - ToStringBuilder: MULTI_LINE_STYLE does not print anything from appendToString methods. 104*455610afSAndroid Build Coastguard Worker * [LANG-380] - infinite loop in Fraction.reduce when numerator == 0 105*455610afSAndroid Build Coastguard Worker * [LANG-381] - NumberUtils.min(floatArray) returns wrong value if floatArray[0] happens to be Float.NaN 106*455610afSAndroid Build Coastguard Worker * [LANG-385] - https://commons.apache.org/proper/commons-lang/developerguide.html "Building" section is incorrect and incomplete 107*455610afSAndroid Build Coastguard Worker * [LANG-393] - EqualsBuilder don't compare BigDecimals correctly 108*455610afSAndroid Build Coastguard Worker * [LANG-399] - Javadoc bugs - cannot find object 109*455610afSAndroid Build Coastguard Worker * [LANG-410] - Ambiguous / confusing names in StringUtils replace* methods 110*455610afSAndroid Build Coastguard Worker * [LANG-412] - StrBuilder appendFixedWidth does not handle nulls 111*455610afSAndroid Build Coastguard Worker * [LANG-414] - DateUtils.round() often fails 112*455610afSAndroid Build Coastguard Worker 113*455610afSAndroid Build Coastguard WorkerIMPROVEMENTS IN 2.4: 114*455610afSAndroid Build Coastguard Worker 115*455610afSAndroid Build Coastguard Worker * [LANG-180] - adding a StringUtils.replace method that takes an array or List of replacement strings 116*455610afSAndroid Build Coastguard Worker * [LANG-192] - Split camel case strings 117*455610afSAndroid Build Coastguard Worker * [LANG-257] - Add new splitByWholeSeparatorPreserveAllTokens() methods to StringUtils 118*455610afSAndroid Build Coastguard Worker * [LANG-269] - Shouldn't Commons Lang's StringUtils have a "common" string method? 119*455610afSAndroid Build Coastguard Worker * [LANG-298] - ClassUtils.getShortClassName and ClassUtils.getPackageName and class of array 120*455610afSAndroid Build Coastguard Worker * [LANG-321] - Add toArray() method to IntRange and LongRange classes 121*455610afSAndroid Build Coastguard Worker * [LANG-322] - ClassUtils.getShortClassName(String) inefficient 122*455610afSAndroid Build Coastguard Worker * [LANG-326] - StringUtils: startsWith / endsWith / startsWithIgnoreCase / endsWithIgnoreCase / removeStartIgnoreCase / removeEndIgnoreCase methods 123*455610afSAndroid Build Coastguard Worker * [LANG-329] - Pointless synchronized in ThreadLocal.initialValue should be removed 124*455610afSAndroid Build Coastguard Worker * [LANG-333] - ArrayUtils.toClass 125*455610afSAndroid Build Coastguard Worker * [LANG-337] - Utility class constructor javadocs should acknowledge that they may sometimes be used, e.g. with Velocity. 126*455610afSAndroid Build Coastguard Worker * [LANG-338] - truncateNicely method which avoids truncating in the middle of a word 127*455610afSAndroid Build Coastguard Worker * [LANG-345] - Optimize HashCodeBuilder.append(Object) 128*455610afSAndroid Build Coastguard Worker * [LANG-351] - Extension to ClassUtils: Obtain the primitive class from a wrapper 129*455610afSAndroid Build Coastguard Worker * [LANG-356] - Add getStartTime to StopWatch 130*455610afSAndroid Build Coastguard Worker * [LANG-362] - Add ExtendedMessageFormat to org.apache.commons.lang.text 131*455610afSAndroid Build Coastguard Worker * [LANG-371] - ToStringStyle javadoc should show examples of styles 132*455610afSAndroid Build Coastguard Worker * [LANG-374] - Add escaping for CSV columns to StringEscapeUtils 133*455610afSAndroid Build Coastguard Worker * [LANG-375] - add SystemUtils.IS_OS_WINDOWS_VISTA field 134*455610afSAndroid Build Coastguard Worker * [LANG-379] - Calculating A date fragment in any time-unit 135*455610afSAndroid Build Coastguard Worker * [LANG-383] - Adding functionality to DateUtils to allow direct setting of various fields. 136*455610afSAndroid Build Coastguard Worker * [LANG-402] - OSGi-ify Lang 137*455610afSAndroid Build Coastguard Worker * [LANG-404] - Add Calendar flavour format methods to DateFormatUtils 138*455610afSAndroid Build Coastguard Worker * [LANG-407] - StringUtils.length(String) returns null-safe length 139*455610afSAndroid Build Coastguard Worker * [LANG-413] - Memory usage improvement for StringUtils#getLevenshteinDistance() 140