Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 72 for NPE (0.01 sec)

  1. src/test/java/jcifs/smb1/util/Base64Test.java

        }
    
        @Test
        @DisplayName("encode should throw NPE on null input")
        void testEncodeNull() {
            assertThrows(NullPointerException.class, () -> Base64.encode(null));
        }
    
        @Test
        @DisplayName("decode should throw NPE on null input")
        void testDecodeNull() {
            assertThrows(NullPointerException.class, () -> Base64.decode(null));
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb1/smb1/NtlmChallengeTest.java

            @Test
            @DisplayName("toString with null challenge throws NPE")
            void testToStringWithNullChallengeThrowsNPE() {
                UniAddress dc = mock(UniAddress.class);
                when(dc.toString()).thenReturn("ANYSERVER");
    
                NtlmChallenge nc = new NtlmChallenge(null, dc);
    
                // Hexdump.toHexString will throw NPE when accessing challenge.length
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/CredentialsInternalTest.java

            TestCredentials creds = new TestCredentials("DOM", false, false, new Subject(), false);
            // Act & Assert
            NullPointerException npe = assertThrows(NullPointerException.class, () -> creds.unwrap(null));
            assertEquals("type", npe.getMessage());
        }
    
        @Test
        @DisplayName("clone returns a distinct copy with same properties")
        void clone_returns_copy() {
            // Arrange
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb/SmbResourceLocatorInternalTest.java

        }
    
        // Invalid input: null reqPath leads to NPE from implementation
        @Test
        @DisplayName("handleDFSReferral throws NPE on null reqPath")
        void handleDfsReferralNullPathThrows() {
            when(locator.handleDFSReferral(any(), isNull())).thenThrow(new NullPointerException("reqPath"));
            NullPointerException npe = assertThrows(NullPointerException.class, () -> locator.handleDFSReferral(referral, null));
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.9K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/Kerb5ContextTest.java

            assertTrue(ex.getMessage().contains("Failed to calculate MIC"));
        }
    
        @Test
        @DisplayName("calculateMIC with null data throws NPE")
        void calculateMIC_nullData() {
            assertThrows(NullPointerException.class, () -> ctx.calculateMIC(null));
        }
    
        @Test
        @DisplayName("verifyMIC delegates to GSS and succeeds")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb1/dcerpc/ndr/NdrHyperTest.java

        }
    
        /**
         * Ensure encode throws NPE when passed a null buffer.
         */
        @Test
        @DisplayName("Encode with null buffer throws NullPointerException")
        public void testEncodeNullBuffer() throws NdrException {
            NdrHyper hyper = new NdrHyper(5L);
            assertThrows(NullPointerException.class, () -> hyper.encode(null));
        }
    
        /**
         * Ensure decode throws NPE when passed a null buffer.
         */
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.3K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb1/trans/SmbComTransactionTest.java

        }
    
        @Test
        @DisplayName("Test write operations")
        void testWriteOperations() {
            byte[] dst = new byte[1024];
    
            // Initialize transaction buffer to avoid NPE
            transaction.setBuffer(new byte[SmbComTransaction.TRANSACTION_BUF_SIZE]);
    
            // Test parameter words wire format
            int paramWords = transaction.writeParameterWordsWireFormat(dst, 0);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.7K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb1/http/NtlmHttpServletRequestTest.java

            // Constructor accepts null principal without throwing exception
            NtlmHttpServletRequest request = new NtlmHttpServletRequest(mockRequest, null);
    
            // getRemoteUser() will throw NPE when trying to call getName() on null principal
            assertThrows(NullPointerException.class, () -> request.getRemoteUser());
            assertNull(request.getUserPrincipal());
            assertEquals("NTLM", request.getAuthType());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 04:51:33 UTC 2025
    - 3.4K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb/SmbTreeHandleImplTest.java

            assertFalse(handle.isSMB2());
        }
    
        @Test
        @DisplayName("Null treeConnection throws NPE")
        void constructorNullTreeConnection() {
            // Null treeConnection throws NPE when acquire() is called
            assertThrows(NullPointerException.class, () -> new SmbTreeHandleImpl(resourceLoc, null));
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.4K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/SmbPipeInputStreamTest.java

        class CtorValidation {
            @Test
            @DisplayName("null handle throws NPE")
            void nullHandle() {
                assertThrows(NullPointerException.class, () -> new SmbPipeInputStream(null, tree));
            }
    
            @Test
            @DisplayName("null tree throws NPE")
            void nullTree() {
                assertThrows(NullPointerException.class, () -> new SmbPipeInputStream(handle, null));
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
Back to top