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

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

Description

assert Not Null

License

LGPL

Declaration

public static void assertNotNull(String message, Object val) 

Method Source Code

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

public class Main {
    public static void assertNotNull(String message, Object val) {
        if (message != null)
            assert val != null : message;
        else//  ww w.j av  a 2 s . c  o  m
            assert val != null;
    }

    public static void assertNotNull(Object val) {
        assertNotNull(null, val);
    }
}

Related

  1. assertNotNull(Object... params)
  2. assertNotNull(Object... params)
  3. assertNotNull(String errorMessage, Object... args)
  4. assertNotNull(String fieldName, Object object)
  5. assertNotNull(String message, Object object)
  6. assertNotNull(String variableName, Object value)
  7. assertNotNull(StringBuilder buffer)
  8. assertNotNull(T exception, Object... objects)
  9. assertNotNull(T o)