Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 409 for NullPointerException (7.91 sec)

  1. android/guava/src/com/google/common/collect/ImmutableList.java

       *
       * @throws NullPointerException if {@code element} is null
       */
      public static <E> ImmutableList<E> of(E element) {
        return construct(element);
      }
    
      /**
       * Returns an immutable list containing the given elements, in order.
       *
       * @throws NullPointerException if any element is null
       */
      public static <E> ImmutableList<E> of(E e1, E e2) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 27.1K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/cache/EmptyCachesTest.java

        for (LoadingCache<Object, Object> cache : caches()) {
          assertThrows(NullPointerException.class, () -> cache.get(null));
          checkEmpty(cache);
        }
      }
    
      public void testGetUnchecked_null() {
        for (LoadingCache<Object, Object> cache : caches()) {
          assertThrows(NullPointerException.class, () -> cache.getUnchecked(null));
          checkEmpty(cache);
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/MoreCollectorsTest.java

      }
    
      public void testToOptionalNull() {
        Stream<@Nullable Object> stream = Stream.of((Object) null);
        try {
          stream.collect(MoreCollectors.toOptional());
          fail("Expected NullPointerException");
        } catch (NullPointerException expected) {
        }
      }
    
      public void testToOptionalMultiple() {
        try {
          Stream.of(1, 2).collect(MoreCollectors.toOptional());
          fail("Expected IllegalArgumentException");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/google/MultimapContainsEntryTester.java

          fail("Expected NullPointerException");
        } catch (NullPointerException expected) {
          // success
        }
      }
    
      @MapFeature.Require(absent = ALLOWS_NULL_VALUE_QUERIES)
      public void testContainsEntryNullDisallowedBecauseValueQueriesDisallowed() {
        try {
          multimap().containsEntry(k3(), null);
          fail("Expected NullPointerException");
        } catch (NullPointerException expected) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Nov 16 17:41:24 GMT 2022
    - 3.1K bytes
    - Viewed (0)
  5. 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)
  6. 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 Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 15:49:06 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/testers/ConcurrentMapReplaceEntryTester.java

      @CollectionSize.Require(absent = ZERO)
      public void testReplaceEntry_presentNullValueUnsupported() {
        try {
          getMap().replace(k0(), v0(), null);
          fail("Expected NullPointerException");
        } catch (NullPointerException expected) {
        }
        expectUnchanged();
      }
    
      @MapFeature.Require(value = SUPPORTS_PUT, absent = ALLOWS_NULL_VALUE_QUERIES)
      @CollectionSize.Require(absent = ZERO)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/ImmutableSortedSet.java

       * When multiple elements are equivalent according to {@link Comparable#compareTo}, only the first
       * one specified is included.
       *
       * @throws NullPointerException if any element is null
       */
      public static <E extends Comparable<? super E>> ImmutableSortedSet<E> of(E e1, E e2) {
        return construct(Ordering.natural(), 2, e1, e2);
      }
    
      /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 38.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/base/JoinerTest.java

        try {
          J.join(ITERABLE_NULL);
          fail();
        } catch (NullPointerException expected) {
        }
        try {
          J.join(ITERABLE_1_NULL_2);
          fail();
        } catch (NullPointerException expected) {
        }
    
        try {
          J.join(ITERABLE_NULL.iterator());
          fail();
        } catch (NullPointerException expected) {
        }
        try {
          J.join(ITERABLE_1_NULL_2.iterator());
          fail();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 12.6K bytes
    - Viewed (0)
  10. maven-builder-support/src/test/java/org/apache/maven/building/UrlSourceTest.java

    import static org.junit.jupiter.api.Assertions.assertThrows;
    
    class UrlSourceTest {
    
        @Test
        void testUrlSource() {
            NullPointerException e = assertThrows(
                    NullPointerException.class, () -> new UrlSource(null), "Should fail, since you must specify a url");
            assertEquals("url cannot be null", e.getMessage());
        }
    
        @Test
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Sat Apr 15 17:24:20 GMT 2023
    - 2K bytes
    - Viewed (0)
Back to top