Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 2 of 2 for validateArrayAllocation (0.15 seconds)

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

         * @param elementSize size of each element
         * @param maxElements maximum allowed elements
         * @throws SmbException if allocation would be too large
         */
        public void validateArrayAllocation(int size, int elementSize, int maxElements) throws SmbException {
            totalValidations.incrementAndGet();
    
            if (size < 0) {
                failedValidations.incrementAndGet();
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 16.6K bytes
    - Click Count (0)
  2. src/test/java/jcifs/util/ServerResponseValidatorTest.java

            validator.validateArrayAllocation(100, 10, 1000);
            validator.validateArrayAllocation(0, 10, 1000); // Zero size should be allowed
        }
    
        @Test
        public void testArrayAllocationNegativeSize() throws Exception {
            assertThrows(SmbException.class, () -> {
                validator.validateArrayAllocation(-1, 10, 1000);
            });
        }
    
        @Test
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 14.2K bytes
    - Click Count (0)
Back to Top