Repository: commons-lang Updated Branches: refs/heads/master 17f9d22f3 -> 9901bf98e
Some reflection tests must account for classes files being instrumented by Jacoco. Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/9901bf98 Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/9901bf98 Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/9901bf98 Branch: refs/heads/master Commit: 9901bf98e4921df1c85e323c4b096b7feb80221e Parents: 17f9d22 Author: Gary Gregory <[email protected]> Authored: Thu Mar 29 13:27:45 2018 -0600 Committer: Gary Gregory <[email protected]> Committed: Thu Mar 29 13:27:45 2018 -0600 ---------------------------------------------------------------------- .../java/org/apache/commons/lang3/reflect/FieldUtilsTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-lang/blob/9901bf98/src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java b/src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java index dbf114d..f98438f 100644 --- a/src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java @@ -50,6 +50,7 @@ import static org.junit.Assume.assumeNotNull; */ public class FieldUtilsTest { + private static final String JACOCO_DATA_FIELD_NAME = "$jacocoData"; static final Integer I0 = Integer.valueOf(0); static final Integer I1 = Integer.valueOf(1); static final Double D0 = Double.valueOf(0.0); @@ -169,7 +170,7 @@ public class FieldUtilsTest { // Under Jacoco,0.8.1 and Java 10, the field count is 7. int expected = 5; for (Field field : allFields) { - if (field.getName().equals("$jacocoData")) { + if (field.getName().equals(JACOCO_DATA_FIELD_NAME)) { expected++; } } @@ -189,7 +190,7 @@ public class FieldUtilsTest { // Under Jacoco,0.8.1 and Java 10, the field count is 7. int expected = 5; for (Field field : allFields) { - if (field.getName().equals("$jacocoData")) { + if (field.getName().equals(JACOCO_DATA_FIELD_NAME)) { expected++; } }
