mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-07 02:28:25 +00:00
No need to embedded if test.
This commit is contained in:
parent
9e0b31180d
commit
73e0dfc494
@ -564,11 +564,9 @@ private static int[] findRecursiveTypes(final ParameterizedType parameterizedTyp
|
||||
parameterizedType.getActualTypeArguments().length);
|
||||
int[] indexesToRemove = {};
|
||||
for (int i = 0; i < filteredArgumentTypes.length; i++) {
|
||||
if (filteredArgumentTypes[i] instanceof TypeVariable<?>) {
|
||||
if (containsVariableTypeSameParametrizedTypeBound(((TypeVariable<?>) filteredArgumentTypes[i]),
|
||||
parameterizedType)) {
|
||||
indexesToRemove = ArrayUtils.add(indexesToRemove, i);
|
||||
}
|
||||
if ((filteredArgumentTypes[i] instanceof TypeVariable<?>) && containsVariableTypeSameParametrizedTypeBound(
|
||||
((TypeVariable<?>) filteredArgumentTypes[i]), parameterizedType)) {
|
||||
indexesToRemove = ArrayUtils.add(indexesToRemove, i);
|
||||
}
|
||||
}
|
||||
return indexesToRemove;
|
||||
|
@ -145,10 +145,8 @@ private void assertEvenNumbers(final List<Integer> output) {
|
||||
|
||||
protected <T extends Throwable> FailablePredicate<Integer, T> asIntPredicate(final T pThrowable) {
|
||||
return i -> {
|
||||
if (i.intValue() == 5) {
|
||||
if (pThrowable != null) {
|
||||
throw pThrowable;
|
||||
}
|
||||
if (i.intValue() == 5 && pThrowable != null) {
|
||||
throw pThrowable;
|
||||
}
|
||||
return i%2==0;
|
||||
};
|
||||
|
@ -55,10 +55,8 @@ protected <T extends Throwable> FailableConsumer<String, T> asIntConsumer(final
|
||||
|
||||
protected <T extends Throwable> FailablePredicate<Integer, T> asIntPredicate(final T pThrowable) {
|
||||
return i -> {
|
||||
if (i.intValue() == 5) {
|
||||
if (pThrowable != null) {
|
||||
throw pThrowable;
|
||||
}
|
||||
if (i.intValue() == 5 && pThrowable != null) {
|
||||
throw pThrowable;
|
||||
}
|
||||
return i % 2 == 0;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user