Throw NPE when toNonNull gets a null
[fonbot.git] / src / ro / ieval / fonbot / Utils.java
index 9a23d04afcd09f585b16c448274176fdbca51bff..ce275fab8c325e224f91b0361252fbec93002df4 100644 (file)
@@ -190,10 +190,8 @@ public final class Utils {
         * @throws AssertionError if the given object is null
         */
        public static <T> T toNonNull(@Nullable T object) throws AssertionError{
-               if(object==null){
-                       Log.wtf(Utils.class.getName(), "toNonNull called with null");
-                       throw new AssertionError("Log.wtf did not terminate the process");
-               }
+               if(object==null)
+                       throw new NullPointerException();
                return object;
        }
 
This page took 0.009465 seconds and 4 git commands to generate.