Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for validateTimeout (0.2 sec)

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

        void testTimeoutValidation() {
            assertDoesNotThrow(() -> InputValidator.validateTimeout(1000L, "test"));
            assertDoesNotThrow(() -> InputValidator.validateTimeout(0L, "test"));
            assertDoesNotThrow(() -> InputValidator.validateTimeout(3600000L, "test"));
    
            assertThrows(IllegalArgumentException.class, () -> InputValidator.validateTimeout(-1L, "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 timeout timeout in milliseconds
         * @param fieldName the field name for error reporting
         * @throws IllegalArgumentException if timeout is invalid
         */
        public static void validateTimeout(long timeout, String fieldName) {
            if (timeout < 0) {
                throw new IllegalArgumentException(fieldName + " cannot be negative: " + timeout);
            }
            if (timeout > 3600000L) { // Max 1 hour
    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