Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 86 for NPE (0.36 sec)

  1. src/test/java/jcifs/internal/smb1/com/SmbComSetInformationResponseTest.java

        @Mock
        private Configuration mockConfig;
    
        private SmbComSetInformationResponse response;
    
        @BeforeEach
        void setUp() {
            // Setup mock configuration to avoid NPE
            when(mockConfig.getPid()).thenReturn(12345);
    
            response = new SmbComSetInformationResponse(mockConfig);
        }
    
        @Test
        @DisplayName("Constructor accepts valid config")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 4.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SessionSetupHandlerTest.java

            assertThrows(NoSuchMethodException.class, () -> SessionSetupHandler.class.getDeclaredConstructor());
        }
    
        @Test
        @DisplayName("Invalid: resolving class by null name throws NPE")
        void testClassForNameWithNull() {
            // Intent: demonstrate defensive behavior with null when resolving this type by name
            assertThrows(NullPointerException.class, () -> Class.forName(null));
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.3K bytes
    - Viewed (0)
  3. src/test/java/jcifs/dcerpc/msrpc/MsrpcLookupSidsTest.java

                new MsrpcLookupSids(null, testSids);
            });
        }
    
        @Test
        void constructor_shouldThrowExceptionWithNullSids() {
            // Act & Assert - Null SID array causes NPE when accessing length
            assertThrows(NullPointerException.class, () -> {
                new MsrpcLookupSids(mockPolicyHandle, null);
            });
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.6K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/fess/validation/CustomSizeValidatorTest.java

            } catch (final NullPointerException e) {
                // This is expected if the implementation requires a non-null context
                assertTrue("NPE is acceptable for null context in this implementation", true);
            }
        }
    
        private CustomSize createBasicAnnotation() {
            return new CustomSize() {
                @Override
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/SmbNamedPipeTest.java

                assertEquals("Named pipes are only valid on IPC$", ex.getMessage());
            }
    
            @Test
            @DisplayName("Null context throws NPE (invalid input)")
            void nullContextThrows() {
                assertThrows(NullPointerException.class, () -> new SmbNamedPipe("smb://server/IPC$/foo", 0, null));
            }
    
            @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  6. src/test/java/org/codelibs/fess/dict/DictionaryExceptionTest.java

        }
    
        public void test_toString() {
            // Test toString method
            String message = "Dictionary parse error";
            Exception cause = new NullPointerException("NPE occurred");
            DictionaryException exception = new DictionaryException(message, cause);
    
            String toStringResult = exception.toString();
            assertNotNull(toStringResult);
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/FileEntryTest.java

            assertEquals(value, actual, label);
        }
    
        @Test
        @DisplayName("Calling a method on null reference throws NPE")
        void nullReference_throwsNPE() {
            // Arrange
            FileEntry e = null;
            // Act & Assert: demonstrate invalid usage results in NPE
            assertThrows(NullPointerException.class, () -> e.getName());
        }
    
        @Nested
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10K bytes
    - Viewed (0)
  8. compat/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java

                                return authInfo;
                            }
                        }
                    }
                }
            }
    
            // empty one to prevent NPE
            return new AuthenticationInfo();
        }
    
        @Override
        public ProxyInfo getProxy(String protocol) {
            MavenSession session = legacySupport.getSession();
    
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Fri Jun 06 14:28:57 UTC 2025
    - 6.5K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/fess/exception/ScheduledJobExceptionTest.java

            // Test throwing and catching the exception with cause
            String expectedMessage = "Job execution failed with error";
            Throwable expectedCause = new NullPointerException("NPE occurred");
            boolean exceptionCaught = false;
    
            try {
                throw new ScheduledJobException(expectedMessage, expectedCause);
            } catch (ScheduledJobException e) {
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 6.8K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/fess/exception/StorageExceptionTest.java

            assertTrue(exception1.getCause() instanceof java.io.IOException);
    
            StorageException exception2 = new StorageException("NPE", new NullPointerException("Null reference"));
            assertTrue(exception2.getCause() instanceof NullPointerException);
    
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 7K bytes
    - Viewed (0)
Back to top