Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for AutoCloseable (0.07 sec)

  1. fess-crawler/src/test/java/org/codelibs/fess/crawler/pool/CrawlerPooledObjectFactoryTest.java

            public static void resetInstanceCount() {
                instanceCount = 0;
            }
        }
    
        /**
         * Closeable test component for testing AutoCloseable resource handling
         */
        public static class CloseableTestComponent implements AutoCloseable {
            private static AtomicInteger instanceCounter = new AtomicInteger(0);
            private static AtomicInteger closeCounter = new AtomicInteger(0);
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Thu Nov 20 13:07:01 UTC 2025
    - 36.7K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbFileOutputStreamTest.java

            assertNotNull(outputStream);
    
            // Verify the AutoCloseable resources were closed
            verify(autoCloseableMockTreeHandle).close();
            verify(autoCloseableMockFileHandle).close();
        }
    
        @Test
        void testConstructorWithAppendFlag() throws IOException, CIFSException {
            // Given
            // Mock the AutoCloseable tree handle behavior
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  3. src/main/java/jcifs/util/ResourceManager.java

            final String resourceType;
            final WeakReference<AutoCloseable> resourceRef;
            final PhantomReference<AutoCloseable> phantomRef;
            final long creationTime;
            final StackTraceElement[] allocationStackTrace;
            volatile boolean closed;
    
            ResourceHolder(String resourceId, AutoCloseable resource, ReferenceQueue<AutoCloseable> queue) {
                this.resourceId = resourceId;
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 16.2K bytes
    - Viewed (0)
  4. src/test/java/jcifs/SmbSessionTest.java

    class SmbSessionTest {
    
        @Nested
        @DisplayName("AutoCloseable Contract Tests")
        class AutoCloseableContractTest {
    
            @Test
            @DisplayName("Should implement AutoCloseable interface")
            void shouldImplementAutoCloseable() {
                assertTrue(AutoCloseable.class.isAssignableFrom(SmbSession.class), "SmbSession should implement AutoCloseable interface");
            }
    
            @Test
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/NtlmPasswordAuthenticatorTest.java

            assertNotNull(passwordArray);
            assertArrayEquals("TestPass123!".toCharArray(), passwordArray);
        }
    
        /**
         * Test AutoCloseable implementation
         */
        @Test
        @DisplayName("Test AutoCloseable with try-with-resources")
        public void testAutoCloseable() {
            char[] testPassword = "AutoClosePass123!".toCharArray();
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 23.3K bytes
    - Viewed (0)
  6. CLAUDE.md

    - `AtomicLong` for counters (`CrawlerContext.accessCount`)
    - `volatile` for status flags
    - Synchronized blocks for critical sections
    - Thread-local storage via `CrawlingParameterUtil`
    
    **Resource Management**:
    - `AutoCloseable` throughout
    - `DeferredFileOutputStream` for large responses (temp files for >1MB)
    - Connection pooling with limits
    - Background temp file deletion via `FileUtil.deleteInBackground()`
    
    **Fault Tolerance**:
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Fri Nov 28 17:31:34 UTC 2025
    - 10.7K bytes
    - Viewed (0)
  7. src/test/java/jcifs/SmbResourceTest.java

        class InterfaceContractTests {
    
            @Test
            @DisplayName("SmbResource should extend AutoCloseable")
            void testInterfaceInheritance() {
                // Then
                assertTrue(AutoCloseable.class.isAssignableFrom(SmbResource.class), "SmbResource should extend AutoCloseable");
            }
    
            @Test
            @DisplayName("SmbResource should have all required methods")
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 35K bytes
    - Viewed (0)
  8. src/test/java/jcifs/EmptyIteratorTest.java

            assertTrue(emptyIterator instanceof Iterator, "Should implement Iterator");
            assertTrue(emptyIterator instanceof AutoCloseable, "Should implement AutoCloseable");
        }
    
        @Test
        @DisplayName("hasNext should always return false")
        void testHasNextAlwaysReturnsFalse() {
            // When & Then
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb/SmbTreeConnection.java

        /**
         * Close the tree connection (implements AutoCloseable)
         *
         * This method provides a standard way to close resources using try-with-resources.
         * It delegates to the release() method to properly clean up the connection.
         */
        @Override
        public void close() {
            if (log.isDebugEnabled()) {
                log.debug("Closing SmbTreeConnection via AutoCloseable.close()");
            }
            release();
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 30.4K bytes
    - Viewed (1)
  10. fess-crawler/src/main/java/org/codelibs/fess/crawler/Crawler.java

     * including adding URLs to the queue, filtering URLs, managing crawler threads,
     * and handling the overall crawling lifecycle.
     *
     * <p>It implements the Runnable interface to be executed in a separate thread,
     * and the AutoCloseable interface to ensure resources are properly released after use.
     *
     * <p>The crawler uses several services and components, such as UrlQueueService, DataService,
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Mon Nov 24 03:59:47 UTC 2025
    - 17K bytes
    - Viewed (0)
Back to top