- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 114 for NullPointerException (1.82 sec)
-
src/test/java/jcifs/smb/SmbFileInputStreamTest.java
@DisplayName("Edge and invalid inputs") class EdgeCases { @Test @DisplayName("read(null) throws NullPointerException") void readNullArrayThrows() throws Exception { SmbFileInputStream in = newStream(); assertThrows(NullPointerException.class, () -> in.read(null)); } @Test @DisplayName("readDirect with len <= 0 returns 0")Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 12.8K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/msrpc/MsrpcShareGetInfoTest.java
infoField.setAccessible(true); infoField.set(msrpcShareGetInfo, null); // This should throw NullPointerException assertThrows(NullPointerException.class, () -> { msrpcShareGetInfo.getSecurity(); }); } @Test void testInheritedFields() throws Exception {
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14.3K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/Smb2TransformHeaderTest.java
}); } @Test @DisplayName("Should handle null nonce") void testNullNonce() { // When/Then assertThrows(NullPointerException.class, () -> { transformHeader.setNonce(null); }); } @Test @DisplayName("Should handle invalid nonce length") void testInvalidNonceLength() { // GivenRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.7K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/create/Smb2CloseRequestTest.java
Smb2CloseRequest requestWithNull = new Smb2CloseRequest(mockConfig, null, testFileName); byte[] buffer = new byte[256]; // Should throw NullPointerException when trying to copy null array assertThrows(NullPointerException.class, () -> { requestWithNull.writeBytesWireFormat(buffer, 0); }); } @Test @DisplayName("readBytesWireFormat should return 0")
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/dtyp/ACETest.java
ace.allow = true; ace.access = 0x001200A9; ace.flags = 0x00; ace.sid = null; // This should throw NullPointerException as the current implementation doesn't handle null SID assertThrows(NullPointerException.class, () -> ace.toString()); } @Test @DisplayName("Test decode creates new SID instance") void testDecodeCreatesNewSID() {Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 13.6K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbFileHandleImplTest.java
assertThrows(NullPointerException.class, () -> new SmbFileHandleImpl(cfg, new byte[] { 1, 2 }, null, "//server/share", 0, 0, 0, 0, 0L)); } @Test @DisplayName("Constructor with null cfg throws NPE") void constructor_nullCfg_throwsNPE() { stubValidTree(7L, true, true);
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/smb2/info/Smb2QueryInfoResponseTest.java
@Test @DisplayName("Test getInfo with class when info is null throws NullPointerException") void testGetInfoWithClassWhenInfoIsNull() { response = new Smb2QueryInfoResponse(mockConfig, (byte) 1, (byte) 2); assertThrows(NullPointerException.class, () -> response.getInfo(FileInternalInfo.class), "Should throw NullPointerException when info is null"); } @TestRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 24.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateRequestTest.java
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 @DisplayName("Should properly align buffer writes") void testBufferAlignment() {
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.7K bytes - Viewed (0) -
src/test/java/jcifs/internal/SmbBasicFileInfoTest.java
// Arrange SmbBasicFileInfo info = null; // Act & Assert: attempting to call any method on null should throw NPE Assertions.assertThrows(NullPointerException.class, () -> { // Intentionally dereference null to validate exception behavior // This checks that callers must handle null references defensively info.getSize(); });Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.8K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/HandlerTest.java
assertTrue(conn instanceof SmbFile); } @Test @DisplayName("openConnection throws NPE for null URL") void testOpenConnectionWithNullUrl() { // Act & Assert assertThrows(NullPointerException.class, () -> handler.openConnection(null)); } @Test @DisplayName("URL created with handler parses SMB URL correctly") void testUrlCreationWithHandler() throws Exception {
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 5.4K bytes - Viewed (0)