Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 3 of 3 for validatePort (0.06 seconds)

  1. src/main/java/jcifs/util/InputValidator.java

        }
    
        /**
         * Validates a port number
         *
         * @param port the port number to validate
         * @throws IllegalArgumentException if port is invalid
         */
        public static void validatePort(int port) {
            if (port < 1 || port > 65535) {
                throw new IllegalArgumentException("Invalid port number: " + port);
            }
        }
    
        /**
         * Validates timeout value
         *
    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)
  2. src/test/java/jcifs/util/InputValidatorTest.java

            assertDoesNotThrow(() -> InputValidator.validatePort(445));
            assertDoesNotThrow(() -> InputValidator.validatePort(139));
            assertDoesNotThrow(() -> InputValidator.validatePort(1));
            assertDoesNotThrow(() -> InputValidator.validatePort(65535));
    
            assertThrows(IllegalArgumentException.class, () -> InputValidator.validatePort(0));
    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)
  3. android/guava/src/com/google/common/net/InternetDomainName.java

        int lastIndex = parts.size() - 1;
    
        // Validate the last part specially, as it has different syntax rules.
    
        if (!validatePart(parts.get(lastIndex), true)) {
          return false;
        }
    
        for (int i = 0; i < lastIndex; i++) {
          String part = parts.get(i);
          if (!validatePart(part, false)) {
            return false;
          }
        }
    
        return true;
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 03 21:21:59 GMT 2026
    - 26.2K bytes
    - Click Count (0)
Back to Top