]> iEval git - fonbot.git/commitdiff
Throw NPE when toNonNull gets a null
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 10 Aug 2013 11:32:05 +0000 (14:32 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 10 Aug 2013 11:32:05 +0000 (14:32 +0300)
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.019805 seconds and 4 git commands to generate.