Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 54 for NPE (0.02 sec)

  1. src/test/java/jcifs/internal/dfs/DfsReferralDataInternalTest.java

                DfsReferralDataInternal result = mockReferralData.combine(null);
                assertNotNull(result);
    
                // Test with concrete implementation - combine with null throws NPE
                assertThrows(NullPointerException.class, () -> concreteImplementation.combine(null));
            }
    
            @Test
            @DisplayName("Should handle null in append")
            void testAppendWithNull() {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 28.2K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbWatchHandleImplTest.java

            sut.close();
    
            verify(handle, never()).close(anyLong());
        }
    
        // Invalid input: constructing with null handle and invoking watch() NPEs
        @Test
        @DisplayName("Null handle causes NPE on watch() (invalid input)")
        void constructor_nullHandle_watch_throwsNPE() {
            SmbWatchHandleImpl sut = new SmbWatchHandleImpl(null, 0, false);
    
            assertThrows(NullPointerException.class, () -> {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  3. src/test/java/jcifs/dcerpc/DcerpcHandleTest.java

            void testToStringWithNullBinding() {
                // Given: Handle with null binding
                TestDcerpcHandle handleWithNullBinding = new TestDcerpcHandle(mockContext);
    
                // When/Then: Should throw NPE for null binding (expected behavior)
                assertThrows(NullPointerException.class, () -> handleWithNullBinding.toString());
            }
    
            @Test
            @DisplayName("Should handle session key retrieval")
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.3K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/dfs/DfsReferralRequestBufferTest.java

                // The implementation doesn't check for null in constructor
                buffer = new DfsReferralRequestBuffer(path, maxReferralLevel);
                assertNotNull(buffer);
    
                // Will throw NPE when trying to call size() or encode()
                assertThrows(NullPointerException.class, () -> {
                    buffer.size();
                });
            }
    
            @ParameterizedTest
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.5K bytes
    - Viewed (0)
  5. src/test/java/jcifs/config/DelegatingConfigurationTest.java

        void testConstructorWithNullDelegate() {
            // When & Then
            assertDoesNotThrow(() -> {
                new DelegatingConfiguration(null);
            }, "Constructor should accept null delegate (though it would cause NPE on use)");
        }
    
        @Test
        @DisplayName("Constructor should store delegate reference")
        void testConstructorStoresDelegate() {
            // Given
            Configuration testDelegate = mock(Configuration.class);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.7K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb2/lock/Smb2OplockBreakNotificationTest.java

                oplockLevelField.setAccessible(true);
                oplockLevelField.set(notification, (byte) 0x01);
    
                // The implementation calls Hexdump.toHexString which throws NPE on null
                // This test verifies the actual behavior
                assertThrows(NullPointerException.class, () -> notification.toString());
            }
    
            @ParameterizedTest
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.6K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SIDCacheImplTest.java

        void resolveSids_invalidInputs() throws Exception {
            SIDCacheImpl cache = new SIDCacheImpl(mock(CIFSContext.class));
            CIFSContext ctx = mock(CIFSContext.class);
    
            // Null sids array -> NPE
            assertThrows(NullPointerException.class, () -> cache.resolveSids(ctx, "server", null, 0, 1));
    
            // Bad offset/length leads to ArrayIndexOutOfBoundsException
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14K bytes
    - Viewed (0)
  8. fess-crawler/src/test/java/org/codelibs/fess/crawler/client/gcs/GcsClientTest.java

            } catch (final CrawlingAccessException e) {
                // ok
            }
        }
    
        public void test_accessTimeout_null_safety() {
            // Test that accessTimeoutTask null check prevents NPE
            GcsClient client = new GcsClient() {
                @Override
                protected ResponseData processRequest(final String uri, final boolean includeContent) {
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Thu Dec 11 08:38:29 UTC 2025
    - 19.6K bytes
    - Viewed (0)
  9. fess-crawler/src/test/java/org/codelibs/fess/crawler/client/ftp/FtpClientTest.java

                if (server != null) {
                    server.stop();
                }
            }
        }
    
        public void test_accessTimeout_null_safety() {
            // Test that accessTimeoutTask null check prevents NPE
            FtpClient client = new FtpClient() {
                @Override
                protected ResponseData getResponseData(final String uri, final boolean includeContent) {
                    // Simulate quick completion before timeout
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Mon Nov 24 03:59:47 UTC 2025
    - 21.5K bytes
    - Viewed (0)
  10. fess-crawler/src/test/java/org/codelibs/fess/crawler/client/storage/StorageClientTest.java

            } catch (final CrawlingAccessException e) {
                // ok
            }
        }
    
        public void test_accessTimeout_null_safety() {
            // Test that accessTimeoutTask null check prevents NPE
            StorageClient client = new StorageClient() {
                @Override
                protected ResponseData processRequest(final String uri, final boolean includeContent) {
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Mon Nov 24 03:59:47 UTC 2025
    - 20.9K bytes
    - Viewed (0)
Back to top