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