- Sort Score
- Num 10 results
- Language All
Results 141 - 150 of 312 for NullPointerException (0.16 seconds)
-
android/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"); } /**Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Mar 17 20:26:29 GMT 2025 - 16.1K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/ImmutableCollection.java
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 21.4K bytes - Click Count (0) -
guava-tests/test/com/google/common/base/MoreObjectsTest.java
Boolean b1 = true; Boolean b2 = MoreObjects.firstNonNull(b1, null); assertSame(b1, b2); } public void testFirstNonNull_throwsNullPointerException() { assertThrows(NullPointerException.class, () -> MoreObjects.firstNonNull(null, null)); } // ToStringHelper's tests are in ToStringHelperTest @J2ktIncompatible @GwtIncompatible("NullPointerTester")Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 2.1K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/base/MoreObjectsTest.java
Boolean b1 = true; Boolean b2 = MoreObjects.firstNonNull(b1, null); assertSame(b1, b2); } public void testFirstNonNull_throwsNullPointerException() { assertThrows(NullPointerException.class, () -> MoreObjects.firstNonNull(null, null)); } // ToStringHelper's tests are in ToStringHelperTest @J2ktIncompatible @GwtIncompatible("NullPointerTester")Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 2.1K bytes - Click Count (0) -
guava/src/com/google/common/collect/ImmutableBiMap.java
} /** * Associates all of the given map's keys and values in the built bimap. Duplicate keys or * values are not allowed, and will cause {@link #build} to fail. * * @throws NullPointerException if any key or value in {@code map} is null */ @CanIgnoreReturnValue @Override public Builder<K, V> putAll(Map<? extends K, ? extends V> map) { super.putAll(map); return this;Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Sep 23 17:50:58 GMT 2025 - 22.7K bytes - Click Count (0) -
guava-testlib/src/com/google/common/collect/testing/google/MultimapContainsValueTester.java
public void testContainsNullValueNo() { assertFalse(multimap().containsValue(null)); } @MapFeature.Require(absent = ALLOWS_NULL_VALUE_QUERIES) public void testContainsNullValueFails() { assertThrows(NullPointerException.class, () -> multimap().containsValue(null)); }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Nov 14 23:40:07 GMT 2024 - 2.4K bytes - Click Count (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();
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu May 22 16:18:11 GMT 2025 - 11.4K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionContainsAllTester.java
} @CollectionFeature.Require(absent = ALLOWS_NULL_QUERIES) public void testContainsAll_nullNotAllowed() { try { assertFalse(collection.containsAll(MinimalCollection.of((E) null))); } catch (NullPointerException tolerated) { } } @CollectionFeature.Require(ALLOWS_NULL_QUERIES) public void testContainsAll_nullAllowed() { assertFalse(collection.containsAll(MinimalCollection.of((E) null))); }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Nov 14 23:40:07 GMT 2024 - 4K bytes - Click Count (0) -
guava-testlib/src/com/google/common/collect/testing/google/MultisetCountTester.java
assertEquals("multiset.count(null) didn't return 0", 0, getMultiset().count(null)); } @CollectionFeature.Require(absent = ALLOWS_NULL_QUERIES) public void testCount_null_forbidden() { assertThrows(NullPointerException.class, () -> getMultiset().count(null)); } @CollectionSize.Require(absent = ZERO) @CollectionFeature.Require(ALLOWS_NULL_VALUES) public void testCount_nullPresent() { initCollectionWithNullElement();
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 3.6K bytes - Click Count (0) -
guava-testlib/src/com/google/common/collect/testing/google/AbstractMultisetSetCountTester.java
assertSetCount(null, 1); } @CollectionFeature.Require(value = SUPPORTS_ADD, absent = ALLOWS_NULL_VALUES) public void testSetCount_addNull_nullUnsupported() { assertThrows(NullPointerException.class, () -> setCountNoCheckReturnValue(null, 1)); } @CollectionFeature.Require(ALLOWS_NULL_VALUES) public void testSetCount_noOpNull_nullSupported() { try { assertSetCount(null, 0);
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 13K bytes - Click Count (0)