Search Options

Results per page
Sort
Preferred Languages
Advance

Results 131 - 140 of 344 for NullPointerException (0.2 sec)

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

      public void testRemoveNullValueForbidden() {
        assertThrows(NullPointerException.class, () -> multimap().remove(k0(), null));
        expectUnchanged();
      }
    
      @MapFeature.Require(value = SUPPORTS_REMOVE, absent = ALLOWS_NULL_KEY_QUERIES)
      public void testRemoveNullKeyForbidden() {
        assertThrows(NullPointerException.class, () -> multimap().remove(null, v0()));
        expectUnchanged();
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/ImmutableMultimapTest.java

      }
    
      public void testBuilder_withImmutableEntryAndNullContents() {
        Builder<String, Integer> builder = new Builder<>();
        assertThrows(
            NullPointerException.class, () -> builder.put(immutableEntry("one", (Integer) null)));
        assertThrows(NullPointerException.class, () -> builder.put(immutableEntry((String) null, 1)));
      }
    
      public void testBuilderWithExpectedKeysNegative() {
        assertThrows(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/collect/testing/google/MultimapRemoveEntryTester.java

      public void testRemoveNullValueForbidden() {
        assertThrows(NullPointerException.class, () -> multimap().remove(k0(), null));
        expectUnchanged();
      }
    
      @MapFeature.Require(value = SUPPORTS_REMOVE, absent = ALLOWS_NULL_KEY_QUERIES)
      public void testRemoveNullKeyForbidden() {
        assertThrows(NullPointerException.class, () -> multimap().remove(null, v0()));
        expectUnchanged();
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/net/PercentEscaperTest.java

        assertEquals("foo%7Cbar", e.escape("foo%7Cbar")); // idempotent
      }
    
      /** Test that giving a null 'safeChars' string causes a {@link NullPointerException}. */
      public void testBadArguments_null() {
        assertThrows(NullPointerException.class, () -> new PercentEscaper(null, false));
      }
    
      /**
       * Tests that specifying any alphanumeric characters as 'safe' causes an {@link
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/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.5K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/ImmutableClassToInstanceMap.java

        }
    
        /**
         * Associates all of {@code map's} keys and values in the built map. Duplicate keys are not
         * allowed, and will cause {@link #build} to fail.
         *
         * @throws NullPointerException if any key or value in {@code map} is null
         * @throws ClassCastException if any value is not an instance of the type specified by its key
         */
        @CanIgnoreReturnValue
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed May 10 21:56:03 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  7. guava/src/com/google/common/escape/CharEscaper.java

      protected CharEscaper() {}
    
      /**
       * Returns the escaped form of a given literal string.
       *
       * @param string the literal string to be escaped
       * @return the escaped form of {@code string}
       * @throws NullPointerException if {@code string} is null
       */
      @Override
      public String escape(String string) {
        checkNotNull(string); // GWT specific check (do not optimize)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jan 18 20:55:09 UTC 2022
    - 6.7K bytes
    - Viewed (0)
  8. android/guava-testlib/test/com/google/common/collect/testing/MapTestSuiteBuilderTests.java

            new WrappedHashMapGenerator() {
              @Override
              Map<String, String> wrap(final 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();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Apr 19 19:24:36 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  9. 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)
  10. 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