- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 86 for NPE (0.01 sec)
-
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) -
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) -
src/test/java/jcifs/smb/HandlerTest.java
// Arrange Handler handler = newHandlerWith(mockCtx); // Act & Assert assertThrows(NullPointerException.class, () -> handler.openConnection(null), "Null URL should throw NPE"); verify(mockCtx, never()).getConfig(); // no interaction expected on failure before construction } @Test @DisplayName("openConnection uses SingletonContext when no context provided")
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.8K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbRenewableCredentialsTest.java
@DisplayName("Edge: calling renew() on a null reference throws NPE") void renewOnNullReferenceThrowsNPE() { // 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
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7K bytes - Viewed (0) -
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) -
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) -
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) -
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) -
src/test/java/jcifs/netbios/NameQueryResponseTest.java
// This method directly calls a superclass method (readResourceRecordWireFormat). // We need to setup fields to avoid NPE when parsing // Set recordName for parsing Field recordNameField = NameServicePacket.class.getDeclaredField("recordName"); recordNameField.setAccessible(true);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14.4K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/com/SmbComSetInformationResponseTest.java
@Mock private Configuration mockConfig; private SmbComSetInformationResponse response; @BeforeEach void setUp() { // Setup mock configuration to avoid NPE when(mockConfig.getPid()).thenReturn(12345); response = new SmbComSetInformationResponse(mockConfig); } @Test @DisplayName("Constructor accepts valid config")
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 4.1K bytes - Viewed (0)