LANG-1226: StringUtils#normalizeSpace does not trim the string anymore (closes #150)
This commit is contained in:
parent
ed14537b80
commit
7e85d1cf54
|
@ -46,6 +46,7 @@ The <action> type attribute can be add,update,fix,remove.
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<release version="3.5" date="tba" description="tba">
|
<release version="3.5" date="tba" description="tba">
|
||||||
|
<action issue="LANG-1226" type="fix" dev="pschumacher" due-to="pschumacher">StringUtils#normalizeSpace does not trim the string anymore</action>
|
||||||
<action issue="LANG-1251" type="fix" dev="pschumacher" due-to="Takuya Ueshin">SerializationUtils.ClassLoaderAwareObjectInputStream should use static initializer to initialize primitiveTypes map</action>
|
<action issue="LANG-1251" type="fix" dev="pschumacher" due-to="Takuya Ueshin">SerializationUtils.ClassLoaderAwareObjectInputStream should use static initializer to initialize primitiveTypes map</action>
|
||||||
<action issue="LANG-1253" type="add" dev="ggregory" due-to="adilek">[GitHub issue #170] Add RandomUtils#nextBoolean() method</action>
|
<action issue="LANG-1253" type="add" dev="ggregory" due-to="adilek">[GitHub issue #170] Add RandomUtils#nextBoolean() method</action>
|
||||||
<action issue="LANG-1247" type="update" dev="chas" due-to="Benoit Wiart">FastDatePrinter generates extra Date objects</action>
|
<action issue="LANG-1247" type="update" dev="chas" due-to="Benoit Wiart">FastDatePrinter generates extra Date objects</action>
|
||||||
|
|
|
@ -8220,7 +8220,7 @@ public class StringUtils {
|
||||||
if (startWhitespaces) {
|
if (startWhitespaces) {
|
||||||
return EMPTY;
|
return EMPTY;
|
||||||
}
|
}
|
||||||
return new String(newChars, 0, count - (whitespacesCount > 0 ? 1 : 0));
|
return new String(newChars, 0, count - (whitespacesCount > 0 ? 1 : 0)).trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2614,6 +2614,8 @@ public class StringUtilsTest {
|
||||||
assertEquals("a b c", StringUtils.normalizeSpace(" a b c "));
|
assertEquals("a b c", StringUtils.normalizeSpace(" a b c "));
|
||||||
assertEquals("a b c", StringUtils.normalizeSpace("a\t\f\r b\u000B c\n"));
|
assertEquals("a b c", StringUtils.normalizeSpace("a\t\f\r b\u000B c\n"));
|
||||||
assertEquals("a b c", StringUtils.normalizeSpace("a\t\f\r " + HARD_SPACE + HARD_SPACE + "b\u000B c\n"));
|
assertEquals("a b c", StringUtils.normalizeSpace("a\t\f\r " + HARD_SPACE + HARD_SPACE + "b\u000B c\n"));
|
||||||
|
assertEquals("b", StringUtils.normalizeSpace("\u0000b"));
|
||||||
|
assertEquals("b", StringUtils.normalizeSpace("b\u0000"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue