1<?xml version="1.0"?> 2<!-- 3Licensed to the Apache Software Foundation (ASF) under one or more 4contributor license agreements. See the NOTICE file distributed with 5this work for additional information regarding copyright ownership. 6The ASF licenses this file to You under the Apache License, Version 2.0 7(the "License"); you may not use this file except in compliance with 8the License. You may obtain a copy of the License at 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12Unless required by applicable law or agreed to in writing, software 13distributed under the License is distributed on an "AS IS" BASIS, 14WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15See the License for the specific language governing permissions and 16limitations under the License. 17--> 18<document> 19 <properties> 20 <title>2.3 Release Notes</title> 21 <author email="[email protected]">Commons Documentation Team</author> 22 </properties> 23<body> 24 25<section name="Lang 2.3 Release Notes"> 26<p> 27These are the release notes and advice for upgrading Commons-Lang from 28version 2.2 to version 2.3. 29<source> 30INTRODUCTION: 31 32This document contains the release notes for the 2.3 version of Apache 33Jakarta Commons Lang. 34Commons Lang is a set of utility functions and reusable components that 35should be of use in any Java environment. 36 37INCOMPATIBLE CHANGES WITH VERSION 2.2: 38 39- Calling stop on a suspended StopWatch will no longer change the underlying time. 40 It's very unlikely anyone was relying on that bug as a feature. 41 42ADDITIONAL INCOMPATIBLE CHANGES WITH VERSION 2.0: 43 44- The Nestable interface defines the method indexOfThrowable(Class). 45Previously the implementations checked only for a specific Class. 46Now they check for subclasses of that Class as well. 47For most situations this will be the expected behavior (i.e. it's a bug fix). 48If it causes problems, please use the ExceptionUtils.indexOfThrowable(Class) method instead. 49Note that the ExceptionUtils method is available in v1.0 and v2.0 of commons-lang and has not been changed. 50(An alternative to this is to change the public static matchSubclasses flag on NestableDelegate. 51However, we don't recommend that as a long-term solution.) 52 53- The StopWatch class has had much extra validation added. 54If your code previously relied on unusual aspects, it may no longer work. 55 56- Starting with version 2.1, Ant version 1.6.x is required to build. Copy 57junit.jar to ANT_HOME/lib. You can get JUnit from https://www.junit.org. See the developer's guide 58for more details. 59 60DEPRECATIONS FROM 2.2 to 2.3: 61 62- None 63 64DEPRECATIONS FROM 2.1 to 2.2: 65 66- None 67 68DEPRECATIONS FROM 2.0 to 2.1: 69 70- The enum package has been renamed to enums for JDK 1.5 compliance. 71All functionality is identical, just the package has changed. 72This package will be removed in v3.0. 73 74- NumberUtils.stringToInt - renamed to toInt 75 76- DateUtils - four constants, MILLIS_IN_* have been deprecated as they were defined 77as int not long. The replacements are MILLIS_PER_*. 78 79 80BUG FIXES IN 2.3: 81 82 * [LANG-69 ] - ToStringBuilder throws StackOverflowError when an Object cycle exists 83 * [LANG-102] - Refactor Entities methods 84 * [LANG-153] - Can't XMLDecode an Enum 85 * [LANG-262] - Use of enum prevents a classloader from being garbage collected resulting in out of memory exceptions. 86 * [LANG-279] - HashCodeBuilder throws java.lang.StackOverflowError when an object contains a cycle. 87 * [LANG-281] - DurationFormatUtils returns wrong result 88 * [LANG-286] - Serialization - not backwards compatible 89 * [LANG-292] - unescapeXml("&12345678;") should be "&12345678;" 90 * [LANG-294] - StrBuilder.replaceAll and StrBuilder.deleteAll can throw ArrayIndexOutOfBoundsException. 91 * [LANG-295] - StrBuilder contains usages of thisBuf.length when they should use size 92 * [LANG-299] - Bug in method appendFixedWidthPadRight of class StrBuilder causes an ArrayIndexOutOfBoundsException 93 * [LANG-300] - NumberUtils.createNumber throws NumberFormatException for one digit long 94 * [LANG-303] - FastDateFormat.mRules is not transient or serializable 95 * [LANG-304] - NullPointerException in isAvailableLocale(Locale) 96 * [LANG-313] - Wrong behavior of Entities.unescape 97 * [LANG-315] - StopWatch: suspend() acts as split(), if followed by stop() 98 99IMPROVEMENTS IN 2.3: 100 101 * [LANG-258] - Enum Javadoc 102 * [LANG-266] - Wish for StringUtils.join(Collection, *) 103 * [LANG-268] - StringUtils.join should allow you to pass a range for it (so it only joins a part of the array) 104 * [LANG-275] - StringUtils substringsBetween 105 * [LANG-282] - Create more tests to test out the +=31 replacement code in DurationFormatUtils. 106 * [LANG-287] - Optimize StringEscapeUtils.unescapeXml(String) 107 * [LANG-289] - NumberUtils.max(byte[]) and NumberUtils.min(byte[]) are missing 108 * [LANG-291] - Null-safe comparison methods for finding most recent / least recent dates. 109 * [LANG-306] - StrBuilder appendln/appendAll/appendSeparator 110 * [LANG-310] - BooleanUtils isNotTrue/isNotFalse 111 * [LANG-314] - Tests fail to pass when building with Maven 2 112 113</source> 114</p> 115</section> 116 117</body> 118</document> 119