- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 87 for NPE (0.01 sec)
-
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")); } } public void test_setError_withEmptyMessage() {
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Sat Jul 12 07:34:10 UTC 2025 - 17.1K bytes - Viewed (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(); }); } @ParameterizedTest
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 17.5K bytes - Viewed (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);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.7K bytes - Viewed (0) -
guava/src/com/google/common/reflect/Types.java
if (ownerType == null) { return newParameterizedType(rawType, arguments); } // ParameterizedTypeImpl constructor already checks, but we want to throw NPE before IAE checkNotNull(arguments); checkArgument(rawType.getEnclosingClass() != null, "Owner type for unenclosed %s", rawType); return new ParameterizedTypeImpl(ownerType, rawType, arguments); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Sep 03 14:03:14 UTC 2025 - 23.5K bytes - Viewed (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 */
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 14.6K bytes - Viewed (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;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 36.8K bytes - Viewed (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));
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 18.1K bytes - Viewed (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"); } }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 22.7K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/query/QueryFieldConfigTest.java
// When highlightedFields is null, the method should handle it gracefully // or throw an exception. Test the actual behavior. queryFieldConfig.highlightedFields(stream -> { // If it doesn't throw NPE, it should provide an empty stream assertEquals(0, stream.count()); }); } public void test_init_withInvalidDefaultFields() { // Test with invalid default field formats
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Tue Aug 19 14:09:36 UTC 2025 - 33.2K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/msrpc/lsarpcTest.java
// Set the deferred field directly since it's a public field mockNdrBuffer.deferred = mockDeferredNdrBuffer; // Set up deferred buffer chain to avoid NPE mockDeferredNdrBuffer.deferred = mockDeferredNdrBuffer; // Self-reference to avoid NPE lenient().when(mockNdrBuffer.derive(anyInt())).thenReturn(mockDeferredNdrBuffer); lenient().when(mockDeferredNdrBuffer.derive(anyInt())).thenReturn(mockDeferredNdrBuffer);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 60.8K bytes - Viewed (0)