Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Commons Lang

Wiki Markup\[http://jakarta.apache.org/commons/lang Lang\] aims to provide:

  • Comprehensive String handling utilities
  • Enumerated types (pre JDK 1.5)
  • Nested exceptions (pre JDK 1.4)
  • Builders to create hashCode, equals, toString and compareTo methods
  • Utilities for Object, Date and Numbers

Wiki MarkupThe Javadoc of the latest version (2.1) is available.

The Javadoc of the CVS version (development) is available0 version (latest) is \[http://jakarta.apache.org/commons/lang/api/index.html available\]. Wiki MarkupThe Javadoc of the CVS version (development) is \[http://jakarta.apache.org/commons/lang/apidocs/index.html available\].

Development plan for 2.

...

  1. Wiki Markup
    \[http://issues.apache.org/bugzilla/show_bug.cgi?id=30855 30855\]     Extra constructor for [EqualsBuilder].
  2. Wiki Markup
    \[http://issues.apache.org/bugzilla/show_bug.cgi?id=30929 30929\]     Bug in Nestable.indexOfThrowable?
  3. DurationUtils ISO_EXTENDED_FORMAT uses FastDateFormat. This has problems with padding of years. See commented TODO in DurationFormatUtils.
  4. FastDateFormat has problems with dates. See the last test in FastDateFormatTest.

Seeking opinions

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=22692 22692\]	[StringUtils].split ignores empty items - *new splitPreserveAllTokens Needs to be reviewed.*

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=22717 22717\] 	\[lang\] [MutableNumbers] - *see lang.mutable.*

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=18962 18962\] 	\[lang\] New Method: getSubstitutedValues( String, Map ) - *org.apache.commons.lang.Interpolation available for opinions*

...

2

  1. Bug fixes
  2. StrTokenizer
  3. StrBuilder
  4. VariableFormatter/interpolator - 18962

Other ideas

  1. Wiki Markup\[

    Wiki Markup

    \[http://issues.apache.org/bugzilla/show_bug.cgi?id=29163 29163\]	Make [StopWatch] validate state transitions - *Coding needed*
  2. Wiki Markup
    \[http://issues.apache.org/bugzilla/show_bug.cgi?id=26056 26056\] 	\[lang\] Add methods to [ArrayUtils]: add at end and insert-like ops - *DONE - add(Object\[\], Object) is overloaded for all the primitives, but add(Object\[\], int, Object) and addAll(Object\[\], Object\[\]) are not overloaded for primitives. Should they be?*
  3. Wiki Markup
    \[http://issues.apache.org/bugzilla/show_bug.cgi?id=24910 24910\] 	new [StringUtils].split methods that split on the whole separator string - *committed as splitByWholeSeparator*
  4. Wiki Markup
    \[http://issues.apache.org/bugzilla/show_bug.cgi?id=15082 15082\]	\[lang\] elapsed time formatting utility method - *DurationFormatUtils.*
  5. DateUtils.isSameDay()

Pushed back

  1. [21663|http://issues.apache.org/bugzilla/show_bug.cgi?id=

    21663

    21663

    \

    ] 	\[lang\] Add support in [ToStringStyle] for [DateFormat]. - *Grows quickly into commons-convert*

  2. Wiki Markup

    \

    [27643|http://issues.apache.org/bugzilla/show_bug.cgi?id=27643

    27643\

    ] 	\[lang\]\[patch\] [ClassUtils].newInstance method - *Seems unnecessary*

  3. Wiki Markup

    \

    [29149|http://issues.apache.org/bugzilla/show_bug.cgi?id=29149

    29149\

    ] 	\[lang\] [StringEscapeUtils].unescapeHtml() doesn't handle an empty entity - *Empty entity is in fact illegal HTML, so need to decide if we should ignore. Current behaviour seems acceptable as we're not in the work with bad HTML market.*

    StringBuffer replacement - Probably 2.2/3.0. A lot of work in this I'd imagine.

  4. Wiki Markup

    \

    [26659|http://issues.apache.org/bugzilla/show_bug.cgi?id=

    26659

    26659

    \

    ] 	\[lang\] add method to [DateUtils] to get the distance between 2 dates - *Mainly replicated by [DurationFormatUtils], or non-obvious*

  5. Wiki Markup

    \

    [29692|http://issues.apache.org/bugzilla/show_bug.cgi?id=29692

    29692\

    ] 	\[lang\] String indentation feature request - *Needs design as a non-simple problem*

  6. Wiki Markup

    \

    [22172|http://issues.apache.org/bugzilla/show_bug.cgi?id=22172

    22172\

    ] 	\[lang\] [DateUtils].parseCVS behavior parsing "h:mm z" - *Moved to sandbox*

  7. Wiki Markup

    \

    [26297|http://issues.apache.org/bugzilla/show_bug.cgi?id=

    26297

    26297

    \

    ] 	\[lang\] [BitSetUtils] class, toIndexArray and fromIndexArray

    Wiki Markup\[http://issues.apache.org/bugzilla/show_bug.cgi?id=26922 26922\] \[lang\] public static boolean [DateUtils].equals(Date dt1, Date dt2)

  8. Wiki Markup\[http://issues.apache.org/bugzilla/show_bug.cgi?id=21333 21333\] Add [TimeoutController] - *Class in [HttpClient]. Leaving til 3.0 as not much movement on it*
  9. Wiki Markup

    \

    [30674|http://issues.apache.org/bugzilla/show_bug.cgi?id=

    30674

    30674

    \

    ]     Support [HttpClient]'s [DateParser] class - *This is basically a Date parseDate(String dateValue, String\[\] dateFormats) method.*

  10. Wiki Markup
    \[http://issues.apache.org/bugzilla/show_bug.cgi?id=15082 15082\]	\[lang\] elapsed time formatting utility method - *DurationFormatUtils. Needs finishing.*
  11. New text package with Interpolation class moved there and MappedMessageFormat from code in Digester.

Resolved list

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=27592 27592\] 	\[lang\] [WordUtils] capitalize improvement - *DONE*

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=23557 23557\] 	[WordUtils].capitalizeFully(String str) should take a delimiter - *DONE*

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=27778 27778\] 	\[lang\] add remove methods to [ArrayUtils] - *DONE*

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=25227 25227\] 	\[lang\] [StringEscapeUtils].unescapeHtml() doesn't handle hex entities - *DONE*

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=27640 27640\] 	\[lang\]\[patch\] [ClassUtils].primitivesToWrappers method - *DONE*

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=23749 23749\] 	\[lang\] \[PATCH\] [NumberRange] - adds inclusive and exclusive end points - *WONTFIX*

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=27876 27876\] 	\[lang\] [ReflectionToStringBuilder].toString(null) throws exception by design - *DONE*

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=27877 27877\] 	\[lang\]\[patch\] Make [ClassUtils] methods null-safe and not throw an IAE. - *DONE*

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=29673 29673\] 	\[lang\] [ExceptionUtils]: new getCause() methodname (for tomcat-exception) - *DONE*

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=25560 25560\]	[DateUtils].truncate() is off by one hour when using a date in DST switch 'zone' - *DONE*

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=19331 19331\] 	\[lang\] General case: infinite loop: [ToStringBuilder].reflectionToString - *The bugzilla entry* *_Gary Gregory 2003-06-23 17:27_* *shows this to have been fixed.*

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=29294 29294\] 	\[lang\]\[PATCH\] Fix the Fraction class - *DONE*

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=29794 29794\] 	Add convenience format(long) methods to [FastDateFormat] - *DONE*

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=28468 28468\] 	[StringUtils].defaultString: Documentation error - *DONE*

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=22489 22489\] 	\[lang\]patch\] [StringUtils].isAsciiPrintable() - *DONE*

...

Wiki Markup
\[http://issues.apache.org/bugzilla/show_bug.cgi?id=26646 26646\] 	\[lang\] [FastDateFormat].getDateInstance(int, Locale) always uses the pattern from the first invocation - *DONE*

...

  1. LocaleUtils - including toLocale(String,String)
  2. CloneUtils - multiple ways to clone an object

Articles

This article http://www.devx.com/Java/Article/29392/0/page/6 discusses some of the interesting classes in Commons Lang with real world examples.