Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 300 for closer (0.03 sec)

  1. android/guava-tests/test/com/google/common/reflect/ClassPathTest.java

        manifest.getMainAttributes().put(Attributes.Name.CLASS_PATH, jarFile.getName());
    
        Closer closer = Closer.create();
        try {
          FileOutputStream fileOut = closer.register(new FileOutputStream(jarFile));
          JarOutputStream jarOut = closer.register(new JarOutputStream(fileOut, manifest));
          for (String entry : entries) {
            jarOut.putNextEntry(new ZipEntry(entry));
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 20:58:01 UTC 2025
    - 23K bytes
    - Viewed (0)
  2. guava/src/com/google/common/math/LongMath.java

                deltaToCeiling++;
              }
    
              int diff = Long.compare(deltaToFloor, deltaToCeiling);
              if (diff < 0) { // closer to floor
                return roundFloorAsDouble;
              } else if (diff > 0) { // closer to ceiling
                return roundCeilingAsDouble;
              }
              // halfway between the representable values; do the half-whatever logic
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Aug 29 16:20:07 UTC 2025
    - 46.8K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/LinkedListMultimap.java

        /**
         * Constructs a new iterator over all values for the specified key starting at the specified
         * index. This constructor is optimized so that it starts at either the head or the tail,
         * depending on which is closer to the specified index. This allows adds to the tail to be done
         * in constant time.
         *
         * @throws IndexOutOfBoundsException if index is invalid
         */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 26.6K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb/NtlmPasswordAuthenticatorTest.java

            assertFalse(auth.isClosed());
    
            // Close the authenticator
            auth.close();
    
            // Verify it's closed
            assertTrue(auth.isClosed());
            // Cannot check password after closing as it now throws IllegalStateException
            // This is actually good security practice - closed authenticators cannot be accessed
    
            // Verify multiple closes don't cause issues
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 23.3K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/SmbWatchHandleImplTest.java

        }
    
        // close() should close underlying handle with 0L when valid
        @Test
        @DisplayName("close() closes underlying handle when valid")
        void close_validHandle_invokesClose() throws Exception {
            when(handle.isValid()).thenReturn(true);
            SmbWatchHandleImpl sut = new SmbWatchHandleImpl(handle, 0, false);
    
            sut.close();
    
            verify(handle, times(1)).close(0L);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/DirFileEntryEnumIterator1Test.java

            // Close should have sent FindClose2 exactly once
            ArgumentCaptor<SmbComFindClose2> captor = ArgumentCaptor.forClass(SmbComFindClose2.class);
            verify(tree, times(1)).send(captor.capture(), any());
            assertNotNull(captor.getValue());
    
            // Tree handle is released after close
            verify(tree, atLeastOnce()).release();
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/DirFileEntryEnumIteratorBaseTest.java

            assertEquals("one", it.next().getName()); // consume initial
            // Next call should handle CIFSException and close iterator
            assertFalse(it.hasNext()); // After error, hasNext should return false
    
            // Assert
            verify(tree, times(1)).release();
        }
    
        @Test
        @DisplayName("close() closes when there is a next element and releases handle")
        void explicitClose() throws Exception {
            // Arrange
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.5K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/SmbFileHandleImplTest.java

            h.close(777L);
    
            // Verify SMB2 close path
            verify(tree, times(1)).send(isA(Smb2CloseRequest.class), eq(RequestParam.NO_RETRY));
            // Tree is always released in finally
            verify(tree, times(1)).release();
        }
    
        @Test
        @DisplayName("close(long) sends SMB1 close request and releases tree when SMB1")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  9. src/test/java/jcifs/util/SmbCircuitBreakerTest.java

            // Need successThreshold (2) consecutive successes to close the circuit
            // Second success should close the circuit (threshold is 2)
            result = circuitBreaker.executeWithCircuitBreaker(() -> "success 1");
            assertEquals("success 1", result, "Should execute second success");
            assertEquals(State.CLOSED, circuitBreaker.getState(), "Circuit should be CLOSED after success threshold");
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 23.2K bytes
    - Viewed (0)
  10. src/main/java/jcifs/util/ResourceManager.java

            }
    
            @Override
            public void close() throws Exception {
                if (closed) {
                    return;
                }
    
                try {
                    resource.close();
                } finally {
                    closed = true;
                    manager.markClosed(resourceId);
                    manager.unregisterResource(resourceId);
                }
            }
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 16.2K bytes
    - Viewed (0)
Back to top