You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ch...@apache.org on 2017/10/11 15:50:20 UTC
[lang] revert LANG-1354;
java7 has synthetic fields on Integer, jacoco does not yet work with
java9
Repository: commons-lang
Updated Branches:
refs/heads/master 0f32b292c -> 07f3694a5
revert LANG-1354; java7 has synthetic fields on Integer, jacoco does not yet work with java9
Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/07f3694a
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/07f3694a
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/07f3694a
Branch: refs/heads/master
Commit: 07f3694a5c85ff5ee8c556817c0d2ea3504f26f7
Parents: 0f32b29
Author: Chas Honton <ch...@apache.org>
Authored: Wed Oct 11 08:50:01 2017 -0700
Committer: Chas Honton <ch...@apache.org>
Committed: Wed Oct 11 08:50:01 2017 -0700
----------------------------------------------------------------------
.travis.yml | 2 +-
.../org/apache/commons/lang3/reflect/FieldUtils.java | 12 +++---------
src/site/resources/profile.cobertura | 0
src/site/resources/profile.jacoco | 0
4 files changed, 4 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-lang/blob/07f3694a/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 6e09a29..4977537 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,4 +25,4 @@ script:
- mvn
after_success:
- - mvn clean test jacoco:report coveralls:report -Ptravis-jacoco
+ - mvn clean cobertura:cobertura coveralls:report -Ptravis-cobertura
http://git-wip-us.apache.org/repos/asf/commons-lang/blob/07f3694a/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java b/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java
index c42cd32..c4cccca 100644
--- a/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java
+++ b/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java
@@ -24,6 +24,7 @@ import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
/**
@@ -186,7 +187,6 @@ public class FieldUtils {
/**
* Gets all fields of the given class and its parents (if any).
- * Does not return any synthetic fields.
*
* @param cls
* the {@link Class} to query
@@ -202,7 +202,6 @@ public class FieldUtils {
/**
* Gets all fields of the given class and its parents (if any).
- * Does not return any synthetic fields.
*
* @param cls
* the {@link Class} to query
@@ -216,11 +215,8 @@ public class FieldUtils {
final List<Field> allFields = new ArrayList<>();
Class<?> currentClass = cls;
while (currentClass != null) {
- for(final Field declaredField : currentClass.getDeclaredFields()) {
- if(!declaredField.isSynthetic()) {
- allFields.add(declaredField);
- }
- }
+ final Field[] declaredFields = currentClass.getDeclaredFields();
+ Collections.addAll(allFields, declaredFields);
currentClass = currentClass.getSuperclass();
}
return allFields;
@@ -228,8 +224,6 @@ public class FieldUtils {
/**
* Gets all fields of the given class and its parents (if any) that are annotated with the given annotation.
- * Does not return any synthetic fields.
- *
* @param cls
* the {@link Class} to query
* @param annotationCls
http://git-wip-us.apache.org/repos/asf/commons-lang/blob/07f3694a/src/site/resources/profile.cobertura
----------------------------------------------------------------------
diff --git a/src/site/resources/profile.cobertura b/src/site/resources/profile.cobertura
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/commons-lang/blob/07f3694a/src/site/resources/profile.jacoco
----------------------------------------------------------------------
diff --git a/src/site/resources/profile.jacoco b/src/site/resources/profile.jacoco
deleted file mode 100644
index e69de29..0000000