- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 54 for NPE (0.01 sec)
-
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/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/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/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/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) -
src/test/java/jcifs/smb/SmbFileHandleImplTest.java
lenient().when(tree.isConnected()).thenReturn(connected); lenient().when(tree.isSMB2()).thenReturn(smb2); } @Test @DisplayName("Constructor with null tree throws NPE (byte[] fid variant)") void constructor_nullTree_byteArray_throwsNPE() { lenient().when(cfg.isTraceResourceUsage()).thenReturn(false); assertThrows(NullPointerException.class,
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.3K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/com/SmbComQueryInformationTest.java
} @Test @DisplayName("writeBytesWireFormat with null path returns minimal bytes") void testWriteWhenPathIsNull() { // When path is null, Strings.getOEMBytes returns empty array, not NPE when(mockConfig.getOemEncoding()).thenReturn("windows-1252"); SmbComQueryInformation nullPathCmd = new SmbComQueryInformation(mockConfig, null); byte[] buffer = new byte[50];Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.9K bytes - Viewed (0)