- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 409 for NullPointerException (0.4 sec)
-
android/guava-testlib/src/com/google/common/collect/testing/testers/MapPutAllTester.java
public void testPutAll_nullCollectionReference() { try { getMap().putAll(null); fail("putAll(null) should throw NullPointerException"); } catch (NullPointerException expected) { } } private Map<K, V> emptyMap() { return Collections.emptyMap(); } private void putAll(Iterable<Entry<K, V>> entries) { Map<K, V> map = new LinkedHashMap<>();
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Feb 21 16:49:06 GMT 2024 - 7K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/MultimapPutIterableTester.java
@MapFeature.Require(absent = ALLOWS_NULL_KEYS) public void testPutAllNullForbidden() { try { multimap().putAll(null, Collections.singletonList(v3())); fail("Expected NullPointerException"); } catch (NullPointerException expected) { // success } } @MapFeature.Require(SUPPORTS_PUT) public void testPutAllEmptyCollectionOnAbsentKey() {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Jan 09 20:10:38 GMT 2018 - 7.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java
try { future.addListener(null, directExecutor()); fail(); } catch (NullPointerException expected) { } } public void testNullExecutor() { try { future.addListener(doNothing(), null); fail(); } catch (NullPointerException expected) { } } public void testNullTimeUnit() throws Exception { future.set(1); try {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 15.5K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/AbstractMapTester.java
* the call to {@code contains(null)} is permitted to throw a {@code NullPointerException}. * * @param message message to use upon assertion failure */ protected void expectNullKeyMissingWhenNullKeysUnsupported(String message) { try { assertFalse(message, getMap().containsKey(null)); } catch (NullPointerException tolerated) { // Tolerated } } /**
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Feb 21 16:49:06 GMT 2024 - 7.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/FluentIterableTest.java
assertEquals(asList(1, 2, 3), Lists.newArrayList(result)); } public void testAppend_nullPointerException() { try { FluentIterable<Integer> unused = FluentIterable.<Integer>from(asList(1, 2)).append((List<Integer>) null); fail("Appending null iterable should throw NPE."); } catch (NullPointerException expected) { } } /* * Tests for partition(int size) method. */
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Jun 06 17:32:08 GMT 2023 - 30.6K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/ConcurrentMapPutIfAbsentTester.java
public void testPutIfAbsent_nullKeyUnsupported() { try { getMap().putIfAbsent(null, v3()); fail("putIfAbsent(null, value) should throw"); } catch (NullPointerException expected) { } expectUnchanged(); expectNullKeyMissingWhenNullKeysUnsupported( "Should not contain null key after unsupported putIfAbsent(null, value)"); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Feb 21 16:49:06 GMT 2024 - 4.8K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/testing/EqualsTesterTest.java
fail("Should fail on null reference"); } catch (NullPointerException e) { } } /** Test equalObjects after adding multiple instances at once with a null */ public void testAddTwoEqualObjectsAtOnceWithNull() { try { equalsTester.addEqualityGroup(reference, equalObject1, null); fail("Should fail on null equal object"); } catch (NullPointerException e) { } }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Apr 17 15:49:06 GMT 2023 - 12.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/FluentIterableTest.java
assertEquals(asList(1, 2, 3), Lists.newArrayList(result)); } public void testAppend_nullPointerException() { try { FluentIterable<Integer> unused = FluentIterable.<Integer>from(asList(1, 2)).append((List<Integer>) null); fail("Appending null iterable should throw NPE."); } catch (NullPointerException expected) { } } /* * Tests for partition(int size) method. */
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Tue Feb 06 18:35:19 GMT 2024 - 31.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Collections2.java
* throws a {@code ClassCastException} or {@code NullPointerException}. */ static boolean safeContains(Collection<?> collection, @CheckForNull Object object) { checkNotNull(collection); try { return collection.contains(object); } catch (ClassCastException | NullPointerException e) { return false; } } /**
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 22.8K bytes - Viewed (0) -
guava/src/com/google/common/collect/CollectPreconditions.java
@ElementTypesAreNonnullByDefault final class CollectPreconditions { static void checkEntryNotNull(Object key, Object value) { if (key == null) { throw new NullPointerException("null key in entry: null=" + value); } else if (value == null) { throw new NullPointerException("null value in entry: " + key + "=null"); } } @CanIgnoreReturnValue static int checkNonnegative(int value, String name) { if (value < 0) {
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Wed Jun 30 10:33:07 GMT 2021 - 2.1K bytes - Viewed (0)