diff --git a/project.xml b/project.xml
index c748ebc11..eb0f803fd 100644
--- a/project.xml
+++ b/project.xml
@@ -301,6 +301,9 @@ limitations under the License.
Used for efficient space padding. The length of each String expands as needed.
*/ - private static final String[] PADDING = new String[Character.MAX_VALUE]; + private static final String[] PADDING = new String[Character.MAX_VALUE + 1]; static { // space padding is most common, start with 64 chars diff --git a/src/test/org/apache/commons/lang/StringUtilsTest.java b/src/test/org/apache/commons/lang/StringUtilsTest.java index 798363642..9d067d52d 100644 --- a/src/test/org/apache/commons/lang/StringUtilsTest.java +++ b/src/test/org/apache/commons/lang/StringUtilsTest.java @@ -1126,6 +1126,7 @@ public class StringUtilsTest extends TestCase { assertEquals(" ", StringUtils.leftPad("", 5, ' ')); assertEquals(" abc", StringUtils.leftPad("abc", 5, ' ')); assertEquals("xxabc", StringUtils.leftPad("abc", 5, 'x')); + assertEquals("\uffff\uffffabc", StringUtils.leftPad("abc", 5, '\uffff')); assertEquals("abc", StringUtils.leftPad("abc", 2, ' ')); String str = StringUtils.leftPad("aaa", 10000, 'a'); // bigger than pad length assertEquals(10000, str.length());