Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 87 for NPE (0.01 sec)

  1. src/test/java/org/codelibs/fess/ldap/LdapUserTest.java

            testEnv.put("test.key", "test.value");
            ldapUser = new LdapUser(testEnv, "testuser");
    
            ComponentUtil.register(new SystemHelper(), "systemHelper");
    
            // Register a mock LdapManager to avoid NPE
            ComponentUtil.register(new LdapManager() {
                // Override methods that are called in tests
            }, "ldapManager");
        }
    
        @Override
        public void tearDown() throws Exception {
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 16.6K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/FileEntryAdapterIteratorTest.java

            assertEquals("Not supported", ex.getMessage());
        }
    
        @Test
        @DisplayName("Null delegate causes NPE")
        void nullDelegate() {
            assertThrows(NullPointerException.class, () -> {
                new FileEntryAdapterIterator(parent, null, null) {
                    @Override
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb1/net/NetServerEnum2Test.java

            assertEquals(lastName.toUpperCase(), writtenLastName);
        }
    
        @Test
        @DisplayName("Test writeParametersWireFormat with null lastName for NET_SERVER_ENUM3 throws NPE")
        void testWriteParametersWireFormatNetServerEnum3NullLastName() throws Exception {
            String domain = "WORKGROUP";
            int serverTypes = NetServerEnum2.SV_TYPE_ALL;
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb1/smb1/TestLockingTest.java

        @DisplayName("run method handles null URL gracefully")
        void testRunWithNullUrl() {
            TestLocking t = new TestLocking();
            t.url = null; // Null URL
            t.numIter = 0; // No iterations to avoid NPE
    
            // Should not throw exception
            assertDoesNotThrow(() -> t.run(), "run() should handle null URL gracefully");
            assertEquals(1, t.numComplete, "numComplete should still be incremented");
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateRequestTest.java

        @Test
        @DisplayName("Should handle null maximum version")
        void testNullMaximumVersion() {
            // Given
            when(mockConfig.getMaximumVersion()).thenReturn(null);
    
            // When/Then - Should throw NPE based on actual implementation
            assertThrows(NullPointerException.class, () -> {
                new Smb2NegotiateRequest(mockConfig, 0);
            });
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.7K bytes
    - Viewed (0)
  6. 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 28.2K bytes
    - Viewed (0)
  7. 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  8. 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.3K bytes
    - Viewed (0)
  9. 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14K bytes
    - Viewed (0)
  10. 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.6K bytes
    - Viewed (0)
Back to top