Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 60 for NullPointerException (0.09 sec)

  1. 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)
  2. src/test/java/jcifs/dcerpc/msrpc/MsrpcLookupSidsTest.java

            });
        }
    
        @Test
        void constructor_shouldThrowExceptionWithNullSids() {
            // Act & Assert - Null SID array causes NPE when accessing length
            assertThrows(NullPointerException.class, () -> {
                new MsrpcLookupSids(mockPolicyHandle, null);
            });
        }
    
        @Test
        void constructor_shouldSetCorrectSuperclassParameters() throws Exception {
            // Arrange
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.6K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb2/io/Smb2FlushRequestTest.java

            Smb2FlushRequest requestWithNull = new Smb2FlushRequest(mockConfig, null);
            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
    - 11.5K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/fess/suggest/SuggesterResourceLoadingTest.java

            }
        }
    
        /**
         * Test that try-with-resources handles null InputStream correctly.
         * Verifies that null InputStream doesn't cause NullPointerException during close.
         */
        @Test
        public void testTryWithResources_nullInputStreamSafety() {
            // This test demonstrates that try-with-resources handles null safely
            try (InputStream is = null) {
    Registered: Sat Dec 20 13:04:59 UTC 2025
    - Last Modified: Mon Nov 24 03:40:05 UTC 2025
    - 9.6K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb1/http/NtlmHttpURLConnection.java

            connection.setDefaultUseCaches(defaultUseCaches);
        }
    
        @Override
        public void setRequestProperty(final String key, final String value) {
            if (key == null) {
                throw new NullPointerException();
            }
            final List values = new ArrayList();
            values.add(value);
            boolean found = false;
            final Iterator entries = requestProperties.entrySet().iterator();
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 22.1K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. 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() {
            // Given
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  10. 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)
Back to top