LANG-1337: Fix test failures in IBM JDK 8 for ToStringBuilderTest by specifying the ArrayList initial capacity.

This commit is contained in:
Bruno P. Kinoshita 2017-06-06 23:41:31 +12:00
parent 551101299d
commit 65b08c4f91
2 changed files with 2 additions and 1 deletions

View File

@ -46,6 +46,7 @@ The <action> type attribute can be add,update,fix,remove.
<body>
<release version="3.6" date="2017-MM-DD" description="TBD">
<action issue="LANG-1337" type="fix" dev="kinow">Fix test failures in IBM JDK 8 for ToStringBuilderTest</action>
<action issue="LANG-1304" type="add" dev="pschumacher" due-to="Andy Klimczak">Add method in StringUtils to determine if string contains both mixed cased characters</action>
<action issue="LANG-1334" type="update" dev="djones">Deprecate CharEncoding in favour of java.nio.charset.StandardCharsets</action>
<action issue="LANG-1319" type="fix" dev="djones">MultilineRecursiveToStringStyle StackOverflowError when object is an array</action>

View File

@ -316,7 +316,7 @@ public class ToStringBuilderTest {
// representation different for IBM JDK 1.6.0, LANG-727
assumeFalse("IBM Corporation".equals(SystemUtils.JAVA_VENDOR) && "1.6".equals(SystemUtils.JAVA_SPECIFICATION_VERSION));
assumeFalse("Oracle Corporation".equals(SystemUtils.JAVA_VENDOR) && "1.6".compareTo(SystemUtils.JAVA_SPECIFICATION_VERSION) < 0);
final List<Object> list = new ArrayList<>();
final List<Object> list = new ArrayList<>(10);
final String baseString = this.toBaseString(list);
final String expectedWithTransients = baseString + "[elementData={<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>},size=0,modCount=0]";
final String toStringWithTransients = ToStringBuilder.reflectionToString(list, null, true);