- Sort Score
- Num 10 results
- Language All
Results 71 - 80 of 105 for NPE (0.06 seconds)
-
src/test/java/org/codelibs/fess/ldap/LdapUserTest.java
testEnv.put("test.key", "test.value"); ldapUser = new LdapUser(testEnv, "testuser"); ComponentUtil.register(new SystemHelper(), "systemHelper"); // Register a mock LdapManager to avoid NPE ComponentUtil.register(new LdapManager() { // Override methods that are called in tests }, "ldapManager"); } @Override
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Fri Mar 13 23:01:26 GMT 2026 - 16.9K bytes - Click Count (0) -
guava-testlib/src/com/google/common/testing/NullPointerTester.java
* package-private, I feel OK with just not testing them for NPE. * * Note that testing casValue is particularly dangerous because it uses Unsafe under some * versions of Java, and apparently Unsafe can cause SIGSEGV instead of NPE—almost as if it's * not safe. */ concat( stream(AbstractFuture.class.getDeclaredMethods()),Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Jul 14 14:44:08 GMT 2025 - 25.4K bytes - Click Count (0) -
src/test/java/jcifs/smb/SIDCacheImplTest.java
void resolveSids_invalidInputs() throws Exception { SIDCacheImpl cache = new SIDCacheImpl(mock(CIFSContext.class)); CIFSContext ctx = mock(CIFSContext.class); // Null sids array -> NPE assertThrows(NullPointerException.class, () -> cache.resolveSids(ctx, "server", null, 0, 1)); // Bad offset/length leads to ArrayIndexOutOfBoundsException
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 14K bytes - Click Count (0) -
src/test/java/jcifs/smb/SIDTest.java
assertTrue(ex.getMessage().contains("domain sid")); } @Test @DisplayName("Static toByteArray null input throws NPE") void testStaticToByteArrayNull() { assertThrows(NullPointerException.class, () -> SID.toByteArray(null)); } } @Nested @DisplayName("Tests requiring mocks")
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 15.8K bytes - Click Count (0) -
impl/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.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); return artifact; } @OverrideCreated: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Fri Jun 06 14:28:57 GMT 2025 - 12.1K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb1/net/NetServerEnum2Test.java
assertEquals(lastName.toUpperCase(), writtenLastName); } @Test @DisplayName("Test writeParametersWireFormat with null lastName for NET_SERVER_ENUM3 throws NPE") void testWriteParametersWireFormatNetServerEnum3NullLastName() throws Exception { String domain = "WORKGROUP"; int serverTypes = NetServerEnum2.SV_TYPE_ALL;
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 19.7K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbFileTest.java
// Mock configuration methods when(mockConfig.getPid()).thenReturn(1234); when(mockCifsContext.getConfig()).thenReturn(mockConfig); // Mock credentials to prevent NPE when(mockCredentials.getUserDomain()).thenReturn("DOMAIN"); when(mockCifsContext.getCredentials()).thenReturn(mockCredentials); // Create URL handlerCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 20.8K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java
ContainsBothWithMultisetFirst reMultisetFirst = reserialize(multisetFirst); assertThat(reMultisetFirst.a.isEmpty()).isFalse(); // The following NPE is a side effect of our changes to avoid mutating `final` fields. assertThrows(NullPointerException.class, () -> reMultisetFirst.z.multiset.isEmpty()); ContainsBothWithContainsMultisetFirst reContainsMultisetFirst =Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 17:47:10 GMT 2026 - 16.3K bytes - Click Count (0) -
src/test/java/jcifs/dcerpc/DcerpcHandleTest.java
void testToStringWithNullBinding() { // Given: Handle with null binding TestDcerpcHandle handleWithNullBinding = new TestDcerpcHandle(mockContext); // When/Then: Should throw NPE for null binding (expected behavior) assertThrows(NullPointerException.class, () -> handleWithNullBinding.toString()); } @Test @DisplayName("Should handle session key retrieval")
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 15.3K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java
public void testConstructor() { AtomicDoubleArray aa = new AtomicDoubleArray(SIZE); for (int i = 0; i < SIZE; i++) { assertBitEquals(0.0, aa.get(i)); } } /** constructor with null array throws NPE */ public void testConstructor2NPE() { double[] a = null; assertThrows(NullPointerException.class, () -> new AtomicDoubleArray(a)); } /** constructor with array is of same size and has all elements */
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 17:47:10 GMT 2026 - 14.8K bytes - Click Count (0)