Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 252 for NullPointerException (0.35 sec)

  1. guava-tests/test/com/google/common/collect/ImmutableListTest.java

          builder.add((String) null);
          fail("expected NullPointerException");
        } catch (NullPointerException expected) {
        }
    
        try {
          builder.add((String[]) null);
          fail("expected NullPointerException");
        } catch (NullPointerException expected) {
        }
    
        try {
          builder.add("a", null, "b");
          fail("expected NullPointerException");
        } catch (NullPointerException expected) {
        }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 23.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/ImmutableListTest.java

          builder.add((String) null);
          fail("expected NullPointerException");
        } catch (NullPointerException expected) {
        }
    
        try {
          builder.add((String[]) null);
          fail("expected NullPointerException");
        } catch (NullPointerException expected) {
        }
    
        try {
          builder.add("a", null, "b");
          fail("expected NullPointerException");
        } catch (NullPointerException expected) {
        }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/TableCollectorsTest.java

          fail("Expected NullPointerException");
        } catch (NullPointerException expected) {
        }
        collector =
            TableCollectors.toImmutableTable(Cell::getRowKey, Cell::getColumnKey, Cell::getValue);
        try {
          Stream.of(immutableCell("one", "uno", 1), immutableCell("one", "uno", (Integer) null))
              .collect(collector);
          fail("Expected NullPointerException");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Mar 05 16:03:18 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/ImmutableMultisetTest.java

          fail("expected NullPointerException");
        } catch (NullPointerException expected) {
        }
      }
    
      public void testBuilderAddCopiesHandlesNullsCorrectly() {
        ImmutableMultiset.Builder<String> builder = ImmutableMultiset.builder();
        try {
          builder.addCopies(null, 2);
          fail("expected NullPointerException");
        } catch (NullPointerException expected) {
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 25.1K bytes
    - Viewed (0)
  5. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  6. guava/src/com/google/common/base/Preconditions.java

       * @return the non-null reference that was validated
       * @throws NullPointerException if {@code reference} is null
       * @see Verify#verifyNotNull Verify.verifyNotNull()
       */
      @CanIgnoreReturnValue
      public static <T> T checkNotNull(@CheckForNull T reference) {
        if (reference == null) {
          throw new NullPointerException();
        }
        return reference;
      }
    
      /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Wed Feb 14 15:46:55 GMT 2024
    - 52.9K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/features/MapFeature.java

    public enum MapFeature implements Feature<Map> {
      /**
       * The map does not throw {@code NullPointerException} on calls such as {@code containsKey(null)},
       * {@code get(null)}, {@code keySet().contains(null)} or {@code remove(null)}.
       */
      ALLOWS_NULL_KEY_QUERIES,
      ALLOWS_NULL_KEYS(ALLOWS_NULL_KEY_QUERIES),
      /**
       * The map does not throw {@code NullPointerException} on calls such as {@code
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 3K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/testers/ConcurrentMapReplaceTester.java

          getMap().replace(k0(), null);
          fail("Expected NullPointerException");
        } catch (NullPointerException expected) {
        }
        expectUnchanged();
      }
    
      @MapFeature.Require(value = SUPPORTS_PUT, absent = ALLOWS_NULL_VALUE_QUERIES)
      public void testReplace_absentNullValueUnsupported() {
        try {
          getMap().replace(k3(), null);
        } catch (NullPointerException tolerated) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/ImmutableSortedMapTest.java

          fail();
        } catch (NullPointerException expected) {
        }
    
        try {
          ImmutableSortedMap.of("one", 1, null, 2);
          fail();
        } catch (NullPointerException expected) {
        }
      }
    
      public void testOfNullValue() {
        try {
          ImmutableSortedMap.of("one", null);
          fail();
        } catch (NullPointerException expected) {
        }
    
        try {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 27K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/AbstractImmutableSetTest.java

        try {
          builder.add((String) null);
          fail("expected NullPointerException"); // COV_NF_LINE
        } catch (NullPointerException expected) {
        }
    
        builder = this.<String>builder();
        try {
          builder.add((String[]) null);
          fail("expected NullPointerException"); // COV_NF_LINE
        } catch (NullPointerException expected) {
        }
    
        builder = this.<String>builder();
        try {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 18.7K bytes
    - Viewed (0)
Back to top