Created
November 14, 2025 21:28
-
-
Save douglas444/595a6da87cd47b0d1c27d620fdaca2b2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Assert { | |
| private Assert() { | |
| } | |
| public static void required(Object... objects) { | |
| for (int i = 0, objectsLength = objects.length; i < objectsLength; i++) { | |
| if (objects[i] == null || (objects[i] instanceof String && ((String) objects[i]).isBlank())) { | |
| throw new DomainException("Parameter " + i + " is required"); | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment