Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 344 for NullPointerException (0.4 sec)

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

        expectContents(createArrayWithNullKey());
      }
    
      @MapFeature.Require(absent = ALLOWS_NULL_KEYS)
      @CollectionSize.Require(absent = ZERO)
      public void testCreateWithNullKeyUnsupported() {
        assertThrows(NullPointerException.class, () -> initMapWithNullKey());
      }
    
      @MapFeature.Require(ALLOWS_NULL_VALUES)
      @CollectionSize.Require(absent = ZERO)
      public void testCreateWithNullValueSupported() {
        initMapWithNullValue();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/primitives/ReflectionFreeAssertThrows.java

              .put(IndexOutOfBoundsException.class, e -> e instanceof IndexOutOfBoundsException)
              .put(NoSuchElementException.class, e -> e instanceof NoSuchElementException)
              .put(NullPointerException.class, e -> e instanceof NullPointerException)
              .put(NumberFormatException.class, e -> e instanceof NumberFormatException)
              .put(RuntimeException.class, e -> e instanceof RuntimeException)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/math/ReflectionFreeAssertThrows.java

              .put(IndexOutOfBoundsException.class, e -> e instanceof IndexOutOfBoundsException)
              .put(NoSuchElementException.class, e -> e instanceof NoSuchElementException)
              .put(NullPointerException.class, e -> e instanceof NullPointerException)
              .put(NumberFormatException.class, e -> e instanceof NumberFormatException)
              .put(RuntimeException.class, e -> e instanceof RuntimeException)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/testers/MapPutIfAbsentTester.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 31 14:51:04 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  5. 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
        }
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/MoreCollectorsTest.java

        assertThat(Stream.of(1).collect(toOptional())).hasValue(1);
      }
    
      public void testToOptionalNull() {
        Stream<@Nullable Object> stream = Stream.of((Object) null);
        assertThrows(NullPointerException.class, () -> stream.collect(toOptional()));
      }
    
      public void testToOptionalMultiple() {
        IllegalArgumentException expected =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/google/MultimapContainsEntryTester.java

      public void testContainsEntryNullDisallowedBecauseKeyQueriesDisallowed() {
        assertThrows(NullPointerException.class, () -> multimap().containsEntry(null, v3()));
      }
    
      @MapFeature.Require(absent = ALLOWS_NULL_VALUE_QUERIES)
      public void testContainsEntryNullDisallowedBecauseValueQueriesDisallowed() {
        assertThrows(NullPointerException.class, () -> multimap().containsEntry(k3(), null));
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 19:10:20 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/base/StringsTest.java

        assertSame("x", Strings.padStart("x", -1, '-'));
      }
    
      // TODO: could remove if we got NPT working in GWT somehow
      public void testPadStart_null() {
        assertThrows(NullPointerException.class, () -> Strings.padStart(null, 5, '0'));
      }
    
      public void testPadEnd_noPadding() {
        assertSame("", Strings.padEnd("", 0, '-'));
        assertSame("x", Strings.padEnd("x", 0, '-'));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/base/ThrowablesTest.java

            new YetAnotherCheckedException(),
            SomeCheckedException.class,
            SomeOtherCheckedException.class);
      }
    
      public void testThrowIfUnchecked_null() {
        assertThrows(NullPointerException.class, () -> throwIfUnchecked(null));
      }
    
      @J2ktIncompatible
      @GwtIncompatible // propagateIfPossible
      public void testPropageIfPossible_null() {
        propagateIfPossible(null);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/FilesTest.java

      }
    
      public void testNewReader() throws IOException {
        File asciiFile = getTestFile("ascii.txt");
        assertThrows(NullPointerException.class, () -> Files.newReader(asciiFile, null));
    
        assertThrows(NullPointerException.class, () -> Files.newReader(null, UTF_8));
    
        BufferedReader r = Files.newReader(asciiFile, US_ASCII);
        try {
          assertEquals(ASCII, r.readLine());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 22.1K bytes
    - Viewed (0)
Back to top