changeset 7646:91ae0cb93f70

remove unneeded generics
author mduigou
date Thu, 14 Mar 2013 10:10:22 -0700
parents b4d0ae8455be
children 12cd3e52947f
files src/share/classes/java/util/Objects.java
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/Objects.java	Thu Mar 14 12:06:51 2013 -0400
+++ b/src/share/classes/java/util/Objects.java	Thu Mar 14 10:10:22 2013 -0700
@@ -236,16 +236,15 @@
      *      filter(Objects::isNull)
      * </pre>
      *
-     * @param <T> Type of the reference.
-     * @param t a reference to be checked against null.
+     * @param obj a reference to be checked against null.
      * @return {@code true} if the provided reference is null otherwise returns
      * {@code false}.
      *
      * @see java.util.function.Predicate
      * @since 1.8y
      */
-    public static <T> boolean isNull(T t) {
-        return t == null;
+    public static boolean isNull(Object obj) {
+        return obj == null;
     }
 
     /**
@@ -257,15 +256,14 @@
      *   filter(Objects::nonNull)
      * </pre>
      *
-     * @param <T> Type of the reference.
-     * @param t a reference to be checked against null.
+     * @param obj a reference to be checked against null.
      * @return {@code true} if the provided reference is non-null otherwise
      * returns {@code false}.
      *
      * @see java.util.function.Predicate
      * @since 1.8
      */
-    public static <T> boolean nonNull(T t) {
-        return t != null;
+    public static boolean nonNull(Object obj) {
+        return obj != null;
     }
 }