- Sort Score
- Num 10 results
- Language All
Results 81 - 90 of 105 for NPE (0.03 seconds)
-
src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateRequestTest.java
@Test @DisplayName("Should handle null maximum version") void testNullMaximumVersion() { // Given when(mockConfig.getMaximumVersion()).thenReturn(null); // When/Then - Should throw NPE based on actual implementation assertThrows(NullPointerException.class, () -> { new Smb2NegotiateRequest(mockConfig, 0); }); } @TestCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 20.7K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/util/WebApiUtilTest.java
} catch (NullPointerException e) { // Expected - WebApiException constructor cannot handle null exception assertTrue("Should get expected NPE message", e.getMessage().contains("Cannot invoke \"java.lang.Exception.getMessage()\" because \"e\" is null")); } } @Test public void test_setError_withEmptyMessage() {
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Sun Jan 11 08:43:05 GMT 2026 - 17.4K bytes - Click Count (0) -
src/test/java/jcifs/config/DelegatingConfigurationTest.java
void testConstructorWithNullDelegate() { // When & Then assertDoesNotThrow(() -> { new DelegatingConfiguration(null); }, "Constructor should accept null delegate (though it would cause NPE on use)"); } @Test @DisplayName("Constructor should store delegate reference") void testConstructorStoresDelegate() { // Given Configuration testDelegate = mock(Configuration.class);
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 20.7K bytes - Click Count (0) -
src/test/java/jcifs/internal/dfs/DfsReferralRequestBufferTest.java
// The implementation doesn't check for null in constructor buffer = new DfsReferralRequestBuffer(path, maxReferralLevel); assertNotNull(buffer); // Will throw NPE when trying to call size() or encode() assertThrows(NullPointerException.class, () -> { buffer.size(); }); } @ParameterizedTestCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 17.5K bytes - Click Count (0) -
guava/src/com/google/common/collect/ImmutableSortedSet.java
// Pretend the comparator can compare anything. If it turns out it can't // compare a and b, we should get a CCE or NPE on the subsequent line. Only methods // that are spec'd to throw CCE and NPE should call this. @SuppressWarnings({"unchecked", "nullness"}) Comparator<@Nullable Object> unsafeComparator = (Comparator<@Nullable Object>) comparator;
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Sep 23 17:50:58 GMT 2025 - 39.1K bytes - Click Count (0) -
src/test/java/jcifs/internal/dfs/DfsReferralDataInternalTest.java
DfsReferralDataInternal result = mockReferralData.combine(null); assertNotNull(result); // Test with concrete implementation - combine with null throws NPE assertThrows(NullPointerException.class, () -> concreteImplementation.combine(null)); } @Test @DisplayName("Should handle null in append") void testAppendWithNull() {
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 28.2K bytes - Click Count (0) -
src/test/java/jcifs/dcerpc/DcerpcBindTest.java
lenient().doNothing().when(mockBuffer).enc_ndr_small(anyInt()); DcerpcBind bindWithParams = new DcerpcBind(mockBinding, mockHandle); // When/Then - Expect NPE due to UUID.encode() limitations assertThrows(NullPointerException.class, () -> { bindWithParams.encode_in(mockBuffer); }, "Should fail on UUID encoding"); } }
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 22.7K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbRandomAccessFileTest.java
doThrow(new AssertionError("ensureOpen should not be called")).when(raf).ensureOpen(); raf.write(new byte[1], 0, 0); } @Test @DisplayName("Null inputs: read(byte[]) and write* with nulls throw NPE") void nullInputs_throwNPE() throws Exception { SmbRandomAccessFile raf = newInstance("rw", false, true, false); assertThrows(NullPointerException.class, () -> raf.read((byte[]) null));
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 18.1K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/ImmutableSortedSet.java
// Pretend the comparator can compare anything. If it turns out it can't // compare a and b, we should get a CCE or NPE on the subsequent line. Only methods // that are spec'd to throw CCE and NPE should call this. @SuppressWarnings({"unchecked", "nullness"}) Comparator<@Nullable Object> unsafeComparator = (Comparator<@Nullable Object>) comparator;
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Sep 23 17:50:58 GMT 2025 - 36.8K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/collect/SetViewTest.java
} public void testEquals_otherSetContainsThrows() { new EqualsTester() .addEqualityGroup(new SetContainsThrows()) .addEqualityGroup(intersection(singleton(null), singleton(null))) // NPE .addEqualityGroup(intersection(singleton(0), singleton(0))) // CCE .testEquals(); } /** Returns a {@link Set} with a {@link Set#size()} of {@code size}. */
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 29.9K bytes - Click Count (0)