Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 105 for NullPointerException (0.09 sec)

  1. src/test/java/jcifs/smb/SmbRenewableCredentialsTest.java

            // Arrange: null reference to the interface
            SmbRenewableCredentials creds = null;
    
            // Act + Assert: invoking renew() on null triggers NullPointerException
            assertThrows(NullPointerException.class, () -> {
                // Intentional NPE through dereference of a null interface reference
                creds.renew();
            });
        }
    
        @Test
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb1/com/SmbComSeekResponseTest.java

        }
    
        @Test
        @DisplayName("readParameterWordsWireFormat with null buffer - throws NullPointerException")
        void testReadParameterWordsWithNullBuffer() {
            assertThrows(NullPointerException.class, () -> response.readParameterWordsWireFormat(null, 0));
        }
    
        @Test
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb1/trans/TransCallNamedPipeResponseTest.java

            assertNotNull(nullBufferResponse);
    
            // But trying to read data should cause NullPointerException
            byte[] buffer = new byte[10];
            assertThrows(NullPointerException.class, () -> nullBufferResponse.readDataWireFormat(buffer, 0, 5));
        }
    
        @Test
        void testReadDataWireFormatWithNegativeLength() {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.8K bytes
    - Viewed (0)
  4. fess-crawler/src/test/java/org/codelibs/fess/crawler/CrawlerStatusTest.java

        /**
         * Test valueOf method with null
         */
        public void test_valueOf_null() {
            try {
                CrawlerStatus.valueOf(null);
                fail("Should throw NullPointerException for null value");
            } catch (NullPointerException e) {
                // Expected
            }
        }
    
        /**
         * Test name method
         */
        public void test_name() {
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Wed Sep 03 14:42:53 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top