Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 114 for NullPointerException (8.33 sec)

  1. 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)
  2. src/test/java/jcifs/smb/SmbRandomAccessFileTest.java

            SmbRandomAccessFile raf = newInstance("rw", false, true, false);
            assertThrows(NullPointerException.class, () -> raf.read((byte[]) null));
            assertThrows(NullPointerException.class, () -> raf.writeBytes(null));
            assertThrows(NullPointerException.class, () -> raf.writeChars(null));
            assertThrows(NullPointerException.class, () -> raf.writeUTF(null));
        }
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb1/netbios/SocketInputStreamTest.java

        @DisplayName("Reading with null array throws NullPointerException")
        void readNullArrayThrowsException() {
            // Create stream with valid message header and data
            byte[] data = new byte[] { 1 };
            InputStream in = new ByteArrayInputStream(concat(messageHeader(1), data));
            SocketInputStream sis = new SocketInputStream(in);
    
            // Should throw NullPointerException when reading with null array
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb/SmbCopyUtilTest.java

        void openCopyTargetFile_nullDest_throwsNPE() {
            // Arrange
            SmbFile dest = null;
    
            // Act + Assert
            assertThrows(NullPointerException.class, () -> SmbCopyUtil.openCopyTargetFile(dest, SmbConstants.ATTR_NORMAL, false));
        }
    
        // --- Tests for copyFile exception handling branch ---
    
        @Nested
        class CopyFileExceptions {
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.1K bytes
    - Viewed (0)
  5. 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)
  6. src/test/java/jcifs/smb1/smb1/SmbSessionTest.java

            // Create a real NtlmPasswordAuthentication instance
            auth = new NtlmPasswordAuthentication("TESTDOMAIN", "testuser", "testpass");
    
            // Initialize ServerData to avoid NullPointerException
            SmbTransport.ServerData serverData = transport.new ServerData();
            serverData.security = 0; // Set to 0 or appropriate value for SECURITY_SHARE
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/lock/Smb2LockRequestTest.java

            @DisplayName("Should handle null file ID during write")
            void testWriteWithNullFileId() {
                request.setFileId(null);
                byte[] buffer = new byte[256];
    
                assertThrows(NullPointerException.class, () -> request.writeBytesWireFormat(buffer, 0));
            }
    
            @Test
            @DisplayName("Should handle file ID of different sizes")
            void testWriteWithDifferentFileIdSizes() {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 25.3K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. src/test/java/jcifs/pac/PacLogonInfoTest.java

                unicodeString.check("");
            });
    
            // The implementation has a bug - it doesn't handle null properly
            // It throws NullPointerException instead of returning null
            // This is a known issue in the production code
            assertThrows(NullPointerException.class, () -> {
                unicodeString.check(null);
            });
        }
    
        @Test
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.3K bytes
    - Viewed (0)
Back to top