Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 87 for NPE (0.01 sec)

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

                }
                return true; // not reached in this test
            };
    
            // Act + Assert
            NullPointerException npe = assertThrows(NullPointerException.class, () -> filter.accept(null));
            assertEquals("file must not be null", npe.getMessage());
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/SmbBasicFileInfoTest.java

        }
    
        // --- Invalid/null usage: calling a method on null should throw NPE ---
        @Test
        void nullReference_throwsNullPointerException() {
            // Arrange
            SmbBasicFileInfo info = null;
    
            // Act & Assert: attempting to call any method on null should throw NPE
            Assertions.assertThrows(NullPointerException.class, () -> {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  3. compat/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java

                                return authInfo;
                            }
                        }
                    }
                }
            }
    
            // empty one to prevent NPE
            return new AuthenticationInfo();
        }
    
        @Override
        public ProxyInfo getProxy(String protocol) {
            MavenSession session = legacySupport.getSession();
    
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Fri Jun 06 14:28:57 UTC 2025
    - 6.5K bytes
    - Viewed (0)
  4. src/test/java/jcifs/dcerpc/msrpc/srvsvcTest.java

            shareInfo1.netname = "TestShare";
            shareInfo1.type = 1;
            shareInfo1.remark = "Test Remark";
    
            // Set up deferred buffer chain to avoid NPE
            mockDeferredBuffer.deferred = mockDeferredBuffer;
    
            shareInfo1.encode(mockNdrBuffer);
    
            // Verify the encode operations
            verify(mockNdrBuffer).align(4);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12K bytes
    - Viewed (0)
  5. guava/src/com/google/common/util/concurrent/ExecutionList.java

       * documentation.
       */
      public void add(Runnable runnable, Executor executor) {
        // Fail fast on a null. We throw NPE here because the contract of Executor states that it throws
        // NPE on null listener, so we propagate that contract up into the add method as well.
        checkNotNull(runnable, "Runnable was null.");
        checkNotNull(executor, "Executor was null.");
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/SmbTreeConnectionTraceTest.java

            }));
        }
    
        @ParameterizedTest(name = "Invalid usage causes NPE: {0}")
        @MethodSource("npePublicGetters")
        void getters_withoutTree_throwNPE(String name, org.junit.jupiter.api.function.Executable call) {
            // Each call is invalid without a held tree and should throw NPE
            assertThrows(NullPointerException.class, call);
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.7K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb1/smb1/SmbFileTest.java

                assertEquals("smb1://", new SmbFile("smb1://server/").getParent());
                // Test parent of root - currently throws NPE due to bug in SmbFile.getParent()
                // when authority is null. This is a known issue in the legacy implementation.
                // For now, we expect the NPE to maintain backward compatibility
                assertThrows(NullPointerException.class, () -> new SmbFile("smb1://").getParent());
            }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb1/smb1/AllocInfoTest.java

         * {@link NullPointerException}. This test is defensive; in real code it
         * would likely be handled elsewhere.
         */
        @Test
        @DisplayName("calling getters on null reference throws NPE")
        void testNullReference() {
            AllocInfo nullRef = null;
            assertThrows(NullPointerException.class, () -> nullRef.getCapacity());
            assertThrows(NullPointerException.class, () -> nullRef.getFree());
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.4K bytes
    - Viewed (0)
  9. compat/maven-compat/src/main/java/org/apache/maven/repository/UserLocalArtifactRepository.java

        @Override
        public Artifact find(Artifact artifact) {
            File artifactFile = new File(localRepository.getBasedir(), pathOf(artifact));
    
            // We need to set the file here or the resolver will fail with an NPE, not fully equipped to deal
            // with multiple local repository implementations yet.
            artifact.setFile(artifactFile);
    
            return artifact;
        }
    
        @Override
        public String getId() {
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/SpnegoContextTest.java

        }
    
        @Test
        @DisplayName("initSecContext with null buffer and non-zero len throws NPE")
        void testInitSecContextNullBufferNonZeroLen() throws Exception {
            SpnegoContext ctx = newContext();
            // A null buffer with non-zero len leads to NPE while slicing input
            assertThrows(NullPointerException.class, () -> ctx.initSecContext(null, 0, 1));
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.3K bytes
    - Viewed (0)
Back to top