- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 57 for NPE (2.26 sec)
-
src/test/java/jcifs/smb/SmbRenewableCredentialsTest.java
@DisplayName("Edge: calling renew() on a null reference throws NPE") void renewOnNullReferenceThrowsNPE() { // Arrange: null reference to the interface SmbRenewableCredentials creds = null; // Act + Assert: invoking renew() on null triggers NullPointerException assertThrows(NullPointerException.class, () -> { // Intentional NPE through dereference of a null interface referenceRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbTreeConnectionTraceTest.java
})); } @ParameterizedTest(name = "Invalid usage causes NPE: {0}") @MethodSource("npePublicGetters") void getters_withoutTree_throwNPE(String name, org.junit.jupiter.api.function.Executable call) { // Each call is invalid without a held tree and should throw NPE assertThrows(NullPointerException.class, call); }Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 8.7K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/SmbFileTest.java
assertEquals("smb1://", new SmbFile("smb1://server/").getParent()); // Test parent of root - currently throws NPE due to bug in SmbFile.getParent() // when authority is null. This is a known issue in the legacy implementation. // For now, we expect the NPE to maintain backward compatibility assertThrows(NullPointerException.class, () -> new SmbFile("smb1://").getParent()); }
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 8.5K bytes - Viewed (0) -
src/test/java/jcifs/smb/SpnegoContextTest.java
} @Test @DisplayName("initSecContext with null buffer and non-zero len throws NPE") void testInitSecContextNullBufferNonZeroLen() throws Exception { SpnegoContext ctx = newContext(); // A null buffer with non-zero len leads to NPE while slicing input assertThrows(NullPointerException.class, () -> ctx.initSecContext(null, 0, 1));Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.3K bytes - Viewed (0) -
src/test/java/jcifs/netbios/NameQueryResponseTest.java
// This method directly calls a superclass method (readResourceRecordWireFormat). // We need to setup fields to avoid NPE when parsing // Set recordName for parsing Field recordNameField = NameServicePacket.class.getDeclaredField("recordName"); recordNameField.setAccessible(true);
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14.4K bytes - Viewed (0) -
src/main/java/jcifs/smb/SmbTreeHandleImpl.java
throw new RuntimeCIFSException("Usage count dropped below zero"); } } @Override protected void finalize() throws Throwable { try { // Add null check to prevent NPE if object was not fully constructed if (this.usageCount != null && this.usageCount.get() != 0) { log.warn("Tree handle was not properly released, performing emergency cleanup: "
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 11.1K 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: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.6K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbCopyUtilTest.java
verify(dest, times(1)).getAttributes(); verify(dest, never()).setPathInformation(anyInt(), anyLong(), anyLong(), anyLong()); } @Test @DisplayName("openCopyTargetFile throws NPE on null dest (invalid input)") void openCopyTargetFile_nullDest_throwsNPE() { // Arrange SmbFile dest = null; // Act + Assert
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.1K 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: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 10K bytes - Viewed (0) -
src/test/java/jcifs/smb/SecurityBlobTest.java
assertEquals("", blob.toString(), "toString() should be empty for empty buffer"); } // Ensures set(null) resets the buffer to empty and does not NPE @Test @DisplayName("set(null) resets to empty") void set_null_resetsToEmpty() { // Arrange SecurityBlob blob = new SecurityBlob(new byte[] { 1, 2, 3 }); // Act
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.4K bytes - Viewed (0)