Cleanup: remove redundant casts
[yangtools.git] / common / util / src / main / java / org / opendaylight / yangtools / util / SingletonSet.java
index 9587d1104efcfb4340ab8d64725b5f34436059eb..420172dc75ccb2d106e4fae98c51715ad4f92dbe 100644 (file)
@@ -58,7 +58,7 @@ public abstract class SingletonSet<E> implements Set<E>, Immutable, Serializable
         if (element == null) {
             return (SingletonSet<E>) NULL_SINGLETON;
         }
-        return new RegularSingletonSet<E>(element);
+        return new RegularSingletonSet<>(element);
     }
 
     public abstract E getElement();
@@ -91,7 +91,7 @@ public abstract class SingletonSet<E> implements Set<E>, Immutable, Serializable
             return a;
         }
 
-        return (T[]) new Object[] { (T) getElement() };
+        return (T[]) new Object[] {getElement()};
     }
 
     @Override