Extends clauses are redundant as java.lang.Object is a supertype for all classes. (#937)
This commit is contained in:
parent
ceb7fbb033
commit
1d66289a50
|
@ -73,7 +73,7 @@ public class Streams {
|
||||||
* @deprecated Use {@link org.apache.commons.lang3.stream.Streams.FailableStream}.
|
* @deprecated Use {@link org.apache.commons.lang3.stream.Streams.FailableStream}.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static class FailableStream<O extends Object> {
|
public static class FailableStream<O> {
|
||||||
|
|
||||||
private Stream<O> stream;
|
private Stream<O> stream;
|
||||||
private boolean terminated;
|
private boolean terminated;
|
||||||
|
@ -545,7 +545,7 @@ public class Streams {
|
||||||
* @return a {@link Collector} which collects all the input elements into an
|
* @return a {@link Collector} which collects all the input elements into an
|
||||||
* array, in encounter order
|
* array, in encounter order
|
||||||
*/
|
*/
|
||||||
public static <O extends Object> Collector<O, ?, O[]> toArray(final Class<O> pElementType) {
|
public static <O> Collector<O, ?, O[]> toArray(final Class<O> pElementType) {
|
||||||
return new ArrayCollector<>(pElementType);
|
return new ArrayCollector<>(pElementType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -329,7 +329,7 @@ public class MethodUtils {
|
||||||
Objects.requireNonNull(object, "object");
|
Objects.requireNonNull(object, "object");
|
||||||
args = ArrayUtils.nullToEmpty(args);
|
args = ArrayUtils.nullToEmpty(args);
|
||||||
parameterTypes = ArrayUtils.nullToEmpty(parameterTypes);
|
parameterTypes = ArrayUtils.nullToEmpty(parameterTypes);
|
||||||
final Class<? extends Object> cls = object.getClass();
|
final Class<?> cls = object.getClass();
|
||||||
final Method method = getAccessibleMethod(cls, methodName, parameterTypes);
|
final Method method = getAccessibleMethod(cls, methodName, parameterTypes);
|
||||||
if (method == null) {
|
if (method == null) {
|
||||||
throw new NoSuchMethodException("No such accessible method: " + methodName + "() on object: " + cls.getName());
|
throw new NoSuchMethodException("No such accessible method: " + methodName + "() on object: " + cls.getName());
|
||||||
|
|
|
@ -174,7 +174,7 @@ public class Streams {
|
||||||
*
|
*
|
||||||
* @param <T> The streams element type.
|
* @param <T> The streams element type.
|
||||||
*/
|
*/
|
||||||
public static class FailableStream<T extends Object> {
|
public static class FailableStream<T> {
|
||||||
|
|
||||||
private Stream<T> stream;
|
private Stream<T> stream;
|
||||||
private boolean terminated;
|
private boolean terminated;
|
||||||
|
@ -777,7 +777,7 @@ public class Streams {
|
||||||
* @param <T> the type of the input elements
|
* @param <T> the type of the input elements
|
||||||
* @return a {@link Collector} which collects all the input elements into an array, in encounter order
|
* @return a {@link Collector} which collects all the input elements into an array, in encounter order
|
||||||
*/
|
*/
|
||||||
public static <T extends Object> Collector<T, ?, T[]> toArray(final Class<T> pElementType) {
|
public static <T> Collector<T, ?, T[]> toArray(final Class<T> pElementType) {
|
||||||
return new ArrayCollector<>(pElementType);
|
return new ArrayCollector<>(pElementType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue