You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by pa...@apache.org on 2018/11/20 17:21:49 UTC
[6/6] [lang] Make whitespace use around generic tokens consistent and
add a checkstyle rule to enforce it.
Make whitespace use around generic tokens consistent and add a checkstyle rule to enforce it.
Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/5cdac9cf
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/5cdac9cf
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/5cdac9cf
Branch: refs/heads/master
Commit: 5cdac9cfd5a74b0a52ebde32798b973c6edbaa79
Parents: 07f5371
Author: pascalschumacher <pa...@gmx.net>
Authored: Mon Nov 19 22:03:58 2018 +0100
Committer: pascalschumacher <pa...@gmx.net>
Committed: Mon Nov 19 22:05:18 2018 +0100
----------------------------------------------------------------------
checkstyle.xml | 1 +
src/main/java/org/apache/commons/lang3/ClassUtils.java | 2 +-
.../java/org/apache/commons/lang3/exception/ExceptionUtils.java | 2 +-
src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java | 2 +-
4 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-lang/blob/5cdac9cf/checkstyle.xml
----------------------------------------------------------------------
diff --git a/checkstyle.xml b/checkstyle.xml
index 3a31026..eda9e1d 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -55,6 +55,7 @@ limitations under the License.
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="RightCurly"/>
+ <module name="GenericWhitespace"/>
<module name="WhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
</module>
http://git-wip-us.apache.org/repos/asf/commons-lang/blob/5cdac9cf/src/main/java/org/apache/commons/lang3/ClassUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/ClassUtils.java b/src/main/java/org/apache/commons/lang3/ClassUtils.java
index 28500a5..67b07f8 100644
--- a/src/main/java/org/apache/commons/lang3/ClassUtils.java
+++ b/src/main/java/org/apache/commons/lang3/ClassUtils.java
@@ -1418,7 +1418,7 @@ public class ClassUtils {
final Iterator<Class<?>> wrapped = classes.iterator();
return new Iterator<Class<?>>() {
- Iterator<Class<?>> interfaces = Collections.<Class<?>> emptySet().iterator();
+ Iterator<Class<?>> interfaces = Collections.<Class<?>>emptySet().iterator();
@Override
public boolean hasNext() {
http://git-wip-us.apache.org/repos/asf/commons-lang/blob/5cdac9cf/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java b/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
index 16b26ed..52d0c87 100644
--- a/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
+++ b/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
@@ -744,7 +744,7 @@ public class ExceptionUtils {
*/
public static <R> R rethrow(final Throwable throwable) {
// claim that the typeErasure invocation throws a RuntimeException
- return ExceptionUtils.<R, RuntimeException> typeErasure(throwable);
+ return ExceptionUtils.<R, RuntimeException>typeErasure(throwable);
}
/**
http://git-wip-us.apache.org/repos/asf/commons-lang/blob/5cdac9cf/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java b/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
index 42a34e6..4256b10 100644
--- a/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
@@ -535,7 +535,7 @@ public class TypeUtilsTest<B> {
public void testTypesSatisfyVariables() throws SecurityException,
NoSuchMethodException {
final Map<TypeVariable<?>, Type> typeVarAssigns = new HashMap<>();
- final Integer max = TypeUtilsTest.<Integer> stub();
+ final Integer max = TypeUtilsTest.<Integer>stub();
typeVarAssigns.put(getClass().getMethod("stub").getTypeParameters()[0], Integer.class);
assertTrue(TypeUtils.typesSatisfyVariables(typeVarAssigns));
typeVarAssigns.clear();