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
|
||||
public static class FailableStream<O extends Object> {
|
||||
public static class FailableStream<O> {
|
||||
|
||||
private Stream<O> stream;
|
||||
private boolean terminated;
|
||||
|
@ -545,7 +545,7 @@ public class Streams {
|
|||
* @return a {@link Collector} which collects all the input elements into an
|
||||
* 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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -329,7 +329,7 @@ public class MethodUtils {
|
|||
Objects.requireNonNull(object, "object");
|
||||
args = ArrayUtils.nullToEmpty(args);
|
||||
parameterTypes = ArrayUtils.nullToEmpty(parameterTypes);
|
||||
final Class<? extends Object> cls = object.getClass();
|
||||
final Class<?> cls = object.getClass();
|
||||
final Method method = getAccessibleMethod(cls, methodName, parameterTypes);
|
||||
if (method == null) {
|
||||
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.
|
||||
*/
|
||||
public static class FailableStream<T extends Object> {
|
||||
public static class FailableStream<T> {
|
||||
|
||||
private Stream<T> stream;
|
||||
private boolean terminated;
|
||||
|
@ -777,7 +777,7 @@ public class Streams {
|
|||
* @param <T> the type of the input elements
|
||||
* @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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue