Merge branch 'pr-485'

This closes #485
This commit is contained in:
Bruno P. Kinoshita 2020-02-14 09:50:26 +13:00
commit 474ab7f5f1
2 changed files with 3 additions and 1 deletions

View File

@ -46,6 +46,7 @@ The <action> type attribute can be add,update,fix,remove.
<body>
<release version="3.10" date="YYYY-MM-DD" description="New features and bug fixes. Requires Java 8, supports Java 9, 10, 11.">
<action issue="LANG-1514" type="fix" dev="kinow" due-to="contextshuffling">Make test more stable by wrapping assertions in hashset.</action>
<action issue="LANG-1450" type="fix" dev="chtompki">Generate Javadoc jar on build.</action>
<action issue="LANG-1457" type="add" dev="ggregory">Add ExceptionUtils.throwableOfType(Throwable, Class) and friends.</action>
<action issue="LANG-1458" type="add" dev="ggregory">Add EMPTY_ARRAY constants to classes in org.apache.commons.lang3.tuple.</action>

View File

@ -36,6 +36,7 @@ import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
@ -188,7 +189,7 @@ public class FieldUtilsTest {
final List<Field> fieldsInteger = Arrays.asList(Integer.class.getDeclaredFields());
final List<Field> allFieldsInteger = new ArrayList<>(fieldsInteger);
allFieldsInteger.addAll(fieldsNumber);
assertEquals(allFieldsInteger, FieldUtils.getAllFieldsList(Integer.class));
assertEquals(new HashSet(allFieldsInteger), new HashSet(FieldUtils.getAllFieldsList(Integer.class)));
final List<Field> allFields = FieldUtils.getAllFieldsList(PublicChild.class);
// Under Jacoco,0.8.1 and Java 10, the field count is 7.
int expected = 5;