First, let us start with a couple of deprecations. As you can see in the release notes, we chose
to deprecate the ObjectUtils.appendIdentityToString(StringBuffer, Object)
method as its
-null handling did not match its design (see LANG-360
+null handling did not match its design (see LANG-360
for more details. Instead users should use ObjectUtils.identityToString(StringBuffer, Object)
.
We also deprecated DateUtils.add(java.util.Date, int, int)
. It should have been private
@@ -47,7 +47,7 @@ class to the org.apache.commons.lang.math
package.
This candidate for ugly name of the month was needed to add IEEE-754r
semantics for some of the NumberUtils
methods. The relevant part of that
IEEE specification in this case is the NaN handling for min
and max
methods, and
-you can read more about it in LANG-381.
+you can read more about it in LANG-381.
Second and third on our newcomers list are the ExtendedMessageFormat
class and its peer
FormatFactory
@@ -177,11 +177,11 @@ and fortunately there are some nice groupings that we can discuss instead:
In addition to new things, there are the bugfixes. As you can tell from the release notes, there are a good few - 24 in fact according to JIRA. Here are some of the interesting ones:
Per the release notes there are 32 bugs fixed in Lang 2.5. Some highlights are:
", StringEscapeUtils.unescapeHtml4("<P&O>")); diff --git a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java index 02046aa54..3810a5c12 100644 --- a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java @@ -1966,7 +1966,7 @@ public void testReplaceChars_StringStringString() { assertEquals("ayya", StringUtils.replaceChars("abcba", "bc", "y")); assertEquals("ayzya", StringUtils.replaceChars("abcba", "bc", "yzx")); - // From http://issues.apache.org/bugzilla/show_bug.cgi?id=25454 + // From https://issues.apache.org/bugzilla/show_bug.cgi?id=25454 assertEquals("bcc", StringUtils.replaceChars("abc", "ab", "bc")); assertEquals("q651.506bera", StringUtils.replaceChars("d216.102oren", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789", diff --git a/src/test/java/org/apache/commons/lang3/builder/EqualsBuilderTest.java b/src/test/java/org/apache/commons/lang3/builder/EqualsBuilderTest.java index 13847c738..061d2da0f 100644 --- a/src/test/java/org/apache/commons/lang3/builder/EqualsBuilderTest.java +++ b/src/test/java/org/apache/commons/lang3/builder/EqualsBuilderTest.java @@ -1186,7 +1186,7 @@ public int getB() { /** * Tests two instances of classes that can be equal and that are not "related". The two classes are not subclasses * of each other and do not share a parent aside from Object. - * See http://issues.apache.org/bugzilla/show_bug.cgi?id=33069 + * See https://issues.apache.org/bugzilla/show_bug.cgi?id=33069 */ @Test public void testUnrelatedClasses() { @@ -1210,7 +1210,7 @@ public void testUnrelatedClasses() { } /** - * Test from http://issues.apache.org/bugzilla/show_bug.cgi?id=33067 + * Test from https://issues.apache.org/bugzilla/show_bug.cgi?id=33067 */ @Test public void testNpeForNullElement() { @@ -1218,7 +1218,7 @@ public void testNpeForNullElement() { final Object[] x2 = new Object[]{Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3)}; // causes an NPE in 2.0 according to: - // http://issues.apache.org/bugzilla/show_bug.cgi?id=33067 + // https://issues.apache.org/bugzilla/show_bug.cgi?id=33067 new EqualsBuilder().append(x1, x2); } diff --git a/src/test/java/org/apache/commons/lang3/text/StrBuilderAppendInsertTest.java b/src/test/java/org/apache/commons/lang3/text/StrBuilderAppendInsertTest.java index a2b04f285..477b34721 100644 --- a/src/test/java/org/apache/commons/lang3/text/StrBuilderAppendInsertTest.java +++ b/src/test/java/org/apache/commons/lang3/text/StrBuilderAppendInsertTest.java @@ -931,7 +931,7 @@ public void testAppendFixedWidthPadRight() { assertEquals("null-", sb.toString()); } - // See: http://issues.apache.org/jira/browse/LANG-299 + // See: https://issues.apache.org/jira/browse/LANG-299 @Test public void testLang299() { final StrBuilder sb = new StrBuilder(1); diff --git a/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java b/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java index d591f7bdc..90070d59f 100644 --- a/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java @@ -849,7 +849,7 @@ public void testRound() throws Exception { DateUtils.round((Object) calAmPm4, Calendar.AM_PM), "round ampm-4 failed"); - // Fix for http://issues.apache.org/bugzilla/show_bug.cgi?id=25560 / LANG-13 + // Fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=25560 / LANG-13 // Test rounding across the beginning of daylight saving time try { TimeZone.setDefault(zone); @@ -1116,7 +1116,7 @@ public void testTruncate() throws Exception { assertThrows(IllegalArgumentException.class, () -> DateUtils.truncate((Object) null, Calendar.SECOND)); assertThrows(ClassCastException.class, () -> DateUtils.truncate("", Calendar.SECOND)); - // Fix for http://issues.apache.org/bugzilla/show_bug.cgi?id=25560 + // Fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=25560 // Test truncate across beginning of daylight saving time try { TimeZone.setDefault(zone); @@ -1154,7 +1154,7 @@ public void testTruncate() throws Exception { /** * Tests for LANG-59 * - * see http://issues.apache.org/jira/browse/LANG-59 + * see https://issues.apache.org/jira/browse/LANG-59 */ @Test public void testTruncateLang59() { @@ -1227,7 +1227,7 @@ public void testTruncateLang59() { } } - // http://issues.apache.org/jira/browse/LANG-530 + // https://issues.apache.org/jira/browse/LANG-530 @SuppressWarnings("deprecation") @Test public void testLang530() throws ParseException { @@ -1395,7 +1395,7 @@ public void testCeil() throws Exception { assertThrows(ClassCastException.class, () -> DateUtils.ceiling("", Calendar.SECOND)); assertThrows(IllegalArgumentException.class, () -> DateUtils.ceiling(date1, -9999)); - // Fix for http://issues.apache.org/bugzilla/show_bug.cgi?id=25560 + // Fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=25560 // Test ceiling across the beginning of daylight saving time try { TimeZone.setDefault(zone); diff --git a/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java b/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java index b0724c49d..7db6bbea7 100644 --- a/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java @@ -406,7 +406,7 @@ public void testLexx() { } - // http://issues.apache.org/bugzilla/show_bug.cgi?id=38401 + // https://issues.apache.org/bugzilla/show_bug.cgi?id=38401 @Test public void testBugzilla38401() { assertEqualDuration( "0000/00/30 16:00:00 000", new int[] { 2006, 0, 26, 18, 47, 34 },