- Sort Score
- Num 10 results
- Language All
Results 1 - 2 of 2 for requireNonEmpty (0.06 seconds)
-
src/main/java/jcifs/util/InputValidator.java
* @param fieldName the field name for error reporting * @return the validated string * @throws IllegalArgumentException if string is null or empty */ public static String requireNonEmpty(String value, String fieldName) { if (value == null) { throw new IllegalArgumentException(fieldName + " cannot be null"); } if (value.trim().isEmpty()) {Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 13.5K bytes - Click Count (0) -
src/test/java/jcifs/util/InputValidatorTest.java
assertEquals("test", InputValidator.requireNonEmpty("test", "field")); assertThrows(IllegalArgumentException.class, () -> InputValidator.requireNonEmpty(null, "field")); assertThrows(IllegalArgumentException.class, () -> InputValidator.requireNonEmpty("", "field")); assertThrows(IllegalArgumentException.class, () -> InputValidator.requireNonEmpty(" ", "field")); } @Test
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 11.9K bytes - Click Count (0)