Java Assert Not Null assertNotNull(Object object, String message)

Here you can find the source of assertNotNull(Object object, String message)

Description

assert Not Null

License

Apache License

Declaration

public static void assertNotNull(Object object, String message) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static void assertNotNull(Object object) {
        assertNotNull(object, "Object may not be null.");
    }//ww  w.  ja  v  a2  s .c  o  m

    public static void assertNotNull(Object object, String message) {
        if (object == null) {
            throw new NullPointerException(message);
        }
    }
}

Related

  1. assertNotNull(Object obj, String name)
  2. assertNotNull(Object obj, String name)
  3. assertNotNull(Object object)
  4. assertNotNull(Object object, RuntimeException cause)
  5. assertNotNull(Object object, String description)
  6. assertNotNull(Object object, String message)
  7. assertNotNull(Object object, String message)
  8. assertNotNull(Object object, String param)
  9. assertNotNull(Object val)