- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 105 for NullPointerException (0.17 sec)
-
src/test/java/jcifs/internal/smb1/net/NetServerEnum2Test.java
setFieldValue(netServerEnum2, "subCommand", SmbComTransaction.NET_SERVER_ENUM3); byte[] dst = new byte[1024]; // Should throw NullPointerException when lastName is null for NET_SERVER_ENUM3 assertThrows(NullPointerException.class, () -> { netServerEnum2.writeParametersWireFormat(dst, 0); }); } @Test
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 19.7K bytes - Viewed (0) -
src/main/java/jcifs/smb/NtlmUtil.java
* * @param password the password to hash * @return nt password hash */ public static byte[] getNTHash(final String password) { if (password == null) { throw new NullPointerException("Password parameter is required"); } final MessageDigest md4 = Crypto.getMD4(); md4.update(Strings.getUNIBytes(password)); return md4.digest(); } /**Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 15.1K bytes - Viewed (0) -
src/test/java/jcifs/DialectVersionTest.java
assertThrows(IllegalArgumentException.class, () -> { DialectVersion.valueOf("INVALID"); }); // Test valueOf with null assertThrows(NullPointerException.class, () -> { DialectVersion.valueOf(null); }); } @Test @DisplayName("Should maintain SMB2 flag consistency") void testSMB2FlagConsistency() {
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/com/SmbComTreeDisconnectTest.java
*/ @Test @DisplayName("Test constructor throws NullPointerException with null configuration") public void testConstructorWithNullConfig() { // When & Then - should throw NullPointerException since ServerMessageBlock calls config.getPid() NullPointerException exception = assertThrows(NullPointerException.class, () -> { smbComTreeDisconnect = new SmbComTreeDisconnect(null); });Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 18.5K bytes - Viewed (0) -
src/test/java/jcifs/smb/NtlmUtilTest.java
assertEquals(16, hash2.length, "NT hash should be 16 bytes"); } @Test @DisplayName("getNTHash: null password throws NPE with message") void testGetNTHash_null() { NullPointerException ex = assertThrows(NullPointerException.class, () -> NtlmUtil.getNTHash((String) null)); assertEquals("Password parameter is required", ex.getMessage()); } @ParameterizedTest
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 12K bytes - Viewed (1) -
src/test/java/jcifs/dcerpc/DcerpcBindTest.java
DcerpcBind bindWithNullBinding = new DcerpcBind(null, mockHandle); // When/Then assertThrows(NullPointerException.class, () -> { bindWithNullBinding.encode_in(mockBuffer); }, "Should throw NullPointerException when binding is null"); } @Test @DisplayName("encode_in should use default constructor values")
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 22.7K bytes - Viewed (0) -
src/test/java/jcifs/smb/SessionSetupHandlerTest.java
@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)); } @Test @DisplayName("Happy path: class is loadable via fully qualified name") void testClassForName() throws Exception { // ActRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.3K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/trans/TransTransactNamedPipeResponseTest.java
TransTransactNamedPipeResponse nullBufferResponse = new TransTransactNamedPipeResponse(mockConfig, null); byte[] buffer = new byte[100]; assertThrows(NullPointerException.class, () -> nullBufferResponse.readDataWireFormat(buffer, 0, 50)); } @Test void testReadDataWireFormatEmptyOutputBuffer() throws SMBProtocolDecodingException { // Test with empty outputBuffer
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.5K bytes - Viewed (0) -
src/test/java/org/codelibs/core/exception/SRuntimeExceptionTest.java
System.out.println(ex.getMessage()); } /** * @throws Exception */ @Test public void testGetCause() throws Exception { final Throwable t = new NullPointerException("test"); final ClRuntimeException ex = new ClRuntimeException("ECL0017", asArray(t), t); assertThat(ex.getCause(), is(t)); ex.printStackTrace(); }
Registered: Sat Dec 20 08:55:33 UTC 2025 - Last Modified: Sat May 10 01:32:17 UTC 2025 - 1.6K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/Smb2EncryptionContextTest.java
@DisplayName("Should throw exception for null encryption key") void testNullEncryptionKey() { // When/Then assertThrows(NullPointerException.class, () -> { new Smb2EncryptionContext(1, DialectVersion.SMB311, null, testDecryptionKey); }, "Should throw NullPointerException for null encryption key"); } @Test @DisplayName("Should throw exception for null decryption key")Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 44.1K bytes - Viewed (0)