Make whitespace use around generic tokens consistent and add a checkstyle rule to enforce it.
This commit is contained in:
parent
07f537120f
commit
5cdac9cfd5
|
@ -55,6 +55,7 @@ limitations under the License.
|
||||||
<module name="LeftCurly"/>
|
<module name="LeftCurly"/>
|
||||||
<module name="NeedBraces"/>
|
<module name="NeedBraces"/>
|
||||||
<module name="RightCurly"/>
|
<module name="RightCurly"/>
|
||||||
|
<module name="GenericWhitespace"/>
|
||||||
<module name="WhitespaceAfter"/>
|
<module name="WhitespaceAfter"/>
|
||||||
<module name="NoWhitespaceBefore"/>
|
<module name="NoWhitespaceBefore"/>
|
||||||
</module>
|
</module>
|
||||||
|
|
|
@ -1418,7 +1418,7 @@ public class ClassUtils {
|
||||||
final Iterator<Class<?>> wrapped = classes.iterator();
|
final Iterator<Class<?>> wrapped = classes.iterator();
|
||||||
|
|
||||||
return new Iterator<Class<?>>() {
|
return new Iterator<Class<?>>() {
|
||||||
Iterator<Class<?>> interfaces = Collections.<Class<?>> emptySet().iterator();
|
Iterator<Class<?>> interfaces = Collections.<Class<?>>emptySet().iterator();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasNext() {
|
public boolean hasNext() {
|
||||||
|
|
|
@ -744,7 +744,7 @@ public class ExceptionUtils {
|
||||||
*/
|
*/
|
||||||
public static <R> R rethrow(final Throwable throwable) {
|
public static <R> R rethrow(final Throwable throwable) {
|
||||||
// claim that the typeErasure invocation throws a RuntimeException
|
// claim that the typeErasure invocation throws a RuntimeException
|
||||||
return ExceptionUtils.<R, RuntimeException> typeErasure(throwable);
|
return ExceptionUtils.<R, RuntimeException>typeErasure(throwable);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -535,7 +535,7 @@ public class TypeUtilsTest<B> {
|
||||||
public void testTypesSatisfyVariables() throws SecurityException,
|
public void testTypesSatisfyVariables() throws SecurityException,
|
||||||
NoSuchMethodException {
|
NoSuchMethodException {
|
||||||
final Map<TypeVariable<?>, Type> typeVarAssigns = new HashMap<>();
|
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);
|
typeVarAssigns.put(getClass().getMethod("stub").getTypeParameters()[0], Integer.class);
|
||||||
assertTrue(TypeUtils.typesSatisfyVariables(typeVarAssigns));
|
assertTrue(TypeUtils.typesSatisfyVariables(typeVarAssigns));
|
||||||
typeVarAssigns.clear();
|
typeVarAssigns.clear();
|
||||||
|
|
Loading…
Reference in New Issue