- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 86 for NPE (0.36 sec)
-
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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)