- Sort Score
- Result 10 results
- Languages All
Results 171 - 180 of 356 for NullPointerException (0.16 sec)
-
guava-testlib/src/com/google/common/collect/testing/testers/QueueOfferTester.java
expectAdded((E) null); } @CollectionFeature.Require(value = SUPPORTS_ADD, absent = ALLOWS_NULL_VALUES) public void testOffer_nullUnsupported() { assertThrows(NullPointerException.class, () -> getQueue().offer(null)); expectUnchanged(); expectNullMissingWhenNullUnsupported("Should not contain null after unsupported offer(null)"); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Nov 14 23:40:07 UTC 2024 - 2.3K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/collect/testing/MapTestSuiteBuilderTests.java
new WrappedHashMapGenerator() { @Override Map<String, String> wrap(HashMap<String, String> map) { if (map.containsKey(null)) { throw new NullPointerException(); } return new AbstractMap<String, String>() { @Override public Set<Entry<String, String>> entrySet() { return map.entrySet();
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu May 22 16:18:11 UTC 2025 - 11.4K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/BiMapEntrySetTester.java
@CollectionSize.Require(absent = ZERO) public void testSetValueNullUnsupported() { for (Entry<K, V> entry : getMap().entrySet()) { assertThrows(NullPointerException.class, () -> entry.setValue(null)); expectUnchanged(); } } @MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_VALUES}) @CollectionSize.Require(absent = ZERO)
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Nov 14 23:40:07 UTC 2024 - 3K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/CollectionCreationTester.java
@CollectionSize.Require(absent = ZERO) public void testCreateWithNull_unsupported() { E[] array = createArrayWithNullElement(); assertThrows( NullPointerException.class, () -> { Object unused = getSubjectGenerator().create(array); }); } /** * Returns the {@link Method} instance for {@link #testCreateWithNull_unsupported()} so that tests
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 3K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/MapGetTester.java
} @MapFeature.Require(absent = ALLOWS_NULL_KEY_QUERIES) public void testGet_nullNotContainedAndUnsupported() { try { assertNull("get(null) should return null or throw", get(null)); } catch (NullPointerException tolerated) { } } @MapFeature.Require(ALLOWS_NULL_KEYS) @CollectionSize.Require(absent = ZERO) public void testGet_nonNullWhenNullContained() { initMapWithNullKey();
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Nov 14 23:40:07 UTC 2024 - 3.1K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Dns.kt
private class DnsSystem : Dns { override fun lookup(hostname: String): List<InetAddress> { try { return InetAddress.getAllByName(hostname).toList() } catch (e: NullPointerException) { throw UnknownHostException("Broken system behaviour for dns lookup of $hostname").apply { initCause(e) } } } } }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 2.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/escape/ArrayBasedEscaperMapTest.java
/** * @author David Beaumont */ @GwtCompatible @NullUnmarked public class ArrayBasedEscaperMapTest extends TestCase { public void testNullMap() { assertThrows(NullPointerException.class, () -> ArrayBasedEscaperMap.create(null)); } public void testEmptyMap() { Map<Character, String> map = ImmutableMap.of(); ArrayBasedEscaperMap fem = ArrayBasedEscaperMap.create(map);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue Feb 18 15:41:04 UTC 2025 - 2.7K bytes - Viewed (0) -
guava/src/com/google/common/collect/Interner.java
* original interned instance was garbage-collected. * * <p><b>Warning:</b> do not use with mutable objects. * * @throws NullPointerException if {@code sample} is null */ E intern(E sample);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 21 03:10:51 UTC 2024 - 2K bytes - Viewed (0) -
guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java
throw new FooException(); // ok, as long as it's not NullPointerException } public static void staticOneArgNullableCorrectlyThrowsOtherThanNpe(@Nullable String s) { throw new FooException(); // ok, as long as it's not NullPointerException } public static void staticOneArgCheckForNullThrowsNpe(@CheckForNull String s) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Jul 14 14:44:08 UTC 2025 - 47.7K bytes - Viewed (0) -
guava/src/com/google/common/base/MoreObjects.java
* @throws NullPointerException if both {@code first} and {@code second} are null * @since 18.0 (since 3.0 as {@code Objects.firstNonNull()}). */ public static <T> T firstNonNull(@Nullable T first, @Nullable T second) { if (first != null) { return first; } if (second != null) { return second; } throw new NullPointerException("Both parameters are null"); } /**
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Mar 17 20:26:29 UTC 2025 - 16.6K bytes - Viewed (0)