Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for validateArrayLength (1.22 sec)

  1. src/test/java/jcifs/util/InputValidatorTest.java

            assertDoesNotThrow(() -> InputValidator.validateArrayLength(array, 16, "test"));
    
            assertThrows(IllegalArgumentException.class, () -> InputValidator.validateArrayLength(null, 16, "test"));
            assertThrows(IllegalArgumentException.class, () -> InputValidator.validateArrayLength(array, 15, "test"));
            assertThrows(IllegalArgumentException.class, () -> InputValidator.validateArrayLength(array, 17, "test"));
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 11.9K bytes
    - Viewed (0)
  2. src/main/java/jcifs/util/InputValidator.java

         * @param expectedLength the expected length
         * @param fieldName the field name for error reporting
         * @throws IllegalArgumentException if array is invalid
         */
        public static void validateArrayLength(byte[] array, int expectedLength, String fieldName) {
            if (array == null) {
                throw new IllegalArgumentException(fieldName + " cannot be null");
            }
            if (array.length != expectedLength) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 13.5K bytes
    - Viewed (0)
Back to top