1*455610afSAndroid Build Coastguard Worker<?xml version="1.0"?> 2*455610afSAndroid Build Coastguard Worker<!-- 3*455610afSAndroid Build Coastguard WorkerLicensed to the Apache Software Foundation (ASF) under one or more 4*455610afSAndroid Build Coastguard Workercontributor license agreements. See the NOTICE file distributed with 5*455610afSAndroid Build Coastguard Workerthis work for additional information regarding copyright ownership. 6*455610afSAndroid Build Coastguard WorkerThe ASF licenses this file to You under the Apache License, Version 2.0 7*455610afSAndroid Build Coastguard Worker(the "License"); you may not use this file except in compliance with 8*455610afSAndroid Build Coastguard Workerthe License. You may obtain a copy of the License at 9*455610afSAndroid Build Coastguard Worker 10*455610afSAndroid Build Coastguard Worker http://www.apache.org/licenses/LICENSE-2.0 11*455610afSAndroid Build Coastguard Worker 12*455610afSAndroid Build Coastguard WorkerUnless required by applicable law or agreed to in writing, software 13*455610afSAndroid Build Coastguard Workerdistributed under the License is distributed on an "AS IS" BASIS, 14*455610afSAndroid Build Coastguard WorkerWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15*455610afSAndroid Build Coastguard WorkerSee the License for the specific language governing permissions and 16*455610afSAndroid Build Coastguard Workerlimitations under the License. 17*455610afSAndroid Build Coastguard Worker--> 18*455610afSAndroid Build Coastguard Worker<document> 19*455610afSAndroid Build Coastguard Worker <properties> 20*455610afSAndroid Build Coastguard Worker <title>2.1 Release Notes</title> 21*455610afSAndroid Build Coastguard Worker <author email="[email protected]">Commons Documentation Team</author> 22*455610afSAndroid Build Coastguard Worker </properties> 23*455610afSAndroid Build Coastguard Worker<body> 24*455610afSAndroid Build Coastguard Worker 25*455610afSAndroid Build Coastguard Worker<section name="Lang 2.1 Release Notes"> 26*455610afSAndroid Build Coastguard Worker<p> 27*455610afSAndroid Build Coastguard WorkerThese are the release notes and advice for upgrading Commons-Lang from 28*455610afSAndroid Build Coastguard Workerversion 2.0 to version 2.1. 29*455610afSAndroid Build Coastguard Worker<source> 30*455610afSAndroid Build Coastguard WorkerINTRODUCTION: 31*455610afSAndroid Build Coastguard Worker 32*455610afSAndroid Build Coastguard WorkerThis document contains the release notes for the 2.1 version of Apache Jakarta Commons Lang. 33*455610afSAndroid Build Coastguard WorkerCommons Lang is a set of utility functions and reusable components that 34*455610afSAndroid Build Coastguard Workershould be of use in any Java environment. 35*455610afSAndroid Build Coastguard Worker 36*455610afSAndroid Build Coastguard Worker 37*455610afSAndroid Build Coastguard WorkerINCOMPATIBLE CHANGES: 38*455610afSAndroid Build Coastguard Worker 39*455610afSAndroid Build Coastguard Worker- The Nestable interface defines the method indexOfThrowable(Class). 40*455610afSAndroid Build Coastguard WorkerPreviously the implementations checked only for a specific Class. 41*455610afSAndroid Build Coastguard WorkerNow they check for subclasses of that Class as well. 42*455610afSAndroid Build Coastguard WorkerFor most situations this will be the expected behavior (i.e. it's a bug fix). 43*455610afSAndroid Build Coastguard WorkerIf it causes problems, please use the ExceptionUtils.indexOfThrowable(Class) method instead. 44*455610afSAndroid Build Coastguard WorkerNote that the ExceptionUtils method is available in v1.0 and v2.0 of commons-lang and has not been changed. 45*455610afSAndroid Build Coastguard Worker(An alternative to this is to change the public static matchSubclasses flag on NestableDelegate. 46*455610afSAndroid Build Coastguard WorkerHowever, we don't recommend that as a long-term solution.) 47*455610afSAndroid Build Coastguard Worker 48*455610afSAndroid Build Coastguard Worker- The StopWatch class has had much extra validation added. 49*455610afSAndroid Build Coastguard WorkerIf your code previously relied on unusual aspects, it may no longer work. 50*455610afSAndroid Build Coastguard Worker 51*455610afSAndroid Build Coastguard Worker- Starting with version 2.1, Ant version 1.6.x is required to build. Copy 52*455610afSAndroid Build Coastguard Workerjunit.jar to ANT_HOME/lib. You can get JUnit from https://www.junit.org. See the developer's guide 53*455610afSAndroid Build Coastguard Workerfor more details. 54*455610afSAndroid Build Coastguard Worker 55*455610afSAndroid Build Coastguard Worker 56*455610afSAndroid Build Coastguard WorkerDEPRECATIONS: 57*455610afSAndroid Build Coastguard Worker 58*455610afSAndroid Build Coastguard Worker- The enum package has been renamed to enums for JDK 1.5 compliance. 59*455610afSAndroid Build Coastguard WorkerAll functionality is identical, just the package has changed. 60*455610afSAndroid Build Coastguard WorkerThis package will be removed in v3.0. 61*455610afSAndroid Build Coastguard Worker 62*455610afSAndroid Build Coastguard Worker- NumberUtils.stringToInt - renamed to toInt 63*455610afSAndroid Build Coastguard Worker 64*455610afSAndroid Build Coastguard Worker- DateUtils - four constants, MILLIS_IN_* have been deprecated as they were defined 65*455610afSAndroid Build Coastguard Workeras int not long. The replacements are MILLIS_PER_*. 66*455610afSAndroid Build Coastguard Worker 67*455610afSAndroid Build Coastguard Worker 68*455610afSAndroid Build Coastguard WorkerNEW FEATURES: 69*455610afSAndroid Build Coastguard Worker 70*455610afSAndroid Build Coastguard WorkerNew: 71*455610afSAndroid Build Coastguard Worker- Mutable package - contains basic classes that hold an Object or primitive 72*455610afSAndroid Build Coastguard Workerand provide both get and set methods. 73*455610afSAndroid Build Coastguard Worker- DurationFormatUtils - provides various methods for formatting durations 74*455610afSAndroid Build Coastguard Worker- CharEncoding - definitions of constants for character encoding work 75*455610afSAndroid Build Coastguard Worker- CharUtils - utilities for working with characters 76*455610afSAndroid Build Coastguard Worker 77*455610afSAndroid Build Coastguard WorkerUpdated: 78*455610afSAndroid Build Coastguard Worker- ArrayUtils - many more methods, especially List-like methods 79*455610afSAndroid Build Coastguard Worker- BooleanUtils - isTrue and isFalse methods that handle null 80*455610afSAndroid Build Coastguard Worker- ClassUtils - primitive to wrapper class conversion methods 81*455610afSAndroid Build Coastguard Worker- ClassUtils - class name comparator 82*455610afSAndroid Build Coastguard Worker- IllegalClassException - extra constructor for common instanceof case 83*455610afSAndroid Build Coastguard Worker- NotImplementedException - supports nested exceptions 84*455610afSAndroid Build Coastguard Worker- ObjectUtils - hashcode method handling null 85*455610afSAndroid Build Coastguard Worker- StringUtils - isAsciiPrintable to check the contents of a string 86*455610afSAndroid Build Coastguard Worker -- ordinalIndexOf to find the nth index of a string 87*455610afSAndroid Build Coastguard Worker -- various remove methods to remove parts of a string 88*455610afSAndroid Build Coastguard Worker -- various split methods to provide more control over splitting a string 89*455610afSAndroid Build Coastguard Worker -- defaultIfEmpty to default a string if null or empty 90*455610afSAndroid Build Coastguard Worker- SystemUtils - methods to get system properties as File objects 91*455610afSAndroid Build Coastguard Worker -- extra constants representing system properties 92*455610afSAndroid Build Coastguard Worker- Validate - new methods to check whether all elements in a collection are of a specific type 93*455610afSAndroid Build Coastguard Worker- WordUtils - new methods to capitalize based on a set of specified delimiters 94*455610afSAndroid Build Coastguard Worker 95*455610afSAndroid Build Coastguard Worker- EqualsBuilder - now provides setter to internal state 96*455610afSAndroid Build Coastguard Worker- ToStringStyle - new style, short prefix style 97*455610afSAndroid Build Coastguard Worker- ReflectionToStringBuilder - more flags to control the output with regards to statics 98*455610afSAndroid Build Coastguard Worker 99*455610afSAndroid Build Coastguard Worker- ExceptionUtils - added indexOfType methods that check subclasses, thus leaving the existing 100*455610afSAndroid Build Coastguard WorkerindexOfThrowable method untouched (see incompatible changes section) 101*455610afSAndroid Build Coastguard Worker 102*455610afSAndroid Build Coastguard Worker- NumberUtils - various string to number parsing methods added 103*455610afSAndroid Build Coastguard Worker 104*455610afSAndroid Build Coastguard Worker- DateUtils - methods added to compare dates in various ways 105*455610afSAndroid Build Coastguard Worker -- method to parse a date string using multiple patterns 106*455610afSAndroid Build Coastguard Worker- FastDateFormat - extra formatting methods that take in a millisecond long value 107*455610afSAndroid Build Coastguard Worker -- additional static factory methods 108*455610afSAndroid Build Coastguard Worker- StopWatch - new methods for split behavior 109*455610afSAndroid Build Coastguard Worker 110*455610afSAndroid Build Coastguard Worker 111*455610afSAndroid Build Coastguard WorkerBUG FIXES: 112*455610afSAndroid Build Coastguard Worker 113*455610afSAndroid Build Coastguard Worker19331 General case: infinite loop: ToStringBuilder.reflectionToString 114*455610afSAndroid Build Coastguard Worker23174 EqualsBuilder.append(Object[], Object[]) throws NPE 115*455610afSAndroid Build Coastguard Worker23356 Make DurationFormatUtils public! 116*455610afSAndroid Build Coastguard Worker23557 WordUtils.capitalizeFully(String str) should take a delimiters 117*455610afSAndroid Build Coastguard Worker23683 New method for converting a primitive Class to its corresponding wrapper 118*455610afSAndroid Build Coastguard Worker23430 Minor javadoc fixes for StringUtils.contains(String, String) 119*455610afSAndroid Build Coastguard Worker23590 make optional parameters in FastDateFormat really optional 120*455610afSAndroid Build Coastguard Worker24056 Documentation error in StringUtils.replace 121*455610afSAndroid Build Coastguard Worker25227 StringEscapeUtils.unescapeHtml() doesn't handle hex entities 122*455610afSAndroid Build Coastguard Worker25454 new StringUtils.replaceChars behaves differently from old Ch 123*455610afSAndroid Build Coastguard Worker25560 DateUtils.truncate() is off by one hour when using a date in DST switch 'zone' 124*455610afSAndroid Build Coastguard Worker25627 DateUtils constants should be long 125*455610afSAndroid Build Coastguard Worker25683 Add method that validates Collection elements are a correct 126*455610afSAndroid Build Coastguard Worker25849 Add SystemUtils methods for directory properties. 127*455610afSAndroid Build Coastguard Worker26616 ClassCastException in Enum.equals(Object) 128*455610afSAndroid Build Coastguard Worker26699 Tokenizer Enhancements: reset input string, static CSV 129*455610afSAndroid Build Coastguard Worker26734 NullPointerException in EqualsBuilder.append(Object[], Object[]) 130*455610afSAndroid Build Coastguard Worker26877 Add SystemUtils.AWT_TOOLKIT and others. 131*455610afSAndroid Build Coastguard Worker26922 public static boolean DateUtils.equals(Date dt1, Date dt2) 132*455610afSAndroid Build Coastguard Worker27592 WordUtils capitalize improvement 133*455610afSAndroid Build Coastguard Worker27876 ReflectionToStringBuilder.toString(null) throws exception by design 134*455610afSAndroid Build Coastguard Worker27877 Make ClassUtils methods null-safe and not throw an IAE. 135*455610afSAndroid Build Coastguard Worker28468 StringUtils.defaultString: Documentation error 136*455610afSAndroid Build Coastguard Worker28554 Add hashCode-support to class ObjectUtils 137*455610afSAndroid Build Coastguard Worker29082 Enhancement of ExceptionUtils.CAUSE_METHOD_NAMES 138*455610afSAndroid Build Coastguard Worker29149 StringEscapeUtils.unescapeHtml() doesn't handle an empty entity 139*455610afSAndroid Build Coastguard Worker29294 lang.math.Fraction class deficiencies 140*455610afSAndroid Build Coastguard Worker29673 ExceptionUtils: new getCause() methodname (for tomcat) 141*455610afSAndroid Build Coastguard Worker29794 Add convenience format(long) methods to FastDateForma 142*455610afSAndroid Build Coastguard Worker30328 HashCodeBuilder does not use the same values as Boolean (fixed as documentation) 143*455610afSAndroid Build Coastguard Worker30334 New class proposal: CharacterEncoding 144*455610afSAndroid Build Coastguard Worker30674 parseDate class from HttpClient's DateParser class 145*455610afSAndroid Build Coastguard Worker30815 ArrayUtils.isEquals() throws ClassCastException when array1 146*455610afSAndroid Build Coastguard Worker30929 Nestable.indexOfThrowable(Class) uses Class.equals() to match 147*455610afSAndroid Build Coastguard Worker31395 DateUtils.truncate oddity at the far end of the Date spectrum 148*455610afSAndroid Build Coastguard Worker31478 Compile error with JDK 5 "enum" is a keyword 149*455610afSAndroid Build Coastguard Worker31572 o.a.c.lang.enum.ValuedEnum: 'enum' is a keyword in JDK 1.5.0 150*455610afSAndroid Build Coastguard Worker31933 ToStringStyle setArrayEnd handled null incorrectly 151*455610afSAndroid Build Coastguard Worker32133 SystemUtils fails init on HP-UX 152*455610afSAndroid Build Coastguard Worker32198 Error in Javadoc for StringUtils.chomp(String, String) 153*455610afSAndroid Build Coastguard Worker32625 Can't subclass EqualsBuilder because isEquals is private 154*455610afSAndroid Build Coastguard Worker33067 EqualsBuilder.append(Object[], Object[]) crashes with a NullPointerException if an element of the first array is null 155*455610afSAndroid Build Coastguard Worker33069 EqualsBuilder.append(Object[], Object[]) incorrectly checks that rhs[i] is instance of lhs[i]'s class 156*455610afSAndroid Build Coastguard Worker33574 unbalanced ReflectionToStringBuilder 157*455610afSAndroid Build Coastguard Worker33737 ExceptionUtils.addCauseMethodName(String) does not check for duplicates. 158*455610afSAndroid Build Coastguard Worker</source> 159*455610afSAndroid Build Coastguard Worker</p> 160*455610afSAndroid Build Coastguard Worker</section> 161*455610afSAndroid Build Coastguard Worker 162*455610afSAndroid Build Coastguard Worker</body> 163*455610afSAndroid Build Coastguard Worker</document> 164