Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 344 for NullPointerException (0.11 sec)

  1. android/guava-testlib/src/com/google/common/collect/testing/testers/ConcurrentMapPutIfAbsentTester.java

        }
        expectUnchanged();
      }
    
      @MapFeature.Require(value = SUPPORTS_PUT, absent = ALLOWS_NULL_KEYS)
      public void testPutIfAbsent_nullKeyUnsupported() {
        assertThrows(NullPointerException.class, () -> getMap().putIfAbsent(null, v3()));
        expectUnchanged();
        expectNullKeyMissingWhenNullKeysUnsupported(
            "Should not contain null key after unsupported putIfAbsent(null, value)");
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/testers/ConcurrentMapReplaceTester.java

      public void testReplace_presentNullValueUnsupported() {
        assertThrows(NullPointerException.class, () -> getMap().replace(k0(), null));
        expectUnchanged();
      }
    
      @MapFeature.Require(value = SUPPORTS_PUT, absent = ALLOWS_NULL_VALUE_QUERIES)
      public void testReplace_absentNullValueUnsupported() {
        try {
          getMap().replace(k3(), null);
        } catch (NullPointerException tolerated) {
          // permitted not to throw because it would be a no-op
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/MinimalCollection.java

            if (element == null) {
              throw new NullPointerException();
            }
          }
        }
      }
    
      @Override
      public int size() {
        return contents.length;
      }
    
      @Override
      public boolean contains(@Nullable Object object) {
        if (!allowNulls) {
          // behave badly
          if (object == null) {
            throw new NullPointerException();
          }
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/testers/MapReplaceTester.java

      public void testReplace_presentNullValueUnsupported() {
        assertThrows(NullPointerException.class, () -> getMap().replace(k0(), null));
        expectUnchanged();
      }
    
      @MapFeature.Require(value = SUPPORTS_PUT, absent = ALLOWS_NULL_VALUE_QUERIES)
      public void testReplace_absentNullValueUnsupported() {
        try {
          getMap().replace(k3(), null);
        } catch (NullPointerException tolerated) {
          // permitted not to throw because it would be a no-op
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:51:04 UTC 2024
    - 4K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java

       *
       * @throws NullPointerException if any element is null
       */
      public static <E extends Comparable<? super E>> ImmutableSortedMultiset<E> of(
          E e1, E e2, E e3, E e4) {
        return copyOf(Ordering.natural(), Arrays.asList(e1, e2, e3, e4));
      }
    
      /**
       * Returns an immutable sorted multiset containing the given elements sorted by their natural
       * ordering.
       *
       * @throws NullPointerException if any element is null
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 21:21:17 UTC 2024
    - 35.4K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/AbstractTableTest.java

        assertSize(3);
        assertThrows(NullPointerException.class, () -> table.put(null, 2, cellValue('d')));
        assertThrows(NullPointerException.class, () -> table.put("cat", null, cellValue('d')));
        if (supportsNullValues()) {
          assertNull(table.put("cat", 2, null));
          assertTrue(table.contains("cat", 2));
        } else {
          assertThrows(NullPointerException.class, () -> table.put("cat", 2, null));
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/FluentIterable.java

       * Stream.of(stream1, stream2, ...).flatMap(s -> s)}. If the sources are iterables, use {@code
       * Stream.of(iter1, iter2, ...).flatMap(Streams::stream)}.
       *
       * @throws NullPointerException if any of the provided iterables is {@code null}
       * @since 20.0
       */
      @SafeVarargs
      public static <T extends @Nullable Object> FluentIterable<T> concat(
          Iterable<? extends T>... inputs) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 24 13:42:31 UTC 2024
    - 35.7K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/testers/MapMergeTester.java

                  });
          fail("Expected NullPointerException or UnsupportedOperationException");
        } catch (NullPointerException | UnsupportedOperationException expected) {
        }
      }
    
      public void testMergeNullFunction() {
        try {
          getMap().merge(k0(), v3(), null);
          fail("Expected NullPointerException or UnsupportedOperationException");
        } catch (NullPointerException | UnsupportedOperationException expected) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/ImmutableMultisetTest.java

        ImmutableMultiset.Builder<String> builder = ImmutableMultiset.builder();
        assertThrows(NullPointerException.class, () -> builder.add((String) null));
      }
    
      public void testBuilderAddAllHandlesNullsCorrectly() {
        {
        ImmutableMultiset.Builder<String> builder = ImmutableMultiset.builder();
          assertThrows(NullPointerException.class, () -> builder.addAll((Collection<String>) null));
        }
    
        {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/ImmutableMapTest.java

      }
    
      public void testOfNullKey() {
        assertThrows(NullPointerException.class, () -> ImmutableMap.of(null, 1));
    
        assertThrows(NullPointerException.class, () -> ImmutableMap.of("one", 1, null, 2));
      }
    
      public void testOfNullValue() {
        assertThrows(NullPointerException.class, () -> ImmutableMap.of("one", null));
    
        assertThrows(NullPointerException.class, () -> ImmutableMap.of("one", 1, "two", null));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 36.6K bytes
    - Viewed (0)
Back to top