
no.nav.common.utils.AssertUtils Maven / Gradle / Ivy
The newest version!
package no.nav.common.utils;
public class AssertUtils {
public static T assertNotNull(T object) {
return assertNotNull(object, null);
}
public static T assertNotNull(T object, String errorMessage) {
if (object == null) {
throw new IllegalStateException(errorMessage);
}
return object;
}
public static boolean assertTrue(boolean bool) {
if (!bool) {
throw new IllegalStateException();
}
return bool;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy