NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Maven Central · #1331 by repository stars
Apache Commons Lang is a package of Java utility classes for the Java lang packages, classes that could be considered standard to justify their existence in java.lang. The code is tested using the latest revision of the JDK for supported LTS releases: 8, 11, 17, 21, and 25. See https://github.com/apache/commons-lang/blob/master/.github/workflows/maven.yml Please ensure your build environment is up-to-date and kindly report any build issues. Starting with Commons Lang 3.9, we target Java 8 and us
Last release 16 days ago
25 Sep 2026
Release timing varies
gaps range from 3 weeks to 2.4 years
Most releases are documented
notes for 24 of 27 stable releases
Nothing withdrawn
no release was ever pulled
15 years old
27 releases · first in 2011
Create release tag for Apache Commons Lang release 3.21.0.
Create release tag for Apache Commons Lang release 3.21.0.
The Apache Commons Lang team is pleased to announce the release of Apache Commons Lang 3.21.0.
Apache Commons Lang is a package of Java utility classes for the Java lang packages, classes that could be considered standard to justify their existence in java.lang.
The code is tested using the latest revision of the JDK for supported LTS releases: 8, 11, 17, 21, and 25. See https://github.com/apache/commons-lang/blob/master/.github/workflows/maven.yml
Please ensure your build environment is up-to-date and kindly report any build issues.
Starting with Commons Lang 3.9, we target Java 8 and use those features.
For advice on upgrading from 2.x to 3.x, see https://commons.apache.org/lang/article3_0.html
This is a feature and maintenance release. Java 8 or later is required.
Changes in this version include:
New features:
Add JavaVersion.JAVA_27. Thanks to Gary Gregory.
Add SystemUtils.IS_JAVA_27. Thanks to Gary Gregory.
JavaVersion.get(String) now support Java 26, 27 and 28. Thanks to Gary Gregory.
Add long support to BitField #1561. Thanks to Gary Gregory, Theodora Anastasia Lazaridou.
Add ArrayUtils.getDimensions(Object). Thanks to Gary Gregory.
Add FailableConsumer.accept(FailableConsumer, T) (#1641). Thanks to Gary Gregory.
Add AutoCloseables #1643. Thanks to Gary Gregory.
Add ArrayFill.clear(char[]) (#1667). Thanks to Gary Gregory.
Add DurationUtils.toMillisLong(Duration) (#1679). Thanks to Gary Gregory.
Add Instants.toEpochMillis(Instant) (#1680). Thanks to Gary Gregory.
Add StringUtils.trimAsciiControl(String) (#1681). Thanks to Gary Gregory.
Add Instants.toMillisSince(Instant) (#1683). Thanks to Gary Gregory.
Add CharUtils isHex(int), isAsciiNumeric(int), isOctal(int) (#1685). Thanks to Gary Gregory.
Add and use Instants.toInstant(Instant[, Instant]) (#1690). Thanks to Gary Gregory.
Add ClassUtils.getClassStrict(ClassLoader, String, boolean) (f020). Thanks to Gary Gregory.
Add ClassUtils.getClassStrict(String) (f020). Thanks to Gary Gregory.
Fix TypeUtils.isAssignable() for wildcards with multiple upper bounds (#1782). Thanks to Gary Gregory, gaurav kumar pandey.
Add JavaVersion.JAVA_28. Thanks to Gary Gregory.
Add SystemUtils.IS_JAVA_28. Thanks to Gary Gregory.
Fixed Bugs:
Stop ExtendedMessageFormat seekNonWs reading past the pattern end. Thanks to Javid Khan, Gary Gregory.
Fix spelling and grammar in StringUtils #1486. Thanks to ThrawnCA.
Add ConversionTest assertions to increase coverage #1489. Thanks to Michael Hausegger, Gary Gregory.
Use Class<?> instead of Class<? extends Object> in MethodUtils #1491. Thanks to Boda65665, Gary Gregory.
ClassUtils now throws IllegalArgumentException if a class name represents an array with more dimensions than the JVM supports, 255:
getClass(ClassLoader, String, boolean),
ClassUtils.getClass(ClassLoader, String),
ClassUtils.getClass(String, boolean),
ClassUtils.getClass(String),
#1494. Thanks to Gary Gregory, Arnout Engelen, Piotr P. Karwasz, Vladimir Sitnikov, Gilles Sadowski.
ClassUtils now throws IllegalArgumentException if a class name length is greater than 65,535:
getClass(ClassLoader, String, boolean),
ClassUtils.getClass(ClassLoader, String),
ClassUtils.getClass(String, boolean),
ClassUtils.getClass(String),
#1495. Thanks to Gary Gregory, Arnout Engelen, Piotr P. Karwasz, Vladimir Sitnikov, Gilles Sadowski.
Fix console compiler warning: TypeUtils.java:[361,33] non-varargs call of varargs method with inexact argument type for last parameter. Thanks to Gary Gregory.
Fix console compiler warning: ReflectionDiffBuilderTest.java:[172,52] non-varargs call of varargs method with inexact argument type for last parameter. Thanks to Gary Gregory.
Fix Apache RAT plugin console warnings. Thanks to Gary Gregory.
Fix NullPointerException in ReflectionDiffBuilder.getExcludeFieldNames() when instance created with ReflectionDiffBuilder.ReflectionDiffBuilder(T, T, ToStringStyle). Thanks to Gary Gregory.
Fail-fast for a null DiffBuilder in ReflectionDiffBuilder.ReflectionDiffBuilder(DiffBuilder, String[]) instead of getting a NullPointerException in ReflectionDiffBuilder instance methods. Thanks to Gary Gregory.
Fix NumberUtilsTest#testMaxDouble() and testMaxFloat() #4959. Thanks to Michael Hausegger, Gary Gregory.
Speed up StringUtils.getDigits(String) #1515. Thanks to David Du, Gary Gregory.
Remove redundant length check in StringUtils.isBlank(CharSequence) #1516. Thanks to David Du, Gary Gregory.
Fix race condition in Fraction.hashCode(). Thanks to Gary Gregory.
Fix race condition in Range.hashCode(). Thanks to Gary Gregory.
Document safer deserialization option in Javadoc for SerializationUtils. Thanks to Gary Gregory, Akshat_Agg.
Speedup CharSequenceUtils.toCharArray(CharSequence) for StringBuilder input: 160-205% improvement (2-3x faster), see CharSequenceUtilsBenchmark. Thanks to Gary Gregory.
Speedup CharSequenceUtils.toCharArray(CharSequence) for StringBuffer input: 300-4,250% improvement (4-44x faster), see CharSequenceUtilsBenchmark. Thanks to Gary Gregory.
Speedup CharSequenceUtils.toCharArray(CharSequence) for String input: ~1-2% improvement (essentially identical). Thanks to Gary Gregory.
Streamline StringUtils.truncate(String, int, int). Thanks to Gary Gregory.
Fix Javadoc comma spacing #1538. Thanks to Gary Gregory, sekharchowdary774.
[javadoc] Fix incorrect exception type in CharUtils Javadoc examples #1563. Thanks to Dennis Ginter, Gary Gregory.
NumberUtils.isParsable("1.f") should return true #1560. Thanks to Gary Gregory, Jagdish Singh Bisht.
Simplify literal assignments in ArrayFillTest #1567. Thanks to Gary Gregory, David Du.
Make ArrayUtils methods implementation consistent with other overloads #1568. Thanks to Gary Gregory, David Du.
Fix handling of null marker in StringUtils.abbreviate(String, String, int, int) #1571. Thanks to ThrawnCA, Gary Gregory.
Better exception messages from FastDateParser.parse(String). Thanks to Gary Gregory.
Simplify NumberUtils.isParsable(String) #1570. Thanks to Gary Gregory, David Du.
RandomStringUtils.random() methods may not return when asked to generate only letters or only numbers while provided with a range that contains neither. Thanks to Gary Gregory.
Fix Javadoc parameter comments in StringUtils.truncate() methods #1536. Thanks to Gary Gregory, Akshat Upadhyay.
Improve test coverage for TypeUtils.isAssignable() #1574. Thanks to Gary Gregory, Dhaneesh.M.
Improve branch coverage for Processor (isAarch64, isRISCV); add ProcessorTest #1578. Thanks to Gary Gregory, Dhaneesh.M.
Fix ClassNotFoundException message in ClassUtils.getClass(String) #1577. Thanks to Gary Gregory, ?????.
Fix Javadoc in DoubleRange.of(Double, Double) to reflect actual exception type thrown #1581. Thanks to Ivan Ponomarev.
Fix StringIndexOutOfBoundsException message in StrBuilder.append(char[], int, int). Thanks to Ivan Ponomarev, Gary Gregory.
ThreadUtils.sleepQuietly(Duration) now restores the current thread's interrupt flag when catching InterruptedException. Thanks to Ivan Ponomarev, Gary Gregory.
Fix StringUtils.abbreviate(String, String, int) contract violations #1572. Thanks to ThrawnCA, Gary Gregory.
Add test coverage for negative-day adjustment in DurationFormatUtils #1596. Thanks to TK_ENDO, Arnout Engelen, Gary Gregory.
[Javadoc] Add usage examples to CharSet.contains(char) #1605. Thanks to Mohammad Bireybi, Gary Gregory.
CharSet now maintains iteration order. Thanks to Gary Gregory.
Deprecate Validate.Validate(). Thanks to Gary Gregory.
Fix StopWatch's stopInstant match stopTimeNanos when split is called #1610. Thanks to Lars Helge �verland, Gary Gregory.
Fix NullPointerException in StopWatch.getStopTime(). Thanks to Gary Gregory.
Add "ppc64le" to ArchUtils #1625. See https://bugs.gentoo.org/972590
Bug 972590 - dev-java/commons-lang-3.20.0:
java.lang.NullPointerException: Cannot invoke
"org.apache.commons.lang3.arch.Processor.toString()" because "<local1>" Thanks to Volkmar W. Pogatzki, Gary Gregory.
NumberUtils.isCreatable fails for hexadecimal numbers with long type qualifier. Thanks to ????, Gary Gregory.
NumberUtils.createNumber() performance: Short-circuit check based on pre-derived candidate Double #1628. Thanks to ax1nch, Gary Gregory.
Fix typo in SystemProperties.JDK_XML_ENTITY_REPLACEMENT_LIMIT (#1631). Thanks to Omkhar Arasaratnam, Gary Gregory.
Recompute Range cached hash codes on deserialization while retaining endpoint and comparator validation (#1633). Thanks to Omkhar Arasaratnam, Gary Gregory.
Harden Fraction.readObject() to reject bad cached hash code (#1634). Thanks to Omkhar Arasaratnam, Gary Gregory.
NumberUtils.createNumber(String): Float shortcut can bypass exact decimal parsing (#1635). Thanks to Omkhar Arasaratnam, Gary Gregory.
StringUtils.joins() for primitive types can throw OOME before index check (#1636). Thanks to Omkhar Arasaratnam, Gary Gregory.
Annotation lookup in MethodUtils.getAnnotation(Method, Class, boolean, boolean) matches unrelated overloads via assignable-parameter resolution (#1637). Thanks to Omkhar Arasaratnam, Gary Gregory.
RandomStringUtils.random(...): A custom chars array throws IllegalArgumentException because validation loops treat the loop index as a char code point instead of an index into the chars array (#1638). Thanks to Omkhar Arasaratnam, Gary Gregory.
RandomStringUtils.random(...): Can hang when the specified [start, end) range contains ONLY rejected code points (UNASSIGNED, PRIVATE_USE, SURROGATE). The loop increments count and retries indefinitely (#1638). Thanks to Omkhar Arasaratnam, Gary Gregory.
TimedSemaphore.shutdown() must wake threads blocked in acquire() (#1639). Thanks to Omkhar Arasaratnam, Gary Gregory.
NaN bypass in primitive double range validators (#1640). Thanks to Omkhar Arasaratnam, Gary Gregory.
ToStringStyle.appendDetail(StringBuffer,String,Collection) bypass cycle registry. #1648. Thanks to Omkhar Arasaratnam, Gary Gregory.
ToStringStyle.appendDetail(StringBuffer,String,Map) bypass cycle registry. #1648. Thanks to Gary Gregory.
WordUtils.wrap() zero-width wrapOn regex match causes infinite loop (#1649).WordUtils.wrap() zero-width wrapOn regex match causes infinite loop (#1649). Thanks to Omkhar Arasaratnam, Gary Gregory.
HashCodeBuilder.append(Object) StackOverflowError on mutually-referential objects (#1650). Thanks to Omkhar Arasaratnam, Gary Gregory.
AtomicSafeInitializer.get() busy-spin without yield burns CPU during slow initialization (#1651). Thanks to Omkhar Arasaratnam, Gary Gregory.
StrBuilder.readFrom(Readable) exposes stale internal buffer to Readable parameter (#1652). Thanks to Omkhar Arasaratnam, Gary Gregory.
EqualsBuilder.reflectionEquals() array branch missing cycle guard causes stack overflow on self-referential Object arrays (#1653). Thanks to Omkhar Arasaratnam, Gary Gregory.
WordUtils.wrap() leaves separator characters in the output when the wrapOn regex match is longer than one character (#1655). Thanks to Piotr Karwasz.
StringUtils.indexOfAny(CharSequence, int, char...) should not throw for a bad index (#1656). Thanks to Omkhar Arasaratnam, Gary Gregory.
StrBuilder.deleteImpl(int, int, int) doesn't clear its unused bytes. (#1654). Thanks to Omkhar Arasaratnam, Gary Gregory.
LocaleUtils.parseLocale(String) operator precedence bug allows invalid language with numeric country (#1658). Thanks to Omkhar Arasaratnam, Gary Gregory.
DurationUtils.toMillisInt() throws ArithmeticException on long overflows before clamping (#1657). Thanks to Omkhar Arasaratnam, Gary Gregory.
FastDatePrinter WeekYear rule calls Calendar.getWeekYear() may throw UnsupportedOperationException (#1659). Thanks to Omkhar Arasaratnam, Gary Gregory.
DateUtils.parseDateWithLeniency() doesn't reset its time zone (#1660). Thanks to Omkhar Arasaratnam, Gary Gregory.
FormattableUtils.append re-parses literal output as format string (#1661). Thanks to Omkhar Arasaratnam, Gary Gregory.
ClassUtils.getShortClassName(String) can throw NoClassDefFoundError on malformed inner classes (#1665). Thanks to Omkhar Arasaratnam, Gary Gregory.
TimeZones.GMT is a mutable public static final field (#1666). Thanks to Omkhar Arasaratnam, Gary Gregory.
CompareToBuilder lacks cycle guard on Object[] recursion. (#1669). Thanks to Omkhar Arasaratnam, Gary Gregory.
ClassUtils.toCleanName(String) resolves malformed array suffixes (#1670). Thanks to Omkhar Arasaratnam, Gary Gregory.
StrBuilder.setLength(int) shrink-branch leaves residual chars in buffer tail (#1671). Thanks to Omkhar Arasaratnam, Gary Gregory.
StrBuilder.replaceImpl() shrink-branch leaves residual chars in buffer tail (#1672). Thanks to Omkhar Arasaratnam, Gary Gregory.
NumericEntityUnescaper.translate() throws IllegalArgumentException for values out of range (#1673). Thanks to Omkhar Arasaratnam, Gary Gregory.
FastTimeZone.getGmtTimeZone() Javadoc promises null on no-match; regex always matches (#1674). Thanks to Omkhar Arasaratnam, Gary Gregory.
Range.readObject() does not null-check comparator, minimum, or maximum (#1675). Thanks to Omkhar Arasaratnam, Gary Gregory.
Make the StopWatch more reliable for tracking nanos, adjust suspend test (#1677). Thanks to Gary Gregory.
Fix CharSequenceUtils.lastIndexOf for supplementary code points #1684. Thanks to alhudz, Gary Gregory.
Range.readObject() does not re-assert the comparator/ordering invariant (#1686). Thanks to Omkhar Arasaratnam, Gary Gregory.
Fraction.readObject() does not re-assert denominator != 0 (#1688). Thanks to Omkhar Arasaratnam, Gary Gregory.
FastDateParser.readObject(ObjectInputStream) now validates the same (#1692). Thanks to Omkhar Arasaratnam, Gary Gregory.
Fix StringUtils.indexOfAny() matching an unpaired trailing high surrogate (#1687). Thanks to alhudz, Gary Gregory.
Fix LookupTranslator code point consumption for supplementary keys (#1691). Thanks to alhudz, Gary Gregory.
Re-assert CharRange start <= end invariant in readObject (#1693). Thanks to alhudz, Gary Gregory.
FluentBitSet.readObject(ObjectInputStream) should validate constructor invariants (#1694). Thanks to Gary Gregory.
EventListenerSupport.readObject(ObjectInputStream) should validate constructor invariants (#1695). Thanks to Gary Gregory.
Correct JavaDoc in Strings.java concerning case-sensitivity (#1696). Thanks to mfg92.
Fix case-insensitive Strings.replace() dropping length-changing matches (#1697). Thanks to alhudz, Gary Gregory.
Fix int overflow in StringUtils.midString() and StrBuilder.midString() length handling (#1699). Thanks to alhudz.
Throw IllegalArgumentException for trailing whitespace in ExtendedMessageFormat argument index (#1701). Thanks to Gary Gregory, Javid Khan.
Reject doubled leading sign in NumberUtils.createBigInteger (#1702). Thanks to alhudz, Gary Gregory.
Fix RandomStringUtils.random() false rejection of letters and digits (#1703). Thanks to alhudz, Gary Gregory.
Fix substringAfter(Last) for supplementary code points (#1707). Thanks to alhudz, Gary Gregory.
Strip L suffix for oversized hex literals in createNumber (#1712). Thanks to alhudz, Gary Gregory.
Fix spurious overflow in Fraction.add/subtract for coprime denominators (#1709). Thanks to alhudz, Gary Gregory.
Drop trailing empty token from splitByWholeSeparator (#1710). Thanks to alhudz, Gary Gregory.
Fix indexOfDifference splitting a surrogate pair (#1713). Thanks to alhudz, Gary Gregory.
Fix int mask sign extension in BitField long methods (#1711). Thanks to alhudz, Gary Gregory.
Account for duplicate values in ObjectUtils.median() (#1715). Thanks to alhudz, Gary Gregory.
Fix silent int overflow in Fraction.getFraction(double) (#1717). Thanks to alhudz, Gary Gregory.
Find NaN in ArrayUtils.lastIndexOf for double and float arrays (#1718). Thanks to alhudz, Gary Gregory.
Reject sign characters in UnicodeUnescaper hex values (#1721). Thanks to alhudz, Gary Gregory.
Keep abbreviate and truncate off surrogate pair boundaries (#1719). Thanks to alhudz, Gary Gregory.
Keep initials from splitting a supplementary code point (#1722). Thanks to alhudz, Gary Gregory.
Fix int overflow in DurationFormatUtils.formatPeriod (#1720). Thanks to alhudz, Gary Gregory.
Fix CsvUnescaper bounds error on a single quote field (#1723). Thanks to alhudz, Gary Gregory.
Classify supplementary code points in StringUtils is* predicates (#1724). Thanks to alhudz, Gary Gregory.
Emit surrogate pair for supplementary code points in UnicodeEscaper (#1726). Thanks to alhudz, Gary Gregory.
Fix MethodUtils.getMatchingMethod false ambiguity on boxed arguments (#1727). Thanks to alhudz, Gary Gregory.
Fold supplementary code points in CharSequenceUtils.regionMatches (#1725). Thanks to alhudz, Gary Gregory.
Fix WordUtils.containsAllWords missing words across line breaks (#1732). Thanks to alhudz, Gary Gregory.
Handle supplementary code points in WordUtils case methods (#1728). Thanks to alhudz, Gary Gregory.
Fix StringUtils.getDigits dropping supplementary digits (#1729). Thanks to alhudz, Gary Gregory.
Keep StrBuilder.reverse from splitting surrogate pairs (#1730). Thanks to alhudz, Gary Gregory.
Fix NumberUtils min/max varargs dropping the sign of zero (#1733). Thanks to alhudz, Gary Gregory.
Handle supplementary code points in StringUtils.splitByCharacterType() (#1734). Thanks to alhudz, Gary Gregory.
Fix Strings.CI.indexOf() returning out-of-range index for empty search (#1737). Thanks to alhudz, Gary Gregory.
Keep DurationFormatUtils.lexx() from merging repeated fields split by a literal (#1738). Thanks to alhudz, Gary Gregory.
Reject hex letters in NumericEntityUnescaper decimal scan (#1739). Thanks to alhudz, Gary Gregory.
Keep FastDateParser numeric parse from throwing on int overflow (#1741). Thanks to alhudz, Gary Gregory.
Keep FastDateParser.parse error message intact for Japanese imperial locale (#1743). Thanks to alhudz, Gary Gregory.
Keep ExtendedMessageFormat from rejecting a quoted format style (#1744). Thanks to alhudz, Gary Gregory.
Match String case folding in StrBuilder.equalsIgnoreCase (#1745). Thanks to alhudz, Gary Gregory.
Fix FieldUtils.getField false ambiguity on inherited interface field (#1748). Thanks to alhudz, Gary Gregory.
Skip Chuvash locale parser tests on Java 27 (#1746). Thanks to Sarankumar Baskar, Gary Gregory.
Fix ArrayUtils.reverse range underflow on Integer.MIN_VALUE end (#1750). Thanks to alhudz, Gary Gregory.
Fix sign extension in BitField.getValue for top-bit fields (#1749). Thanks to alhudz, Gary Gregory.
Fix int overflow in FluentBitSet.setInclusive at Integer.MAX_VALUE (#1751). Thanks to alhudz, Gary Gregory.
Add messages when throwing NullPointerException. Thanks to Gary Gregory.
[Javadoc] Fix Failable class comment to clarify comparison of lambda versions (#1752). Thanks to Konrad Windszus.
Add missing test for ObjectUtils.isEmpty(Object) and wait(Object, Duration) (#1755, #1756). Thanks to Maksym Korshun, Gary Gregory.
Fix negative week year formatting in FastDatePrinter (#1762). Thanks to alhudz, Gary Gregory.
Keep abbreviateMiddle off surrogate pair boundaries (#1758). Thanks to kdelay, Gary Gregory.
Fix two Javadoc errors in StringUtils (#1763). Thanks to hunghhdev.
Reject non-ASCII hex characters in Conversion.hexDigitToInt (#1767). Thanks to alhuda, Gary Gregory.
Fix the overflow bound direction in Instants.toMillisSince(Instant) (#1766). Thanks to renechoi, Gary Gregory.
Fix spurious overflow in Fraction.multiplyBy for unreduced operands (#1769). Thanks to alhuda, Gary Gregory.
Fix low surrogate false match in StringUtils containsAny/containsNone/indexOfAny (#1771). Thanks to alhuda, Gary Gregory.
Keep StringUtils.chop from splitting a trailing surrogate pair (#1770). Thanks to alhuda, Gary Gregory.
Keep StringUtils stripStart and stripEnd off surrogate pair boundaries (#1773). Thanks to alhuda, Gary Gregory.
Fix the month/day example in DurationFormatUtils.formatPeriod Javadoc (#1772). Thanks to codeAnqiang-ma, Gary Gregory.
Fix typos in Javadoc and example comments (#1774). Thanks to gaurav kumar pandey, Gary Gregory.
Fix CharRange.contains(CharRange) for negated argument ranges (#1775). Thanks to alhuda, Gary Gregory.
Fix SpotBugs USO_UNSAFE_METHOD_SYNCHRONIZATION in CharSet. Thanks to Gary Gregory.
Keep StopWatch.formatSplitTime from clamping splits to int millis (#1777). Thanks to alhuda, Gary Gregory.
Keep StringUtils left, right, mid, and overlay off surrogate pair boundaries (#1776). Thanks to gaurav kumar pandey, Gary Gregory.
Align ReflectionDiffBuilder with AbstractReflection and add cycle detection to prevent StackOverflowError on cyclic object graphs. Thanks to Gaurav Pandey, Gary Gregory.
Fix DurationFormatUtils.formatPeriod() calculation when pattern omits 'M' (#1780). Thanks to gaurav kumar pandey, Gary Gregory.
FastDateParser parses 'Y' (week year) as plain calendar year; asymmetric with FastDatePrinter and with SimpleDateFormat; boundary dates shift by a full year, silently (f002). Thanks to Gary Gregory.
UnicodeUnescaper.unescapeJava/EcmaScript/Json: malformed \u sequences throw undeclared IllegalArgumentException, AND non-ASCII digit spellings of \u escapes are silently accepted; both arms of one missing ASCII-hex prescan (f004). Thanks to Gary Gregory.
StringUtils.replaceEachRepeatedly derives its recursion budget from the input itself; the documented StackOverflowError protection fails on large tables, and expanding rules amplify text 64x even at the default TTL (f005). Thanks to Gary Gregory.
EventUtils.EventBindingInvocationHandler.invoke() dispatches Object.hashCode/equals/toString into the bound business method (empty-eventTypes default), or returns null -> NPE from hash collections (non-empty) (f006). Thanks to Gary Gregory.
LocaleUtils static caches no longer grows on invalid input to LocaleUtils.countriesByLanguage(String) (f007). Thanks to Gary Gregory.
LocaleUtils static caches no longer grows on invalid input to LocaleUtils.countriesByLanguage(String) (f007). Thanks to Gary Gregory.
ExtendedMessageFormat.applyPattern() is quadratic: full pattern.toCharArray() per token (f008). Thanks to Gary Gregory.
WordUtils.wrap(wrapLongWords=false, the 2-arg default) copies the entire remaining string every iteration. (f009). Thanks to Gary Gregory.
FastDateParser.parse throws undeclared IllegalArgumentException, NullPointerException, and IllegalStateException on crafted date strings (f010). Thanks to Gary Gregory.
Memoizer: default caches the first failure forever, has no size bound or eviction, and runs the user computation inside the ConcurrentHashMap bin lock (blocking unrelated keys, deadlocking reentrant use) (f011). Thanks to Gary Gregory.
StringEscapeUtils.escapeEcmaScript() misses backtick/template-literal (`, ${) and inline-script parser-state sequences (<!--, <script) - claim 'Deals correctly with quotes' is falsified by ES6 (f012). Thanks to Gary Gregory.
StrSubstitutor (deprecated) recursive expansion has a cycle check but no fan-out, depth, or size bound (f013). Thanks to Gary Gregory.
DurationFormatUtils.formatPeriod walks the calendar one year per iteration, Long.MAX_VALUE endMillis forces ~292 million Calendar round trips on one thread (f014). Thanks to Gary Gregory.
JavaVersion.get() throws NumberFormatException where javadoc promises null (f015). Thanks to Gary Gregory.
Match Javadoc to code in SystemProperties.getProperty() and SystemUtils.getEnvironmentVariable() and update inline comments (f016). Thanks to Gary Gregory.
Fix LockingVisitors Javadoc to match code (f017). Thanks to Gary Gregory.
DoubleRange/Range accept NaN endpoints, silently producing a half-unbounded range, contains()/fit() fail open for every value above the minimum (f018). Thanks to Gary Gregory.
BitField long-mask fields silently mis-answer int/short/byte accessors: shifts masked mod 32, and sign extension makes above-bit-31 flags read as set on any negative holder (f019). Thanks to Gary Gregory.
ClassUtils.getClass() name normalization (whitespace stripping + dot-to-dollar rewriting) defeats host-side class-name string checks (f020). Thanks to Gary Gregory.
Fraction.getFraction(String) throws undeclared ArithmeticException on crafted numeric strings ('9999999999.5', '1/0', mixed-number overflow) (f021). Thanks to Gary Gregory.
StringEscapeUtils.escapeHtml4/3 apostrophe gap: single-quoted and unquoted HTML attribute contexts are trivially breakable, and the javadoc discloses the gap only as an HTML4 entity-legality footnote (f022). Thanks to Gary Gregory.
ArrayUtils.addAll/insert length arithmetic overflows (undeclared NegativeArraySizeException) while sibling concat is overflow-checked (f023). Thanks to Gary Gregory.
FormattableUtils.append pads right-justified output with insert(0) per char; O(width^2); '%500000s' costs ~1.25e11 char moves (f024). Thanks to Gary Gregory.
Attacker-controlled exception message forges frames in getRootCauseStackTrace output AND suppresses all real frames, beyond cosmetic log spoofing (f025). Thanks to Gary Gregory.
StrBuilder.indexOf materializes the whole builder as a String per call; deleteAll/replaceAll multiply it into ~750 GB churn on a 1 MB builder (f026). Thanks to Gary Gregory.
ThresholdCircuitBreaker accepts negative increments and overflows its accumulator, silently keeping the breaker closed (f027). Thanks to Gary Gregory.
ExceptionUtils.getThrowableList() cycle check is O(n^2) over deep cause chains; all chain-walking consumers inherit it (f031). Thanks to Gary Gregory.
Reflection builders' cycle registry unregisters per-visit: cycle-SAFE but DAG-exponential, a 40-level reference diamond drives ~2^40 traversals and unbounded output (f032). Thanks to Gary Gregory.
FastDateFormat static caches grow without bound per distinct pattern/zone/locale, untrusted patterns pin several KB each, forever (f033). Thanks to Gary Gregory.
Fix Fraction.add and subtract for operands not in lowest terms (#1784). Thanks to Jeff Lenamon, Gary Gregory.
Fix MethodUtils.invokeMethod on instances of non-public classes (#1783). Thanks to Jeff Lenamon, Gary Gregory.
Fraction.add and subtract return the reduced form when an operand is zero (#1787). Thanks to Jeff Lenamon, Gary Gregory.
Return null for out-of-range offset in FastTimeZone.getGmtTimeZone (#1788). Thanks to alhuda, Gary Gregory.
Fix TypeUtils.toString() recursion and bound handling on recursive generic types (#1789). Thanks to gaurav kumar pandey, Gary Gregory.
Defensively clone the TimeZone in FastDatePrinter and FastDateParser (#1795). Thanks to alhuda, Gary Gregory.
Defensively clone time zones used as FastDateFormat cache keys to prevent caller mutations from returning formatters with stale time zone rules. Thanks to Gary Gregory.
Fix ConstructorUtils.getMatchingAccessibleConstructor on non-public classes (#1793). Thanks to gaurav kumar pandey, Gary Gregory.
Fix NumberUtils.createNumber() and isCreatable() for positive Long literals with explicit '+' sign (#1796). Thanks to gaurav kumar pandey, Gary Gregory.
Fix StrBuilder.lastIndexOf(String) start index for an empty search (#1759). Thanks to alhudz, Gary Gregory.
Fix int overflow in Conversion count and position bounds guards (#1779). Thanks to alhudz, Gary Gregory.
Preserve serialization compatibility with 3.20.0 for Range, IntegerRange, LongRange, and DoubleRange by retaining Range serialVersionUID 1L.
Streams written by 3.21.0 RC1 with UID 2L require reading with RC1 and exporting endpoint and comparator values before rebuilding ranges with this release.
Changes:
Bump org.apache.commons:commons-parent from 92 to 105 #1498. Thanks to Gary Gregory, Dependabot.
[test] Bump org.apache.commons:commons-text from 1.14.0 to 1.15.0. Thanks to Gary Gregory.
Historical list of changes: https://commons.apache.org/proper/commons-lang/changes.html
For complete information on Apache Commons Lang, including instructions on how to submit bug reports, patches, or suggestions for improvement, see the Apache Commons Lang website:
https://commons.apache.org/proper/commons-lang/
Download page: https://commons.apache.org/proper/commons-lang/download_lang.cgi
Have fun! Apache Commons Team
One column per quarter.
Create release tag for Apache Commons Lang release 3.20.0.
Create release tag for Apache Commons Lang release 3.20.0.
The Apache Commons Lang team is pleased to announce the release of Apache Commons Lang 3.20.0.
Commons Lang is a set of utility functions and reusable components that should be useful in any Java environment.
Starting with Commons Lang 3.9, we target Java 8, using those features.
For advice on upgrading from 2.x to 3.x, see:
https://commons.apache.org/lang/article3_0.html
Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang.
The code is tested using the latest revision of the JDK for supported LTS releases: 8, 11, 17, 21 and 25 currently. See https://github.com/apache/commons-lang/blob/master/.github/workflows/maven.yml
Please ensure your build environment is up-to-date and kindly report any build issues.
This is a feature and maintenance release. Java 8 or later is required.
Changes in this version include:
New features:
Add SystemProperties.getPath(String, Supplier<Path>). Thanks to Gary Gregory.
Add JavaVersion.JAVA_25. Thanks to Gary Gregory.
Add JavaVersion.JAVA_26. Thanks to Gary Gregory.
Add SystemUtils.IS_JAVA_25. Thanks to Gary Gregory.
Add SystemUtils.IS_JAVA_26. Thanks to Gary Gregory.
Add MutablePair.ofNonNull(Map.Entry). Thanks to jack5505, Gary Gregory.
Add TimedSemaphore.builder(), Builder, and deprecate constructors. Thanks to Gary Gregory.
Fixed Bugs:
Optimize ObjectToStringComparator.compare() method #1449. Thanks to mayuming, Gary Gregory.
[javadoc] Improve StringUtils Javadoc #1450. Thanks to Marcono1234, Gary Gregory.
Fix internal inverted logic in private isEnum() method and correct its usage in getFirstEnum() #1454. Thanks to mayuming, Gary Gregory.
Use accessors in ToStringStyle so subclasses can effectively override them. Thanks to William Degrange, Gary Gregory, Rob Spoor.
`LocaleUtils.toLocale(String)` for a 2 letter country code now returns a value instead of throwing an `IllegalArgumentException`. Thanks to jack5505, Gary Gregory.
Fix typo in StringUtils.trunctate() IllegalArgumentException message and test assertion messages. Thanks to mayuming, Gary Gregory.
Fix test fixture in ReflectionDiffBuilderTest.testTransientFieldDifference() #1464. Thanks to mayuming, Gary Gregory.
Mention JDK 25 LTS as a tested version in the release notes #1485. Thanks to Sebastian Peters, Gary Gregory.
Changes:
Bump org.apache.commons:commons-parent from 88 to 92 #1472, #1484. Thanks to Gary Gregory, Dependabot.
Historical list of changes: https://commons.apache.org/proper/commons-lang/changes.html
For complete information on Apache Commons Lang, including instructions on how to submit bug reports, patches, or suggestions for improvement, see the Apache Commons Lang website:
https://commons.apache.org/proper/commons-lang/
Download page: https://commons.apache.org/proper/commons-lang/download_lang.cgi
Have fun! Apache Commons Team
Create release tag for Apache Commons Lang release 3.19.0.
Create release tag for Apache Commons Lang release 3.19.0.
The Apache Commons Lang team is pleased to announce the release of Apache Commons Lang 3.19.0.
Commons Lang is a set of utility functions and reusable components that should be useful in any Java environment.
Starting with Commons Lang 3.9, we target Java 8, using those features.
For advice on upgrading from 2.x to 3.x, see:
https://commons.apache.org/lang/article3_0.html
Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang.
The code is tested using the latest revision of the JDK for supported LTS releases: 8, 11, 17 and 21 currently. See https://github.com/apache/commons-lang/blob/master/.github/workflows/maven.yml
Please ensure your build environment is up-to-date and kindly report any build issues.
This is a feature and maintenance release. Java 8 or later is required.
Changes in this version include:
New features:
Add ArrayUtils.SOFT_MAX_ARRAY_LENGTH. Thanks to Gary Gregory.
Add SystemUtils.IS_OS_NETWARE. Thanks to Gary Gregory.
Add MethodUtils.getAccessibleMethod(Class, Method). Thanks to Gary Gregory.
Add documentation to site for CVE-2025-48924 ClassUtils.getClass(...) can throw a StackOverflowError on very long inputs. Thanks to Gary Gregory.
Add StringUtils.indexOfAny(CharSequence, int, char...). Thanks to Gary Gregory.
Add ConcurrentException.ConcurrentException(String). Thanks to Gary Gregory.
Add DateUtils.toLocalDateTime(Date[, TimeZone]) #1385. Thanks to Finger, Gary Gregory, Piotr P. Karwasz.
Add DateUtils.toOffsetDateTime(Date[, TimeZone]). Thanks to Gary Gregory.
Add DateUtils.toZonedDateTime(Date[, TimeZone]). Thanks to Gary Gregory.
Add ByteConsumer. Thanks to Gary Gregory.
Add ByteSupplier. Thanks to Gary Gregory.
Add FailableByteConsumer. Thanks to Gary Gregory.
Add FailableByteSupplier. Thanks to Gary Gregory.
Add DoubleRange.fit(double). Thanks to Gary Gregory.
Add IntegerRange.fit(int). Thanks to Gary Gregory.
Add LongRange.fit(long). Thanks to Gary Gregory.
Add DurationUtils.get(String, TemporalUnit, long). Thanks to Gary Gregory.
Add DurationUtils.getMillis(String, long). Thanks to Gary Gregory.
Add DurationUtils.getSeconds(String, long). Thanks to Gary Gregory.
Add SystemProperties.getBoolean(Class, String, boolean). Thanks to Gary Gregory.
Add SystemProperties.getInt(Class, String, int). Thanks to Gary Gregory.
Add SystemProperties.getLong(Class, String, long). Thanks to Gary Gregory.
Fixed Bugs:
MethodUtils.getMethodObject(Class<?>, String, Class<?>...) now returns null instead of throwing a NullPointerException, as it does for other exception types. Thanks to Gary Gregory.
Reduce spurious failures in ArrayUtilsTest methods that test ArrayUtils.shuffle() methods. Thanks to Gary Gregory.
MethodUtils cannot find or invoke a public method on a public class implemented in its package-private superclass. Thanks to Gary Gregory.
AtomicSafeInitializer.get() can spin internally if the FailableSupplier given to AbstractConcurrentInitializer.AbstractBuilder.setInitializer(FailableSupplier) throws a RuntimeException. Thanks to Stanislav Fort, Gary Gregory.
MethodUtils cannot find or invoke vararg methods of interface types. Thanks to Joe Ferner, Gary Gregory.
MethodUtils cannot find or invoke vararg methods when widening primitive types following the JLS 5.1.2. Widening Primitive Conversion. Thanks to Joe Ferner, Gary Gregory.
Don't check accessibility twice in MemberUtils.setAccessibleWorkaround(T). Thanks to Gary Gregory.
Fix CalendarUtils.toLocalDate() Javadoc return type description #1440. Thanks to mayuming.
Fix the method name in Javadoc examples for CharUtils.isHex() #1444. Thanks to mayuming.
Deprecate NumberUtils.compare(byte, byte) in favor of Byte.compare(byte, byte). Thanks to Gary Gregory.
Deprecate NumberUtils.compare(int, int) in favor of Integer.compare(int, int). Thanks to Gary Gregory.
Deprecate NumberUtils.compare(long, long) in favor of Long.compare(long, long). Thanks to Gary Gregory.
Deprecate NumberUtils.compare(short, short) in favor of Short.compare(short, short). Thanks to Gary Gregory.
Deprecate obsolete system property constant SystemProperties.AWT_TOOLKIT. Thanks to Gary Gregory.
Deprecate obsolete system property constant SystemProperties.JAVA_AWT_FONTS. Thanks to Gary Gregory.
Deprecate obsolete system property constant SystemProperties.JAVA_AWT_GRAPHICSENV. Thanks to Gary Gregory.
Deprecate obsolete system property constant SystemProperties.JAVA_AWT_HEADLESS. Thanks to Gary Gregory.
Deprecate obsolete system property constant SystemProperties.JAVA_AWT_PRINTERJOB. Thanks to Gary Gregory.
Deprecate obsolete system property constant SystemProperties.JAVA_COMPILER. Thanks to Gary Gregory.
Deprecate obsolete system property constant SystemProperties.JAVA_ENDORSED_DIRS. Thanks to Gary Gregory.
Deprecate obsolete system property constant SystemProperties.JAVA_EXT_DIRS. Thanks to Gary Gregory.
Deprecate method for obsolete system property constant SystemProperties.getAwtToolkit() Thanks to Gary Gregory.
Deprecate method for obsolete system property constant SystemProperties.getJavaAwtFonts() Thanks to Gary Gregory.
Deprecate method for obsolete system property constant SystemProperties.getJavaAwtGraphicsenv() Thanks to Gary Gregory.
Deprecate method for obsolete system property constant SystemProperties.getJavaAwtHeadless() Thanks to Gary Gregory.
Deprecate method for obsolete system property constant SystemProperties.getJavaAwtPrinterjob() Thanks to Gary Gregory.
Deprecate method for obsolete system property constant SystemProperties.getJavaCompiler() Thanks to Gary Gregory.
Deprecate method for obsolete system property constant SystemProperties.getJavaEndorsedDirs() Thanks to Gary Gregory.
Deprecate method for obsolete system property constant SystemProperties.getJavaExtDirs() Thanks to Gary Gregory.
Deprecate method for obsolete system property constant SystemUtils.isJavaAwtHeadless() Thanks to Gary Gregory.
Deprecate constants for obsolete system property SystemUtils.JAVA_AWT_FONTS. Thanks to Gary Gregory.
Deprecate constants for obsolete system property SystemUtils.JAVA_AWT_GRAPHICSENV. Thanks to Gary Gregory.
Deprecate constants for obsolete system property SystemUtils.JAVA_AWT_HEADLESS. Thanks to Gary Gregory.
Deprecate constants for obsolete system property SystemUtils.JAVA_AWT_PRINTERJOB. Thanks to Gary Gregory.
Deprecate constants for obsolete system property SystemUtils.JAVA_COMPILER. Thanks to Gary Gregory.
Deprecate constants for obsolete system property SystemUtils.JAVA_ENDORSED_DIRS. Thanks to Gary Gregory.
Deprecate constants for obsolete system property SystemUtils.JAVA_EXT_DIRS. Thanks to Gary Gregory.
[javadoc] General improvements. Thanks to Gary Gregory.
[javadoc] Fix thrown exception documentation for MethodUtils.getMethodObject(Class<?>, String, Class<?>...). Thanks to Gary Gregory.
[javadoc] Strings::equalsAny: CI doc string should show it's insensitive #1416. Thanks to Scott Parish.
[javadoc] General Javadoc improvements. Thanks to Gary Gregory.
[javadoc] Fix typo in Javadoc of Strings instances #1406. Thanks to Sebastian Steiner.
[javadoc] Fix Javadocs in ClassUtils #1410. Thanks to Hassan A Hashim.
[javadoc] Fix @deprecated link for StringUtils#startsWithAny #1424. Thanks to mfg92.
Replace old feather logotype with new oak logotype. Thanks to Gary Gregory.
Changes:
[test] Bump org.apache.commons:commons-text from 1.13.1 to 1.14.0. Thanks to Gary Gregory.
Bump org.apache.commons:commons-parent from 85 to 88. Thanks to Gary Gregory.
Historical list of changes: https://commons.apache.org/proper/commons-lang/changes.html
For complete information on Apache Commons Lang, including instructions on how to submit bug reports, patches, or suggestions for improvement, see the Apache Commons Lang website:
https://commons.apache.org/proper/commons-lang/
Download page: https://commons.apache.org/proper/commons-lang/download_lang.cgi
Have fun! Apache Commons Team
Create release tag for Apache Commons Lang release 3.18.0.
Create release tag for Apache Commons Lang release 3.18.0.
The Apache Commons Lang team is pleased to announce the release of Apache Commons Lang 3.18.0.
Commons Lang is a set of utility functions and reusable components that should be useful in any Java environment.
Starting with Commons Lang 3.9, we target Java 8, using those features.
For advice on upgrading from 2.x to 3.x, see:
https://commons.apache.org/lang/article3_0.html
Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang.
The code is tested using the latest revision of the JDK for supported LTS releases: 8, 11, 17 and 21 currently. See https://github.com/apache/commons-lang/blob/master/.github/workflows/maven.yml
Please ensure your build environment is up-to-date and kindly report any build issues.
This is a feature and maintenance release. Java 8 or later is required.
Changes in this version include:
New features:
Add Strings and refactor StringUtils. Thanks to Gary Gregory.
Add JavaVersion.JAVA_23. Thanks to Gary Gregory.
Add JavaVersion.JAVA_24. Thanks to Gary Gregory.
Add SystemUtils.IS_JAVA_23. Thanks to Gary Gregory.
Add SystemUtils.IS_JAVA_24. Thanks to Gary Gregory.
Add IntegerRange.toIntStream(). Thanks to Gary Gregory.
Add LongRange.toLongStream(). Thanks to Gary Gregory.
Add IntStrams.of(int...). Thanks to Gary Gregory.
Add ArrayUtils.containsAny(int[], int...). Thanks to Gary Gregory.
Add CalendarUtils.toLocalDate() #725. Thanks to asgh, Gary Gregory.
Add SystemUtils.IS_OS_MAC_OSX_SEQUOIA. Thanks to Gary Gregory.
Add BasicThreadFactory.builder() and deprecate BasicThreadFactory.Builder(). Thanks to Gary Gregory.
Add BasicThreadFactory.daemon(). Thanks to Gary Gregory.
Add ArrayUtils.startsWith. Thanks to Gary Gregory.
Add Predicates. Thanks to Gary Gregory.
Add RegExUtils methods typed to CharSequence input and deprecate old versions typed to String. Thanks to Gary Gregory.
Add IterableStringTokenizer. Thanks to Gary Gregory.
Add FailableIntToFloatFunction. Thanks to Gary Gregory.
Add Validate.isTrue(boolean, Supplier<String>). Thanks to Gary Gregory.
Add EnumUtils.getFirstEnum(Class<E>, int, ToIntFunction<E>, E). Thanks to Gary Gregory.
Add FailableToBooleanFunction. Thanks to Gary Gregory.
Add the @FunctionalInterface annotation to org.apache.commons.lang3.concurrent.Computable. Thanks to Gary Gregory.
Add SystemUtils.getJavaIoTmpDirPath(). Thanks to Gary Gregory.
Add SystemUtils.getJavaHomePath(). Thanks to Gary Gregory.
Add SystemUtils.getUserDirPath(). Thanks to Gary Gregory.
Add SystemUtils.getUserHomePath(). Thanks to Gary Gregory.
Add ArrayFill.fill(T[], FailableIntFunction)). Thanks to Gary Gregory.
Add SystemProperties.JAVA_SECURITY_DEBUG. Thanks to Gary Gregory.
Add SystemProperties.JAVA_SECURITY_KERBEROS_CONF. Thanks to Gary Gregory.
Add SystemProperties.JAVA_SECURITY_KERBEROS_KDC. Thanks to Gary Gregory.
Add SystemProperties.JAVA_SECURITY_KERBEROS_REAL. Thanks to Gary Gregory.
Add ArrayFill.fill(boolean[], boolean) #1386. Thanks to kommalapatiraviteja.
Add ObjectUtils.getIfNull(Object, Object) and deprecate defaultIfNull(Object, Object). Thanks to Pankraz76, Gary Gregory.
org.apache.commons.lang3.mutable.Mutable now extends Supplier. Thanks to Gary Gregory.
Add org.apache.commons.lang3.CharUtils.isHex(char). Thanks to Gary Gregory.
Add org.apache.commons.lang3.CharUtils.isOctal(char). Thanks to Gary Gregory.
Add org.apache.commons.lang3.concurrent.locks.LockingVisitors.reentrantLockVisitor(Object). Thanks to Gary Gregory.
Add org.apache.commons.lang3.concurrent.locks.LockingVisitors.create(Object, ReentrantLock). Thanks to Gary Gregory.
Add org.apache.commons.lang3.concurrent.locks.LockingVisitors.ReentrantLockVisitor. Thanks to Gary Gregory.
Add builders for LockingVisitors implementations. Thanks to Gary Gregory.
Add EnumSet.stream(Class). Thanks to Gary Gregory.
Add org.apache.commons.lang3.SystemProperties.isPropertySet(String). Thanks to Gary Gregory.
Fixed Bugs:
Fix flaky FileUtilsWaitForTest.testWaitForNegativeDuration(). Thanks to Gary Gregory.
Pick up exec-maven-plugin version from parent POM. Thanks to Gary Gregory.
Speed up and sanitize StopWatchTest. Thanks to Gary Gregory.
Fix handling of non-ASCII letters and numbers in RandomStringUtils #1273. Thanks to Fabrice Benhamouda.
Rewrite ClassUtils.getClass(...) without recursion to avoid StackOverflowError on very long inputs.
OSS-Fuzz Issue 42522972: apache-commons-text:StringSubstitutorInterpolatorFuzzer: Security exception in org.apache.commons.lang3.ClassUtils.getClass. Thanks to OSS-Fuzz, Gary Gregory.
Remove trailing whitespace in StopWatch exception messages. Thanks to Gary Gregory.
Add details to the ArrayFill Javadoc. Thanks to Gary Gregory.
Add details to the ArraySorter Javadoc. Thanks to Gary Gregory.
Fix broken URL to project location in Maven Central #1296. Thanks to Capt. Cutlass.
Use simplified JUnit assertion methods #1298. Thanks to Capt. Cutlass.
Fix NullPointerException in FastDateParser.TimeZoneStrategy.setCalendar(FastDateParser, Calendar, String) on Java 23. Thanks to Gary Gregory.
Make Failable.run(FailableRunnable) null-safe. Thanks to Gary Gregory.
Make Failable.accept(*) null-safe. Thanks to Gary Gregory.
Improve container detection by mimicking systemd #1323. Thanks to maxxedev, Piotr P. Karwasz, Gary Gregory.
Make LangCollectors.collect(...) null-safe. Thanks to Gary Gregory.
Make LangCollectors.collect(...) null-safe. Thanks to Gary Gregory.
Fix names of UTF-16 surrogate character test fixture constants, see also #1326. Thanks to IBue, Gary Gregory.
Moditect plugin generates split package warnings. Thanks to Gary Gregory.
LocaleUtils.availableLocaleSet() uses predictable iteration order. Thanks to Gary Gregory.
Undeprecate ObjectUtils.toString(Object). Thanks to Gary Gregory.
Fix Spotbugs [ERROR] Medium: The field org.apache.commons.lang3.builder.DiffBuilder$SDiff.leftSupplier is transient but isn't set by deserialization [org.apache.commons.lang3.builder.DiffBuilder$SDiff] In DiffBuilder.java SE_TRANSIENT_FIELD_NOT_RESTORED. Thanks to Gary Gregory.
Fix Spotbugs [ERROR] Medium: The field org.apache.commons.lang3.builder.DiffBuilder$SDiff.rightSupplier is transient but isn't set by deserialization [org.apache.commons.lang3.builder.DiffBuilder$SDiff] In DiffBuilder.java SE_TRANSIENT_FIELD_NOT_RESTORED. Thanks to Gary Gregory.
Don't call TypeUtils.toString(Type) on every array item in TypeUtils.parameterize[WithOwner](Type, Class, Map, Type>) unless required. Thanks to Gary Gregory.
Remove -nouses directive from maven-bundle-plugin. OSGi package imports now state 'uses' definitions for package imports, this doesn't affect JPMS (from org.apache.commons:commons-parent:80). Thanks to Gary Gregory.
Instead of throwing a NullPointerException, ArrayUtils.toStringArray(Object[]) should return "null" for null elements like ArrayUtils.toStringArray(Object[], String) returns its valueForNullElements. Thanks to Gary Gregory.
Several hash collisions in Fraction class. Thanks to Gary Gregory.
Reimplement StringUtils.toCodePoints(CharSequence) to use java.lang.CharSequence.codePoints(). Thanks to Gary Gregory.
Reimplement StringUtils.capitalize(String) to use java.lang.CharSequence.codePoints(). Thanks to Gary Gregory.
Reimplement StringUtils.uncapitalize(String) to use java.lang.CharSequence.codePoints(). Thanks to Gary Gregory.
org.apache.commons.lang3.ClassUtils.getCanonicalName(String) now throws an IllegalArgumentException for array dimensions greater than 255. Thanks to Gary Gregory.
Fix Javadoc typo and improve clarity in defaultIfBlank method #1376. Thanks to Sridhar Balijepalli, Piotr P. Karwasz.
Fix Javadoc code examples in DiffBuilder and ReflectionDiffBuilder #1400. Thanks to Ken Dombeck.
Fix generics in org.apache.commons.lang3.stream.Streams.toArray(Class) signature. Thanks to Gary Gregory.
Fix edge-case NullPointerException in org.apache.commons.lang3.SystemUtils.IS_OS_ANDROID. Thanks to Gary Gregory.
Fix edge-case NullPointerException in org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast(JavaVersion). Thanks to Gary Gregory.
Fix edge-case NullPointerException in org.apache.commons.lang3.SystemUtils.isJavaVersionAtMost(JavaVersion). Thanks to Gary Gregory.
Return the default enum if a SecurityException is caught in getEnumSystemProperty(). Thanks to Gary Gregory.
Fix edge-case NullPointerException in org.apache.commons.lang3.EnumUtils.getEnum(Class, String, E). Thanks to Gary Gregory.
org.apache.commons.lang3.EnumUtils.getFirstEnumIgnoreCase(Class, String, Function, E) now returns the given default enum on null enumClass input. Thanks to Gary Gregory.
org.apache.commons.lang3.EnumUtils.getEnumIgnoreCase(Class, String, E) now returns the given default enum on null enumClass input. Thanks to Gary Gregory.
org.apache.commons.lang3.EnumUtils.getEnumIgnoreCase(Class, String) now returns the given default enum on null enumClass input. Thanks to Gary Gregory.
Fix NullPointerException in org.apache.commons.lang3.compare.ComparableUtils.ComparableCheckBuilder.equalTo(A). Thanks to Gary Gregory.
Fix NullPointerException in org.apache.commons.lang3.compare.ComparableUtils.ComparableCheckBuilder.greaterThan(A). Thanks to Gary Gregory.
Fix NullPointerException in org.apache.commons.lang3.compare.ComparableUtils.ComparableCheckBuilder.greaterThanOrEqualTo(A). Thanks to Gary Gregory.
Fix NullPointerException in org.apache.commons.lang3.compare.ComparableUtils.ComparableCheckBuilder.lessThan(A). Thanks to Gary Gregory.
Fix NullPointerException in org.apache.commons.lang3.compare.ComparableUtils.ComparableCheckBuilder.lessThanOrEqualTo(A). Thanks to Gary Gregory.
Changes:
Bump org.apache.commons:commons-parent from 73 to 85 #1267, #1277, #1283, #1288, #1302, #1377. Thanks to Gary Gregory, Dependabot.
[site] Bump org.codehaus.mojo:taglist-maven-plugin from 3.1.0 to 3.2.1 #1300. Thanks to Gary Gregory, Dependabot.
[test] Bump org.easymock:easymock from 5.4.0 to 5.6.0 #1317, #1387. Thanks to Gary Gregory, Dependabot.
[test] Bump org.apache.commons:commons-text from 1.12.0 to 1.13.1 #1336. Thanks to Gary Gregory, Dependabot.
Historical list of changes: https://commons.apache.org/proper/commons-lang/changes.html
For complete information on Apache Commons Lang, including instructions on how to submit bug reports, patches, or suggestions for improvement, see the Apache Commons Lang website:
https://commons.apache.org/proper/commons-lang/
Download page: https://commons.apache.org/proper/commons-lang/download_lang.cgi
Have fun! Apache Commons Team
Create release tag for Apache Commons Lang release 3.17.0.
Create release tag for Apache Commons Lang release 3.17.0.
The Apache Commons team is pleased to announce Apache Commons Lang Version 3.17.0.
Commons Lang is a set of utility functions and reusable components that should be useful in any Java environment.
Starting with Commons Lang 3.9, we target Java 8, using those features.
For advice on upgrading from 2.x to 3.x, see:
https://commons.apache.org/lang/article3_0.html
Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang.
The code is tested using the latest revision of the JDK for supported LTS releases: 8, 11, 17 and 21 currently. See https://github.com/apache/commons-lang/blob/master/.github/workflows/maven.yml
Please ensure your build environment is up-to-date and kindly report any build issues.
This is a feature and maintenance release. Java 8 or later is required.
Changes in this version include:
New features:
RandomUtils.secure() now uses SecureRandom() instead of SecureRandom.getInstanceStrong(). Thanks to Gary Gregory.
RandomStringUtils.secure() now uses SecureRandom() instead of SecureRandom.getInstanceStrong(). Thanks to Gary Gregory.
Remove unused exception from deprecated StringUtils.toString(byte[], String). Thanks to Gary Gregory.
Make RandomUtils.insecure() public. Thanks to Gary Gregory.
Add RandomUtils.secureStrong(). Thanks to Gary Gregory.
Add RandomStringUtils.secureStrong(). Thanks to Gary Gregory.
Add CalendarUtils.toLocalDateTime(Calendar). Thanks to Gary Gregory.
Add CalendarUtils.toLocalDateTime(). Thanks to Gary Gregory.
Add CalendarUtils.toZonedDateTime(Calendar). Thanks to Gary Gregory.
Add CalendarUtils.toZonedDateTime(). Thanks to Gary Gregory.
Add CalendarUtils.toOffsetDateTime(Calendar). Thanks to Gary Gregory.
Add CalendarUtils.toOffsetDateTime(). Thanks to Gary Gregory.
Fixed Bugs:
Deprecate static RandomUtils.next*() methods in favor or .secure() and .insecure() versions. Thanks to Gary Gregory.
Deprecate static RandomStringUtils.random*() methods in favor or .secure() and .insecure() versions. Thanks to Gary Gregory.
Changes:
Bump org.hamcrest:hamcrest from 2.2 to 3.0 #1255. Thanks to Gary Gregory, Dependabot.
Bump org.easymock:easymock from 5.3.0 to 5.4.0 #1256. Thanks to Gary Gregory, Dependabot.
Bump org.codehaus.mojo:exec-maven-plugin from 3.3.0 to 3.4.1 #1262, #1264. Thanks to Gary Gregory, Dependabot.
Bump org.apache.commons:commons-parent from 72 to 73 #1265. Thanks to Gary Gregory, Dependabot.
Historical list of changes: https://commons.apache.org/proper/commons-lang/changes-report.html
For complete information on Apache Commons Lang, including instructions on how to submit bug reports, patches, or suggestions for improvement, see the Apache Commons Lang website:
https://commons.apache.org/proper/commons-lang/
Download page: https://commons.apache.org/proper/commons-lang/download_lang.cgi
Have fun! Apache Commons Team
Add StopWatch.getSplitDuration() and deprecate getSplitTime(). Thanks to Gary Gregory.
The Apache Commons team is pleased to announce Apache Commons Lang Version 3.16.0.
Commons Lang is a set of utility functions and reusable components that should be useful in any Java environment.
Starting with Commons Lang 3.9, we target Java 8, using those features.
For advice on upgrading from 2.x to 3.x, see:
https://commons.apache.org/lang/article3_0.html
Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang.
The code is tested using the latest revision of the JDK for supported LTS releases: 8, 11, 17 and 21 currently. See https://github.com/apache/commons-lang/blob/master/.github/workflows/maven.yml
Please ensure your build environment is up-to-date and kindly report any build issues.
This is a feature and maintenance release. Java 8 or later is required.
Changes in this version include:
New features:
Add StopWatch.getSplitDuration() and deprecate getSplitTime(). Thanks to Gary Gregory.
Add StopWatch.getStartInstant() and deprecate getStartTime(). Thanks to Gary Gregory.
Add StopWatch.getStopInstant() and deprecate getStopTime(). Thanks to Gary Gregory.
Add StopWatch.getDuration() and deprecate getTime(). Thanks to Gary Gregory.
Add Javadoc links from StopWatch to DurationUtils #1249. Thanks to Oliver B. Fischer, Gary Gregory.
Add LangCollectors.collect(Collector, T...). Thanks to Gary Gregory.
Add RandomStringUtils.secure(). Thanks to Gary Gregory.
Add RandomStringUtils.insecure(). Thanks to Gary Gregory.
Fixed Bugs:
Reimplement StopWatch internals to use java.time. Thanks to Gary Gregory.
Use fewer intermediary strings in DefaultExceptionContext.getFormattedExceptionMessage(String). Thanks to Gary Gregory.
Fix Javadoc in StringUtils.splitPreserveAllTokens() #1251. Thanks to V�clav Haisman.
Deprecate ArraySort constructor for removal. Thanks to Gary Gregory.
Deprecate CharEncoding constructor for removal. Thanks to Gary Gregory.
Deprecate Conversion constructor for removal. Thanks to Gary Gregory.
Deprecate Conversion constructor for removal. Thanks to Gary Gregory.
Deprecate EntityArrays constructor for removal. Thanks to Gary Gregory.
Deprecate ObjectToStringComparator constructor for removal. Thanks to Gary Gregory.
Deprecate RuntimeEnvironment constructor for removal. Thanks to Gary Gregory.
Changes:
Bump org.apache.commons:commons-parent from 71 to 72 #1253. Thanks to Gary Gregory, Dependabot.
Historical list of changes: https://commons.apache.org/proper/commons-lang/changes-report.html
For complete information on Apache Commons Lang, including instructions on how to submit bug reports, patches, or suggestions for improvement, see the Apache Commons Lang website:
https://commons.apache.org/proper/commons-lang/
Download page: https://commons.apache.org/proper/commons-lang/download_lang.cgi
Have fun! Apache Commons Team
LANG-1726: Undeprecate ExceptionUtils.rethrow(Throwable). Thanks to V�clav Haisman, Gary Gregory.
The Apache Commons team is pleased to announce Apache Commons Lang Version 3.15.0.
Commons Lang is a set of utility functions and reusable components that should be of use in any Java environment.
Starting with Commons Lang 3.9, we target Java 8, making use of those features.
For advice on upgrading from 2.x to 3.x, see:
https://commons.apache.org/lang/article3_0.html
Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang.
The code is tested using the latest revision of the JDK for supported LTS releases: 8, 11, 17 and 21 currently. See https://github.com/apache/commons-lang/blob/master/.github/workflows/maven.yml
Please ensure your build environment is up-to-date and kindly report any build issues.
New features and bug fixes (Java 8 or above).
Changes in this version include:
New features:
Add DiffBuilder.Builder. Thanks to Gary Gregory.
Add DiffBuilder.builder(). Thanks to Gary Gregory.
Add ReflectionDiffBuilder.Builder. Thanks to Gary Gregory.
Add ReflectionDiffBuilder.builder(). Thanks to Gary Gregory.
Add test in TypeUtilsTest #1151. Thanks to Elliotte Rusty Harold.
Add Streams.failableStream(T), non-varargs variant. Thanks to Gary Gregory.
Add Streams.nonNull(T), non-varargs variant. Thanks to Gary Gregory.
Add ArrayUtils.nullTo(T[], T[]). Thanks to Gary Gregory.
Add T ArrayUtils.arraycopy(T, int, T, int, int) fluent style. Thanks to Gary Gregory.
Add T ArrayUtils.arraycopy(T, int, int, int, Function) fluent style. Thanks to Gary Gregory.
Add SystemUtils.IS_JAVA_22. Thanks to Gary Gregory.
Add JavaVersion.JAVA_22. Thanks to Gary Gregory.
Add SystemProperties.getUserName(Supplier<String>). Thanks to Gary Gregory.
Add SystemProperties.getLineSeparator(Supplier<String>). Thanks to Gary Gregory.
Add SystemProperties.getJavaSpecificationVersion(Supplier<String>). Thanks to Gary Gregory.
Add SystemProperties constants and methods for system properties as of Java 22. Thanks to Gary Gregory.
Add MethodUtils.getMethodObject(Class, String, Class...). Thanks to Gary Gregory.
Add SystemUtils.IS_OS_ANDROID. Thanks to Gary Gregory.
Add SystemUtils.IS_OS_MAC_OSX_SONOMA. Thanks to Gary Gregory.
Add RuntimeEnvironment.inContainer() #1241. Thanks to Gary Gregory.
Add AppendableJoiner and refactor string joining #1244. Thanks to Gary Gregory.
Fixed Bugs:
Improve Javadoc in ExceptionUtils #1136. Thanks to Mikl�s Karak�, Gary Gregory.
Fixed two non-deterministic tests in EnumUtilsTest.java #1131. Thanks to Saiharshith Karuneegar Ramesh, Gary Gregory.
Minor grammar fixes #1143. Thanks to Parano�d User.
Let parent POM figure out commons.spdx.version. Thanks to Gary Gregory.
Address minor redundancies after code inspection #1148. Thanks to ParanoidUser, Elliotte Rusty Harold, Gary Gregory.
Allow EventListenerSupport to handle (and ignore) exception from listeners allowing invocation of all listeners #1167. Thanks to Gary Gregory.
Deprecate AnnotationUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate ArchUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate ArrayUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate BooleanUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate CharSequenceUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate CharSetUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate CharUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate ClassLoaderUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate ClassPathUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate ClassUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate ConstructorUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate DateFormatUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate DateUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate Diff.getType(). Thanks to Gary Gregory.
Deprecate DiffBuilder.DiffBuilder(T, T, ToStringStyle). Thanks to Gary Gregory.
Deprecate DiffBuilder.DiffBuilder(T, T, ToStringStyle, boolean). Thanks to Gary Gregory.
Deprecate DurationFormatUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate DurationUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate EnumUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate EventUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate FieldUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate IEEE754rUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate InheritanceUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate IntStreams 0-argument constructor. Thanks to Gary Gregory.
Deprecate LocaleUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate LockingVisitors 0-argument constructor. Thanks to Gary Gregory.
Deprecate MemberUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate MethodUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate NumberUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate ObjectUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate RandomStringUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate RandomUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate ReflectionDiffBuilder.ReflectionDiffBuilder(T, T, ToStringStyle). Thanks to Gary Gregory.
Deprecate RegExUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate SerializationUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate Streams 0-argument constructor. Thanks to Gary Gregory.
Deprecate StringEscapeUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate StringUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate Suppliers 0-argument constructor. Thanks to Gary Gregory.
Deprecate SystemProperties 0-argument constructor. Thanks to Gary Gregory.
Deprecate ThreadUtils 0-argument constructor. Thanks to Gary Gregory.
Deprecate TypeUtils 0-argument constructor. Thanks to Gary Gregory.
Make ArrayFill null-safe. Thanks to Gary Gregory.
Make ArraySorter null-safe. Thanks to Gary Gregory.
Make ArrayUtils.removeAll() null-safe. Thanks to Gary Gregory.
Fix Java version in README.md #1170. Thanks to Philipp Trulson, Gary Gregory.
StringUtils.stripAccents() should handle ligatures, UTF32 math blocks, etc. #1201. Thanks to Stephan Peters, Gary Gregory, Bernd.
Deprecate SystemUtils.getUserName(String) in favor of SystemProperties.getUserName(Supplier). Thanks to Gary Gregory.
Make LockVisitor.acceptReadLocked(FailableConsumer) null-safe. Thanks to Gary Gregory.
Make LockVisitor.applyWriteLocked(FailableConsumer) null-safe. Thanks to Gary Gregory.
Make ObjectUtils.getFirstNonNull(Supplier...) null-safe. Thanks to Gary Gregory.
Make SystemProperties.getLineSeparator(Supplier). Thanks to Gary Gregory.
StringUtils.stripAccents(String) doesn't handle "\u0111" and "\u0110" (Vietnamese) #1216. Thanks to hunghhdev.
StringUtils.stripAccents(String) doesn't handle I with bar. Thanks to Gary Gregory.
StringUtils.stripAccents(String) doesn't handle U with bar. Thanks to Gary Gregory.
StringUtils.stripAccents(String) doesn't handle T with stroke. Thanks to Gary Gregory.
Same Javadoc changes as [TEXT-234] #1223. Thanks to Tobias Kiecker.
Remove duplicate static data in SerializationUtils.ClassLoaderAwareObjectInputStream. Thanks to Gary Gregory.
Reimplement RandomUtils and RandomStringUtils on top of SecureRandom#getInstanceStrong() #1235. Thanks to Gary Gregory, Henri Yandell, Fabrice Benhamouda.
Changes:
Bump commons-parent from 64 to 71 #1194, #1233. Thanks to Dependabot, Gary Gregory.
Bump org.codehaus.mojo:exec-maven-plugin from 3.1.1 to 3.3.0 #1175, #1224. Thanks to Dependabot.
Bump org.apache.commons:commons-text from 1.11.0 to 1.12.0 #1200. Thanks to Dependabot.
Bump org.easymock:easymock from 5.2.0 to 5.3.0 #1232. Thanks to Dependabot.
Bump org.codehaus.mojo:taglist-maven-plugin from 3.0.0 to 3.1.0 #1242. Thanks to Dependabot.
Removed:
Drop obsolete JDK 13 Maven profile #1142. Thanks to Parano�d User.
Historical list of changes: https://commons.apache.org/proper/commons-lang/changes-report.html
For complete information on Apache Commons Lang, including instructions on how to submit bug reports, patches, or suggestions for improvement, see the Apache Commons Lang website:
https://commons.apache.org/proper/commons-lang/
Download page: https://commons.apache.org/proper/commons-lang/download_lang.cgi
Have fun! -Apache Commons Team
Add ExceptionUtils.throwUnchecked(T) where T extends Throwable, and deprecate Object version. Thanks to Gary Gregory.
This document contains the release notes for the 3.14.0 version of Apache Commons Lang. Commons Lang is a set of utility functions and reusable components that should be of use in any Java environment.
Lang 3.9 and onwards now targets Java 8, making use of features that arrived with Java 8.
For the advice on upgrading from 2.x to 3.x, see the following page:
https://commons.apache.org/lang/article3_0.html
Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang.
New features and bug fixes (Java 8 or above).
Changes in this version include:
New features:
Add Functions#function(Function). Thanks to Rob Spoor, Gary Gregory.
Add FailableFunction#function(FailableFunction). Thanks to Rob Spoor, Gary Gregory.
Add CalendarUtils.getInstance(). Thanks to Gary Gregory.
Add syntax for optional tokens to DurationFormatUtils #1062. Thanks to Dan Watson.
Add ArrayFill. Thanks to Gary Gregory.
Add FastDateParser.TimeZoneStrategy.TzInfo.toString(). Thanks to Gary Gregory.
Add LocaleUtils.isLanguageUndetermined(Locale). Thanks to Gary Gregory.
Add ObjectUtils.toString(Supplier<Object>, Supplier<String>). Thanks to Gary Gregory.
Add LazyInitializer.isInitialized(). Thanks to Gary Gregory.
Add ConcurrentInitializer#isInitialized() #1120. Thanks to Benjamin Confino, Gary Gregory.
Add Streams.failableStream(T...). Thanks to Gary Gregory.
Add FailableSupplier.nul(). Thanks to Gary Gregory.
Add Suppliers.nul(). Thanks to Gary Gregory.
Add ExceptionUtils.throwUnchecked(T) where T extends Throwable, and deprecate Object version. Thanks to Gary Gregory.
Add ExceptionUtils.rethrowRuntimeException(T), and deprecate rethrow(T). Thanks to Gary Gregory.
Fixed Bugs:
Rename variable names from 'clss' to 'clazz' #1087. Thanks to remeio.
[Javadoc] ComparableUtils'c1' to 'comparable1', 'c2' to ' Thanks to remeio.
[Javadoc] Remove 2.1 specific comment #1091. Thanks to Elliotte Rusty Harold.
[Javadoc] Fix Incorrect Description in Processor isAarch64() #1093. Thanks to Sung Ho Yoon.
[Javadoc] Point to right getShortClassName flavor in Javadoc for relevant notes #1097. Thanks to ljacqu.
Improve performance of StringUtils.isMixedCase() #1096. Thanks to hduelme.
Return "null" instead of NPE in ClassLoaderUtils.toString(ClassLoader). Thanks to Gary Gregory.
Return "null" instead of NPE in ClassLoaderUtils.toString(URLClassLoader). Thanks to Gary Gregory.
Return ToStringStyle.nullText instead of NPE for ReflectionToStringBuilder.toString(). Thanks to Gary Gregory.
Fix ThresholdCircuitBreaker#checkState() #1100. Thanks to yichinzhu, Gary Gregory.
Use ConcurrentInitializer implementations without subclassing. #1123. Thanks to Benjamin Confino, Gary Gregory.
Update critical value for chi-square test #1125. Thanks to Alex Herbert.
Fix Javadoc syntax errors #1129. Thanks to Sung Ho Yoon.
Changes:
Bump commons-parent from 58 to 64. Thanks to Gary Gregory.
Bump org.easymock:easymock from 5.1.0 to 5.2.0 #1104. Thanks to Gary Gregory.
Bump commons-text from 1.10.0 to 1.11.0. Thanks to Gary Gregory.
Bump org.codehaus.mojo:exec-maven-plugin from 3.1.0 to 3.1.1 #1135. Thanks to Gary Gregory.
Historical list of changes: https://commons.apache.org/proper/commons-lang/changes-report.html
For complete information on Apache Commons Lang, including instructions on how to submit bug reports, patches, or suggestions for improvement, see the Apache Commons Lang website:
https://commons.apache.org/proper/commons-lang/
Download page: https://commons.apache.org/proper/commons-lang/download_lang.cgi
Have fun! -Apache Commons Team
Add Streams.failableStream(Collection) and deprecate misnamed stream(Collection). Thanks to Gary Gregory.
This document contains the release notes for the 3.13.0 version of Apache Commons Lang. Commons Lang is a set of utility functions and reusable components that should be of use in any Java environment.
Lang 3.9 and onwards now targets Java 8, making use of features that arrived with Java 8.
For the advice on upgrading from 2.x to 3.x, see the following page:
https://commons.apache.org/lang/article3_0.html
Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang.
New features and bug fixes (Java 8 or above).
Changes in this version include:
New features:
Add GitHub coverage.yml. Thanks to Gary Gregory.
Add EnumUtils.getEnumSystemProperty(...). Thanks to Gary Gregory.
Add TriConsumer. Thanks to Gary Gregory.
Add and use EnumUtils.getFirstEnumIgnoreCase(Class, String, Function, E). Thanks to Gary Gregory.
Add and use Suppliers. Thanks to Gary Gregory.
Add and use ArrayUtils.getComponentType(T[]). Thanks to Gary Gregory.
Add and use ClassUtils.getComponentType(Class>T[]>). Thanks to Gary Gregory.
Add and use ObjectUtils.getClass(T). Thanks to Gary Gregory.
Add and use ArrayUtils.newInstance(Class>T>, int). Thanks to Gary Gregory.
Add and use null-safe Streams.of(T...). Thanks to Gary Gregory.
Add ClassUtils.comparator(). Thanks to Gary Gregory.
Add and use ThreadUtils.sleepQuietly(Duration). Thanks to Gary Gregory.
Add and use ArrayUtils.setAll(T[], IntFunction). Thanks to Gary Gregory.
Add and use ArrayUtils.setAll(T[], Supplier). Thanks to Gary Gregory.
Add BooleanConsumer. Thanks to Gary Gregory.
Add IntToCharFunction. Thanks to Gary Gregory.
Add IntStreams. Thanks to Gary Gregory.
Add UncheckedFuture. Thanks to Gary Gregory.
Add UncheckedException. Thanks to Gary Gregory.
Add UncheckedExecutionException. Thanks to Gary Gregory.
Add UncheckedTimeoutException. Thanks to Gary Gregory.
Add UncheckedInterruptedException. Thanks to Gary Gregory.
Add TimeZones.GMT. Thanks to Gary Gregory.
Add ObjectUtils.identityHashCodeHex(Object). Thanks to Gary Gregory.
Add ObjectUtils.hashCodeHex(Object). Thanks to Gary Gregory.
Add StringUtils.removeStart(String, char). Thanks to Gary Gregory.
Add ComparableUtils.max(A, A) and ComparableUtils.min(A, A). Thanks to Gary Gregory.
Add UncheckedReflectiveOperationException. Thanks to Gary Gregory.
Add and use ClassUtils.isPublic(Class). Thanks to Gary Gregory.
Add UncheckedIllegalAccessException. Thanks to Gary Gregory.
Add MethodInvokers. Thanks to Gary Gregory.
Add Streams.nullSafeStream(Collection). Thanks to Gary Gregory.
Add Streams.toStream(Collection). Thanks to Gary Gregory.
Add Streams.failableStream(Collection) and deprecate misnamed stream(Collection). Thanks to Gary Gregory.
Add Streams.failableStream(Stream) and deprecate misnamed stream(Stream). Thanks to Gary Gregory.
Add EnumUtils.getEnumMap(Class, Function). #730 Thanks to Maxwell Cody, Gary Gregory.
Add FluentBitSet. Thanks to Gary Gregory.
Add Streams.instancesOf(Class, Collection). Thanks to Gary Gregory.
Add ImmutablePair.ofNonNull(L, R). Thanks to Gary Gregory.
Add ImmutableTriple.ofNonNull(L, M, R). Thanks to Gary Gregory.
Add MutablePair.ofNonNull(L, R). Thanks to Gary Gregory.
Add MutableTriple.ofNonNull(L, M, R). Thanks to Gary Gregory.
Add Pair.ofNonNull(L, R). Thanks to Gary Gregory.
Add Triple.ofNonNull(L, M, R). Thanks to Gary Gregory.
Add ArrayUtils.containsAny(Object[], Object...). Thanks to Gary Gregory.
Add Processor.Type.AARCH_64. Thanks to Gary Gregory.
Add Processor.isAarch64(). Thanks to Gary Gregory.
Update ArchUtils.getProcessor(String) for "aarch64". Thanks to Gary Gregory.
Add JavaVersion.JAVA_18. Thanks to Gary Gregory.
Add JavaVersion.JAVA_19. Thanks to Emmanuel Bourg.
Add JavaVersion.JAVA_20. Thanks to Emmanuel Bourg.
Add JavaVersion.JAVA_21. Thanks to Emmanuel Bourg.
Add TimeZones.toTimeZone(TimeZone). Thanks to Gary Gregory.
Add FutureTasks. Thanks to Gary Gregory.
Add Memoizer(Function) and Memoizer(Function, boolean). Thanks to Gary Gregory.
Add Consumers. Thanks to Gary Gregory.
Add github/codeql-action. Thanks to Gary Gregory.
Add coverage.yml. Thanks to Gary Gregory.
Add DurationUtils.since(Temporal). Thanks to Gary Gregory.
Add DurationUtils.of(FailableConsumer|FailableRunnbale). Thanks to Gary Gregory.
Add ExceptionUtils.forEach(Throwable, Consumer<Throwable>). Thanks to Gary Gregory.
Add ExceptionUtils.stream(Throwable). Thanks to Gary Gregory.
Add ExceptionUtils.getRootCauseStackTraceList(Throwable). Thanks to Gary Gregory.
Add SystemUtils.IS_OS_WINDOWS_11. Thanks to Will Herrmann, Gary Gregory, Roland Kreuzer.
Add SystemUtils.IS_JAVA_16. Thanks to Gary Gregory.
Add SystemUtils.IS_JAVA_17. Thanks to Gary Gregory.
Add SystemUtils.IS_JAVA_18. Thanks to Gary Gregory.
Add SystemUtils.IS_JAVA_19. Thanks to Gary Gregory.
Add SystemUtils.IS_JAVA_20. Thanks to Gary Gregory.
Add SystemUtils.IS_JAVA_21. Thanks to Emmanuel Bourg.
Add Streams.of(Enumeration<E>). Thanks to Gary Gregory.
Add Streams.of(Iterable<E>). Thanks to Gary Gregory.
Add Streams.of(Iterator<E>). Thanks to Gary Gregory.
Add Processor.Type.getLabel(). Thanks to Gary Gregory.
Add Processor.toString(). Thanks to Gary Gregory.
Add HashCodeBuilder.equals(Object). Thanks to Gary Gregory.
Add BooleanUtils.values() and forEach(). Thanks to Gary Gregory.
Add ClassPathUtils.packageToPath(String) and pathToPackage(String) Thanks to Gary Gregory.
Add CalendarUtils#getDayOfYear() #968 Thanks to Arturo Bernal.
Add NumberRange, DoubleRange, IntegerRange, LongRange. Thanks to Gary Gregory.
Add missing exception javadoc/tests for some null arguments #869. Thanks to Diego Marcilio, Bruno P. Kinoshita, Gary Gregory.
Add ClassLoaderUtils.getSystemURLs() and getThreadURLs(). Thanks to Gary Gregory.
Add RegExUtils.dotAll() and dotAllMatcher(). Thanks to Gary Gregory.
Add Pair.accept(FailableBiConsumer). Thanks to Gary Gregory.
Add Pair.apply(FailableBiFunction). Thanks to Gary Gregory.
Add and use ExceptionUtils.throwUnchecked(throwable). Thanks to Gary Gregory.
Add LockingVisitors.create(O, ReadWriteLock). Thanks to Gary Gregory.
Fixed Bugs:
DMI: Random object created and used only once (DMI_RANDOM_USED_ONLY_ONCE); Better multi-threaded behavior. Thanks to SpotBugs, Gary Gregory.
Make Streams.stream(Collection) null-safe. Thanks to Gary Gregory.
Fixing reversed Javadoc descriptions in StopWatch #781. Thanks to Thunderforge.
Simplify assertions with equivalent but more simple. #792. Thanks to Arturo Bernal.
Avoid multiple equivalent occurrences of the same expression. #797. Thanks to Arturo Bernal.
Remove redundant initializers #800. Thanks to Arturo Bernal.
Fix ObjectUtils Javadocs #755. Thanks to Arturo Bernal.
Add test idea for RangeTest from PR #815 by Rushi98, but with a new comment. Thanks to Rushi98, Gary Gregory.
Use final and Remove redundant String. #813, #816. Thanks to Arturo Bernal.
Use Set instead of List for checking the contains() method #734. Thanks to CiprianBodnarescu.
Javadoc for StringUtils.substringBefore(String str, int separator) doesn't mention that the separator is an int. Thanks to Roland Kreuzer.
Fix NullPointerException in ThreadUtils.getSystemThreadGroup() when the current thread is stopped. Thanks to Gary Gregory.
ArrayUtils.toPrimitive(Boolean...) null array elements map to false, like Boolean.parseBoolean(null) and its callers return false. Thanks to Gary Gregory.
StrBuilder.StrBuilderReader.skip(long): Throw an exception when an implicit narrowing conversion in a compound assignment would result in information loss or a numeric error such as an overflows. Thanks to CodeQL, Gary Gregory.
Deprecate Validate#notNull(Object) in favor of using Objects#requireNonNull(Object, String). Thanks to Gary Gregory.
Updating javadoc for NullPointerException when Validate.notNull() is called #870. Thanks to Diego Marcilio.
Fixing and adding DateUtils exception Javadocs #871. Thanks to Diego Marcilio.
Make Validate.isAssignableFrom() check null inputs. Thanks to Gary Gregory, Arturo Bernal.
Fix Javadoc for Validate.isAssignableFrom(). Thanks to Arturo Bernal.
Make final mappingFunction variable #876. Thanks to Arturo Bernal.
Remove unnecessary variable creations #882. Thanks to Arturo Bernal.
Minor changes #769. Thanks to Arturo Bernal.
Increase test coverage of ComparableUtils from 71% to 100% #898. Thanks to Steve Bosman, Gary Gregory.
Increase method test coverage of MultilineRecursiveToStringStyle #899. Thanks to Steve Bosman.
Fix unstable coverage of CharSequenceUtils tests noticed during merge of PRs 898 and 899 #901. Thanks to Steve Bosman.
Rewrite Conversion.binaryBeMsb0ToHexDigit to invert logic of binaryToHexDigit. Thanks to Arturo Bernal.
Allow extension of previously final classes ImmutablePair and ImmutableTriple. Thanks to Gary Gregory.
Update ClassUtils Javadoc with some missing throws NPE #912. Thanks to shalk, Bruno P. Kinoshita, Gary Gregory.
Javadoc: StringUtils.repeat("", "x", 3) = "xx"; #918. Thanks to guicaiyue.
Fix typos #920, #923. Thanks to Marc Wrobel.
Simplify condition #925. Thanks to Bhimantoro Suryo Admodjo.
StringUtils.join(Iterable, String) should only return null when the Iterable is null. Thanks to Gary Gregory.
StringUtils.join(Iterator, String) should only return null when the Iterator is null. Thanks to Gary Gregory.
Add tests to increase coverage #904. Thanks to Arturo Bernal.
Extends Object clauses are redundant #937. Thanks to Arturo Bernal.
Simplify conditional expression. #941. Thanks to Arturo Bernal.
Fix some Javadoc comments #938. Thanks to Arturo Bernal.
Deprecate getNanosOfMiili() method with typo and create proper getNanosOfMilli() #940. Thanks to Arturo Bernal, Gary Gregory.
Deprecate ThreadUtils code that defines custom function interfaces in favor of stock java.util.function.Predicate usage. Thanks to Gary Gregory.
Fix links in Javadoc and documentation #926. Thanks to Marc Wrobel.
Validate: Get error messages without using String.format when varargs is empty. Thanks to Piotr Stawirej.
Simplify expression (length is never < 0) #962. Thanks to Arturo Bernal.
Fix simple broken javadoc. #981. Thanks to Arturo Bernal.
Fix typo #1001. Thanks to LeeJuHyun.
Use Objects.requireNonNull() directly #1022. Thanks to Arturo Bernal.
ThreadUtilsTest#testThreadGroups will test failed when using Junit5 parallel test #1051. Thanks to remeio.
Swap the order of assertion args (first excepted then actual) #1054. Thanks to remeio.
Fix the comment of Failable, redundant "-" #1056. Thanks to remeio.
Fix the comment of ComparableUtils, using "smallest", not "largest" #1058. Thanks to remeio.
AnnotationUtilsTest and FormattableUtilsTest Only use static imports to import assert methods in tests #1052. Thanks to remeio.
[LANG-1681] Fix some FieldUtils Javadocs #1047. Thanks to laurentschoelens, Bruno P. Kinoshita, Diego Marcilio.
Remove unnecessary statement in DurationFormatUtils #965. Thanks to Arturo Bernal.
[StepSecurity] ci: Harden GitHub Actions #1067. Thanks to step-security-bot, Gary Gregory.
Update Javadoc for the insert methods in ArrayUtils #1078. Thanks to Dimitrios Efthymiou.
Deprecate ExceptionUtils.ExceptionUtils(). Thanks to Gary Gregory.
Throw IllegalArgumentException instead of InternalError in the builder package. Thanks to Gary Gregory.
Avoid NPE in MutableObject#equals() for null content. Thanks to Gary Gregory.
SystemUtils fix and updates related to macOS #1085. Thanks to Ali Khaleqi Yekta, Gary Gregory.
Changes:
Bump actions/cache from 2.1.4 to 3.0.10 #742, #752, #764, #833, #867, #959, #964. Thanks to Dependabot, XenoAmess, Gary Gregory.
Bump actions/checkout from 2 to 3.1.0 #819, #825, #859, #963. Thanks to Dependabot, Gary Gregory.
Bump actions/setup-java from v1.4.3 to 3.5.1 #879. Thanks to Gary Gregory.
Bump spotbugs-maven-plugin from 4.2.0 to 4.7.3.0 #735, #808, #822, #834, #868, #895, #919, #927, #946, #989. Thanks to Dependabot, Gary Gregory.
Bump spotbugs from 4.2.2 to 4.7.3 #744, #917, #947, #973. Thanks to Dependabot, Gary Gregory.
Bump maven-checkstyle-plugin from 3.1.2 to 3.2.0 #943. Thanks to Dependabot, Gary Gregory.
Bump checkstyle from 8.41 to 9.3 #739, #768, #787, #811, #824, #843. Thanks to Dependabot, Gary Gregory.
Bump easymock from 4.2 to 5.1.0 #746, #972, #986, #1012. Thanks to Dependabot.
Bump commons.jacoco.version from 0.8.6 to 0.8.8. Thanks to Gary Gregory.
Bump commons.japicmp.version from 0.15.2 to 0.16.0. Thanks to Gary Gregory.
Bump junit-pioneer from 1.3.8 to 1.9.1 #749, #767, #832, #883, #988, #991, #995. Thanks to Dependabot, Gary Gregory.
Bump junit-bom from 5.7.1 to 5.9.1 #761, #805, #807, #836, #928, #955. Thanks to Dependabot.
Bump maven-javadoc-plugin from 3.2.0 to 3.4.1. Thanks to Dependabot, Gary Gregory.
Bump jmh.version from 1.27 to 1.36 #794, #842, #872, #990. Thanks to Dependabot.
Bump maven-pmd-plugin from 3.14.0 to 3.19.0 #802, #858, #909, #948. Thanks to Dependabot.
Bump pmd from 6.40.0 to 6.52.0 #837, #861, #873, #905, #915, #932, #944. Thanks to Dependabot.
Bump biz.aQute.bndlib from 5.3.0 to 6.3.1 #814, #835. Thanks to Dependabot, Gary Gregory.
Bump maven-bundle-plugin from 5.1.1 to 5.1.2. Thanks to Dependabot.
Bump animal-sniffer-maven-plugin from 1.19 to 1.21. Thanks to Dependabot.
Bump exec-maven-plugin from 1.6.0 to 3.1.0 #590, #922. Thanks to Dependabot.
Bump maven-surefire-plugin from 3.0.0-M5 to 3.0.0-M7 #880, #910. Thanks to Dependabot.
Bump apache-rat from 0.13 to 0.14. Thanks to Gary Gregory.
Bump commons-parent from 53 to 58 #954, #1000, #1011, #1061. Thanks to Dependabot, Gary Gregory.
Bump commons-text from 1.9 to 1.10.0 #957. Thanks to Dependabot.
Bump commons.pmd-impl.version from 6.49.0 to 6.51.0 #961. Thanks to Dependabot, Gary Gregory.
Historical list of changes: https://commons.apache.org/proper/commons-lang/changes-report.html
For complete information on Apache Commons Lang, including instructions on how to submit bug reports, patches, or suggestions for improvement, see the Apache Commons Lang website:
https://commons.apache.org/proper/commons-lang/
Download page: https://commons.apache.org/proper/commons-lang/download_lang.cgi
Have fun! -Apache Commons Team
This document contains the release notes for the 3.12.0 version of Apache Commons Lang. Commons Lang is a set of utility functions and reusable compon
INTRODUCTION:
This document contains the release notes for the 3.12.0 version of Apache Commons Lang. Commons Lang is a set of utility functions and reusable components that should be of use in any Java environment.
Lang 3.9 and onwards now targets Java 8, making use of features that arrived with Java 8.
For the advice on upgrading from 2.x to 3.x, see the following page:
https://commons.apache.org/lang/article3_0.html
Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang.
New features and bug fixes.
Changes in this version include:
New features:
Add BooleanUtils.booleanValues(). Thanks to Gary Gregory.
Add BooleanUtils.primitiveValues(). Thanks to Gary Gregory.
More test coverage for CharSequenceUtils. #631. Thanks to Edgar Asatryan.
Add fluent-style ArraySorter. Thanks to Gary Gregory.
Add and use LocaleUtils.toLocale(Locale) to avoid NPEs. Thanks to Gary Gregory.
Add FailableShortSupplier, handy for JDBC APIs. Thanks to Gary Gregory.
Add JavaVersion.JAVA_17. Thanks to Gary Gregory.
Add StringUtils.substringBefore(String, int). Thanks to Gary Gregory.
Add Range.INTEGER. Thanks to Gary Gregory.
Add DurationUtils. Thanks to Gary Gregory.
Introduce the use of @Nonnull, and @Nullable, and the Objects class as a helper tool.
Add and use true and false String constants #714. Thanks to Arturo Bernal, Gary Gregory.
Add and use ObjectUtils.requireNonEmpty() #716. Thanks to Arturo Bernal, Gary Gregory.
Fixed Bugs:
ContextedException Javadoc add missing semicolon #581. Thanks to iamchao1129.
NumberUtilsTest - incorrect types in min/max tests #634. Thanks to HubertWo, Gary Gregory.
Fix potential NPE in TypeUtils.isAssignable(Type, ParameterizedType, Map, Type>). Thanks to Gary Gregory.
Fix Javadoc for SystemUtils.isJavaVersionAtMost() #638. Thanks to John R. D'Orazio.
Fix formatting of isAnyBlank() and isAnyEmpty(). #513. Thanks to Isira Seneviratne.
Correct markup in Javadoc for unbalanced braces #679. Thanks to Felix Schumacher.
Fix broken Javadoc links to commons-text #712. Thanks to Chris Smowton.
Add and use ThreadUtils.sleep(Duration). Thanks to Gary Gregory.
Add and use ThreadUtils.join(Thread, Duration). Thanks to Gary Gregory.
Add ObjectUtils.wait(Duration). Thanks to Gary Gregory.
Changes:
Enable Dependabot #587. Thanks to Gary Gregory.
Bump junit-jupiter from 5.6.2 to 5.7.0.
Bump spotbugs from 4.1.2 to 4.2.1, #627, #671, #708. Thanks to chtompki, Dependabot.
Bump spotbugs-maven-plugin from 4.0.0 to 4.2.0, #593, #596, #609, #623, #632, #692. Thanks to Dependabot.
Bump biz.aQute.bndlib from 5.1.1 to 5.3.0 #592, #628, #715. Thanks to Dependabot.
Bump junit-pioneer from 0.6.0 to 1.1.0, #589, #597, #600, #624, #625, #662. Thanks to Dependabot.
Bump checkstyle from 8.34 to 8.40, #594, #614, #637, #665, #706. Thanks to Dependabot.
Bump actions/checkout from v2.3.1 to v2.3.4 #601, #639. Thanks to Dependabot.
Bump actions/setup-java from v1.4.0 to v1.4.2 #612. Thanks to Dependabot.
Update commons.jacoco.version 0.8.5 to 0.8.6 (Fixes Java 15 builds). Thanks to Gary Gregory.
Update maven-surefire-plugin 2.22.2 -> 3.0.0-M5. Thanks to Gary Gregory.
Bump maven-pmd-plugin from 3.13.0 to 3.14.0 #660. Thanks to Dependabot.
Bump jmh.version from 1.21 to 1.27 #674. Thanks to Dependabot.
Update commons.japicmp.version 0.14.3 -> 0.15.2. Thanks to Gary Gregory.
Processor.java: check enum equality with == instead of .equals() method #690. Thanks to Ali K. Nouri.
Bump junit-pioneer from 1.1.0 to 1.3.0 #702. Thanks to Dependabot.
Bump maven-checkstyle-plugin from 3.1.1 to 3.1.2 #705. Thanks to Dependabot.
Bump actions/cache from v2 to v2.1.4 #710. Thanks to Dependabot.
Bump junit-bom from 5.7.0 to 5.7.1 #707. Thanks to Dependabot.
Minor Improvements #701. Thanks to Arturo Bernal.
Minor Improvement: Add final variable.try to make the code read-only #700. Thanks to Arturo Bernal.
Minor Improvement: Remove redundant initializer #699. Thanks to Arturo Bernal.
Use own validator ObjectUtils.anyNull to check null String input #718. Thanks to Arturo Bernal.
Historical list of changes: https://commons.apache.org/proper/commons-lang/changes-report.html
For complete information on Apache Commons Lang, including instructions on how to submit bug reports, patches, or suggestions for improvement, see the Apache Commons Lang website:
https://commons.apache.org/proper/commons-lang/
Download page: https://commons.apache.org/proper/commons-lang/download_lang.cgi
Have fun! -Apache Commons Team
Nothing published for this version
Nothing published for this version
This document contains the release notes for the 3.9 version of Apache Commons Lang. Commons Lang is a set of utility functions and reusable component
INTRODUCTION:
This document contains the release notes for the 3.9 version of Apache Commons Lang. Commons Lang is a set of utility functions and reusable components that should be of use in any Java environment.
Lang 3.9 and onwards now targets Java 8, making use of features that arrived with Java 8.
For the advice on upgrading from 2.x to 3.x, see the following page:
https://commons.apache.org/lang/article3_0.html
Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang.
New features and bug fixes. Requires Java 8, supports Java 9, 10, 11
Changes in this version include:
New features:
Adding the Functions class.
Changes:
(doc) Fix javadoc for 'startIndex' parameter of StringUtils.join() methods. GitHub PR #412. Thanks to Andrei Troie aft90.
Historical list of changes: https://commons.apache.org/proper/commons-lang/changes-report.html
For complete information on Apache Commons Lang, including instructions on how to submit bug reports, patches, or suggestions for improvement, see the Apache Commons Lang website:
https://commons.apache.org/proper/commons-lang/
This document contains the release notes for the 3.8.1 version of Apache Commons Lang. Commons Lang is a set of utility functions and reusable compone
INTRODUCTION:
This document contains the release notes for the 3.8.1 version of Apache Commons Lang. Commons Lang is a set of utility functions and reusable components that should be of use in any Java environment.
Lang 3.0 and onwards now targets Java 7.0, making use of features that arrived with Java 7.0.
For the advice on upgrading from 2.x to 3.x, see the following page:
https://commons.apache.org/lang/article3_0.html
Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang.
This release is a bugfix for Restoring Bundle-SymbolicName in the MANIFEST.mf file.
Changes in this version include:
Fixed Bugs:
This document contains the release notes for the 3.8 version of Apache Commons Lang. Commons Lang is a set of utility functions and reusable component
INTRODUCTION:
This document contains the release notes for the 3.8 version of Apache Commons Lang. Commons Lang is a set of utility functions and reusable components that should be of use in any Java environment.
Lang 3.0 and onwards now targets Java 7.0, making use of features that arrived with Java 7.0.
For the advice on upgrading from 2.x to 3.x, see the following page:
https://commons.apache.org/lang/article3_0.html
Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang.
New features and bug fixes. Requires Java 7, supports Java 8, 9, 10.
Changes in this version include:
New features:
Fixed Bugs:
Changes:
LANG-1346: Remove deprecation from RandomStringUtils
INTRODUCTION:
This document contains the release notes for the 3.7 version of Apache Commons Lang. Commons Lang is a set of utility functions and reusable components that should be of use in any Java environment.
Lang 3.0 and onwards now targets Java 5.0, making use of features that arrived with Java 5.0 such as generics, variable arguments, autoboxing, concurrency and formatted output.
For the advice on upgrading from 2.x to 3.x, see the following page:
https://commons.apache.org/lang/article3_0.html
Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang.
New features and bug fixes. Requires Java 7, supports Java 8, 9, 10.
Changes in this version include:
New features:
Fixed Bugs:
Changes:
For this reason most of the string focused functionality in Commons Lang has been deprecated and moved to Commons Text. This includes:
INTRODUCTION:
This document contains the release notes for the 3.6 version of Apache Commons Lang as well as a history all changes in the Commons Lang 3.x release line. Commons Lang is a set of utility functions and reusable components that should be of use in any Java environment. Commons Lang 3.6 at least requires Java 7.0. Note that this has changed from Commons Lang 3.5, which only required Java 1.6.
For the advice on upgrading from 2.x to 3.x, see the following page:
https://commons.apache.org/lang/article3_0.html
Some of the highlights in this release include:
o The class org.apache.commons.lang3.concurrent.Memoizer is an implementation of the Memoizer pattern as shown in Goetz, Brian et al. (2006) - Java Concurrency in Practice, p. 108. o The class org.apache.commons.lang3.ArchUtils has been added. ArchUtils is a utility class for the "os.arch" system property.
The Apache Commons Community has recently set up the Commons Text component as a home for algorithms working on strings. For this reason most of the string focused functionality in Commons Lang has been deprecated and moved to Commons Text. This includes:
o All classes in the org.apache.commons.lang3.text and the org.apache.commons.lang3.text.translate packages o org.apache.commons.lang3.StringEscapeUtils o org.apache.commons.lang3.RandomStringUtils o The methods org.apache.commons.lang3.StringUtils.getJaroWinklerDistance and org.apache.commons.lang3.StringUtils.getLevenshteinDistance
For more information see the Commons Text website:
https://commons.apache.org/text
The class org.apache.commons.lang3.CharEncoding has been deprecated in favor of java.nio.charset.StandardCharsets.
The following methods have been deprecated in org.apache.commons.lang3.ArrayUtils in favor of the corresponding insert methods. Note that the handling for null inputs differs between add and insert.
o add(boolean[], int, boolean) -> insert(int, boolean[], boolean...) o add(byte[], int, boolean) -> insert(int, byte[], byte...) o add(char[], int, boolean) -> insert(int, char[], char...) o add(double[], int, boolean) -> insert(int, double[], double...) o add(float[], int, boolean) -> insert(int, float[], float...) o add(int[], int, boolean) -> insert(int, int[], int...) o add(long[], int, boolean) -> insert(int, long[], long...) o add(short[], int, boolean) -> insert(int, short[], short...) o add(T[], int, boolean) -> insert(int, T[], T...)
The MANIFEST.MF now contains an additional entry:
Automatic-Module-Name: org.apache.commons.lang3
This should make it possible to use Commons Lang 3.6 as a module in the Java 9 module system. For more information see the corresponding issue and the referenced mailing list discussions:
https://issues.apache.org/jira/browse/LANG-1338
The build problems present in the 3.5 release have been resolved. Building Commons Lang 3.6 should work out of the box with the latest Java 9 EA build. Please report any Java 9 related issues at:
https://issues.apache.org/jira/browse/LANG
o org.apache.commons.lang3.JavaVersion deprecated enum constant JAVA_1_9 introduced enum constant JAVA_9
Some of the highlights in this release include:
o Added Java 9 detection to org.apache.commons.lang3.SystemUtils. o Support for shifting and swapping elements in org.apache.commons.lang3.ArrayUtils. o New methods for generating random strings from different character classes including alphabetic, alpha-numeric and ASCII added to org.apache.commons.lang3.RandomStringUtils. o Numerous extensions to org.apache.commons.lang3.StringUtils including null safe compare variants, more remove and replace variants, rotation and truncation. o Added org.apache.commons.lang3.ThreadUtils - a utility class to work with instances of java.lang.Thread and java.lang.ThreadGroup. o Added annotations @EqualsExclude, @HashCodeExclude and @ToStringExclude to mark fields which should be ignored by the reflective builders in the org.apache.commons.lang3.builder package. o Support for various modify and retrieve value use cases added to the classes in org.apache.commons.lang3.mutable.
Apache Commons Lang 3.5 is binary compatible with the 3.4 release. Users should not experience any problems when upgrading from 3.4 to 3.5.
There has been an addition to the org.apache.commons.lang3.time.DatePrinter interface:
o Added method 'public boolean parse(java.lang.String, java.text.ParsePosition, java.util.Calendar)' o Added method 'public java.lang.Appendable format(long, java.lang.Appendable)' o Added method 'public java.lang.Appendable format(java.util.Date, java.lang.Appendable)' o Added method 'public java.lang.Appendable format(java.util.Calendar, java.lang.Appendable)'
For this reason 3.5 is not strictly source compatible to 3.4. Since the DatePrinter interface is not meant to be implemented by clients, this change it not considered to cause any problems.
Java 9 introduces a new version-string scheme. Details of this new scheme are documented in JEP-223 (https://openjdk.org/jeps/223). In order to support JEP-223 two classes had to be changed:
o org.apache.commons.lang3.JavaVersion deprecated enum constant JAVA_1_9 introduced enum constant JAVA_9
o org.apache.commons.lang3.SystemUtils deprecated constant IS_JAVA_1_9 introduced constant IS_JAVA_9
For more information see LANG-1197 (https://issues.apache.org/jira/browse/LANG-1197). All other APIs are expected to work with Java 9.
Java 8 introduced the Unicode Consortium's Common Locale Data Repository as alternative source for locale data. Java 9 will use the CLDR provider as default provider for locale data (see https://openjdk.org/jeps/252). This causes an number of locale-sensitive test in Commons Lang to fail. In order to build Commons Lang 3.5 on Java 9, the locale provider has to be set to 'JRE':
mvn -Djava.locale.providers=JRE clean install
We are currently investigating ways to support building on Java 9 without further configuration. For more information see: https://issues.apache.org/jira/browse/LANG-1265
Commons Lang 3.4 is fully binary compatible to the last release and can therefore be used as a drop in replacement for 3.3.2. Note that the value of o
Commons Lang 3.4 is fully binary compatible to the last release and can therefore be used as a drop in replacement for 3.3.2. Note that the value of org.apache.commons.lang3.time.DurationFormatUtils.ISO_EXTENDED_FORMAT_PATTERN has changed, which may affect clients using the constant. Furthermore the constant is used internally in o DurationFormatUtils.formatDurationISO(long) o DurationFormatUtils.formatPeriodISO(long, long)
For more information see https://issues.apache.org/jira/browse/LANG-1000.
LANG-989: Add org.apache.commons.lang3.SystemUtils.IS_JAVA_1_8
LANG-987: DateUtils.getFragmentInDays(Date, Calendar.MONTH) returns wrong days
LANG-940: Fix deprecation warnings
LANG-937: Fix missing Hamcrest dependency in Ant Build
This release introduces backwards incompatible changes in org.apache.commons.lang3.time.FastDateFormat: o Method 'protected java.util.List parsePatter…
This release introduces backwards incompatible changes in org.apache.commons.lang3.time.FastDateFormat: o Method 'protected java.util.List parsePattern()' has been removed o Method 'protected java.lang.String parseToken(java.lang.String, int[])' has been removed o Method 'protected org.apache.commons.lang3.time.FastDateFormat$NumberRule selectNumberRule(int, int)' has been removed
These changes were the result of [LANG-462]. It is assumed that this change will not break clients as Charles Honton pointed out on 25/Jan/12: "
o Fixed URLs in javadoc to point to new oracle.com pages
LANG-748: Deprecating chomp(String, String)
Nothing published for this version
LANG-276: MutableBigDecimal and MutableBigInteger.
Historical list of changes: https://commons.apache.org/lang/changes-report.html
For complete information on Commons Lang, including instructions on how to submit bug reports, patches, or suggestions for improvement, see the Apache Commons Lang website:
https://commons.apache.org/lang/
Have fun! -Apache Commons Lang team
Your coding agent can read these notes before it upgrades. Set up the MCP server →