- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 86 for NPE (0.01 sec)
-
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) -
src/test/java/jcifs/smb/SessionSetupHandlerTest.java
assertThrows(NoSuchMethodException.class, () -> SessionSetupHandler.class.getDeclaredConstructor()); } @Test @DisplayName("Invalid: resolving class by null name throws NPE") void testClassForNameWithNull() { // Intent: demonstrate defensive behavior with null when resolving this type by name assertThrows(NullPointerException.class, () -> Class.forName(null)); }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.3K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/msrpc/MsrpcLookupSidsTest.java
new MsrpcLookupSids(null, testSids); }); } @Test void constructor_shouldThrowExceptionWithNullSids() { // Act & Assert - Null SID array causes NPE when accessing length assertThrows(NullPointerException.class, () -> { new MsrpcLookupSids(mockPolicyHandle, null); }); } @Test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.6K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedSet.java
} @Override public boolean contains(@Nullable Object object) { try { // This set never contains null. We need to explicitly check here // because some comparator might throw NPE (e.g. the natural ordering). return object != null && sortedDelegate.contains(object); } catch (ClassCastException e) { return false; } } @Override
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Aug 06 18:32:41 UTC 2025 - 15.5K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/validation/CustomSizeValidatorTest.java
} catch (final NullPointerException e) { // This is expected if the implementation requires a non-null context assertTrue("NPE is acceptable for null context in this implementation", true); } } private CustomSize createBasicAnnotation() { return new CustomSize() { @Override
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Tue Aug 19 14:09:36 UTC 2025 - 5.2K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbNamedPipeTest.java
assertEquals("Named pipes are only valid on IPC$", ex.getMessage()); } @Test @DisplayName("Null context throws NPE (invalid input)") void nullContextThrows() { assertThrows(NullPointerException.class, () -> new SmbNamedPipe("smb://server/IPC$/foo", 0, null)); } @Test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.2K bytes - Viewed (0) -
src/test/java/jcifs/smb/FileEntryTest.java
assertEquals(value, actual, label); } @Test @DisplayName("Calling a method on null reference throws NPE") void nullReference_throwsNPE() { // Arrange FileEntry e = null; // Act & Assert: demonstrate invalid usage results in NPE assertThrows(NullPointerException.class, () -> e.getName()); } @Nested
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 10K bytes - Viewed (0) -
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) -
src/test/java/org/codelibs/fess/dict/DictionaryExceptionTest.java
} public void test_toString() { // Test toString method String message = "Dictionary parse error"; Exception cause = new NullPointerException("NPE occurred"); DictionaryException exception = new DictionaryException(message, cause); String toStringResult = exception.toString(); assertNotNull(toStringResult);
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Tue Aug 19 14:09:36 UTC 2025 - 6.4K bytes - Viewed (0) -
compat/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepository.java
} @Override public Artifact find(Artifact artifact) { File artifactFile = new File(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); if (artifactFile.exists()) { artifact.setResolved(true);
Registered: Sun Sep 07 03:35:12 UTC 2025 - Last Modified: Fri Jun 06 14:28:57 UTC 2025 - 7.7K bytes - Viewed (0)