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 2.2 20 Release Notes 21 22 23INTRODUCTION: 24 25This document contains the release notes for the 2.2 version of Apache Jakarta Commons Lang. 26Commons Lang is a set of utility functions and reusable components that 27should be of use in any Java environment. 28 29INCOMPATIBLE CHANGES WITH VERSION 2.1: 30 31- None 32 33ADDITIONAL INCOMPATIBLE CHANGES WITH VERSION 2.0: 34 35- The Nestable interface defines the method indexOfThrowable(Class). 36Previously the implementations checked only for a specific Class. 37Now they check for subclasses of that Class as well. 38For most situations this will be the expected behavior (i.e. it's a bug fix). 39If it causes problems, please use the ExceptionUtils.indexOfThrowable(Class) method instead. 40Note that the ExceptionUtils method is available in v1.0 and v2.0 of commons-lang and has not been changed. 41(An alternative to this is to change the public static matchSubclasses flag on NestableDelegate. 42However, we don't recommend that as a long-term solution.) 43 44- The StopWatch class has had much extra validation added. 45If your code previously relied on unusual aspects, it may no longer work. 46 47- Starting with version 2.1, Ant version 1.6.x is required to build. Copy 48junit.jar to ANT_HOME/lib. You can get JUnit from https://www.junit.org. See the developer's guide 49for more details. 50 51DEPRECATIONS FROM 2.1 to 2.2: 52 53- None 54 55DEPRECATIONS FROM 2.0 to 2.1: 56 57- The enum package has been renamed to enums for JDK 1.5 compliance. 58All functionality is identical, just the package has changed. 59This package will be removed in v3.0. 60 61- NumberUtils.stringToInt - renamed to toInt 62 63- DateUtils - four constants, MILLIS_IN_* have been deprecated as they were defined 64as int not long. The replacements are MILLIS_PER_*. 65 66 67BUG FIXES IN 2.2: 68 69LANG-2 javadoc example for StringUtils.splitByWholeSeparator incorrect 70LANG-3 PADDING array in StringUtils overflows on '\uffff' 71LANG-10 [patch] ClassUtils.primitiveToWrapper and Void 72LANG-21 escapeXML() -> Not escaping low characters 73LANG-25 DurationFormatUtils.formatDurationISO() javadoc is missing T in duration string between date and time part 74LANG-37 unit test for org.apache.commons.lang.text.StrBuilder 75LANG-42 EqualsBuilder.append(Object[], Object[]) crashes with a NullPointerException if an element of the first array is null 76LANG-45 StrBuilderTest#testReplaceStringString fails. 77LANG-50 Replace Clover with Cobertura 78LANG-59 DateUtils.truncate method is buggy when dealing with DST switching hours 79LANG-100 RandomStringUtils.random() family of methods create invalid unicode sequences 80LANG-105 ExceptionUtils goes into infinite loop in getThrowables is throwable.getCause() == throwable 81LANG-106 StringUtils#getLevenshteinDistance() performance is suboptimal 82LANG-112 Wrong length check in StrTokenizer.StringMatcher 83LANG-117 FastDateFormat: wrong format for date "01.01.1000" 84LANG-122 EscapeUtil.escapeHtml() should clarify that it does not escape ' chars to ' 85LANG-123 Unclear javadoc for DateUtils.iterator() 86LANG-127 Minor tweak to fix of bug # 26616 87LANG-130 Memory "leak" in StringUtils 88LANG-140 DurationFormatUtils.formatPeriod() returns the wrong result 89LANG-141 Fraction.toProperString() returns -1/1 for -1 90LANG-148 Performance modifications on StringUtils.replace 91LANG-150 StringEscapeUtils.unescapeHtml skips first entity after standalone ampersand 92LANG-152 DurationFormatUtils.formatDurationWords "11 <unit>s" gets converted to "11 <unit>" 93LANG-259 ValuedEnum.compareTo(Object other) not typesafe - it easily could be... 94LANG-261 Error in an example in the javadoc of the StringUtils.splitPreserveAllTokens() method 95LANG-264 ToStringBuilder/HashCodeBuilder javadoc code examples 96LANG-271 LocaleUtils test fails under Mustang 97LANG-272 Minor build and checkstyle changes 98LANG-277 Javadoc errors on StringUtils.splitPreserveAllTokens(String, char) 99LANG-278 javadoc for StringUtils.removeEnd is incorrect 100 101IMPROVEMENTS IN 2.2: 102 103LANG-159 Add WordUtils.getInitials(String) 104LANG-161 Add methods and tests to StrBuilder 105LANG-162 replace() length calculation improvement 106LANG-165 parseDate with TimeZone 107LANG-166 New interpolation features 108LANG-169 Implementation of escape/unescapeHtml methods with Writer 109LANG-176 CompareToBuilder excludeFields for reflection method 110LANG-186 Request for MutableBoolean implementation 111LANG-194 add generic add method to DateUtils 112LANG-198 New method for EqualsBuilder 113LANG-212 New ExceptionUtils method setCause() 114LANG-216 Provides a Class.getPublicMethod which returns public invocable Method 115LANG-217 Add Mutable<Type> to<Type>() methods. 116LANG-220 Tokenizer Enhancements: reset input string, static CSV/TSV factories 117LANG-226 Using ReflectionToStringBuilder and excluding secure fields 118LANG-242 Trivial cleanup of javadoc in various files 119LANG-246 CompositeFormat 120LANG-250 Performance boost for RandomStringUtils 121LANG-254 Enhanced Class.forName version 122LANG-260 StringEscapeUtils should expose escape*() methods taking Writer argument 123LANG-263 Add StringUtils.containsIgnoreCase(...) 124LANG-267 Support char array converters on ArrayUtils 125LANG-270 minor javadoc improvements for StringUtils.stripXxx() methods 126 New ExceptionUtils methods getMessage/getRootCauseMessage 127 128