io.activej.json.JsonValidationUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of activej-json Show documentation
Show all versions of activej-json Show documentation
JSON Codecs, Codec Factory and JSON utils for ActiveJ project.
The newest version!
package io.activej.json;
import org.jetbrains.annotations.Nullable;
public class JsonValidationUtils {
public static T validateNotNull(@Nullable T reference) throws JsonValidationException {
if (reference != null) {
return reference;
}
throw new JsonValidationException();
}
public static void validateArgument(boolean expression) throws JsonValidationException {
if (!expression) {
throw new JsonValidationException();
}
}
}