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