Search Options

Results per page
Sort
Preferred Languages
Advance

Results 161 - 170 of 344 for NullPointerException (0.12 sec)

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

      }
    
      // This test assumes that the implementation does not support null keys.
      public void testRowNull() {
        table = create("foo", 1, 'a', "bar", 1, 'b', "foo", 3, 'c');
        assertThrows(NullPointerException.class, () -> table.row(null));
      }
    
      public void testColumn() {
        table = create("foo", 1, 'a', "bar", 1, 'b', "foo", 3, 'c');
        assertEquals(ImmutableMap.of("foo", 'a', "bar", 'b'), table.column(1));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/base/Optional.java

       * null} treated as {@link #absent}, use {@link #fromNullable} instead.
       *
       * <p><b>Comparison to {@code java.util.Optional}:</b> no differences.
       *
       * @throws NullPointerException if {@code reference} is null
       */
      public static <T> Optional<T> of(T reference) {
        return new Present<>(checkNotNull(reference));
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/Multiset.java

       * @throws IllegalArgumentException if {@code occurrences} is negative, or if this operation would
       *     result in more than {@link Integer#MAX_VALUE} occurrences of the element
       * @throws NullPointerException if {@code element} is null and this implementation does not permit
       *     null elements. Note that if {@code occurrences} is zero, the implementation may opt to
       *     return normally.
       */
      @CanIgnoreReturnValue
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Jun 17 14:40:53 UTC 2023
    - 19.7K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapContainsValueTester.java

      public void testContainsNullValueNo() {
        assertFalse(multimap().containsValue(null));
      }
    
      @MapFeature.Require(absent = ALLOWS_NULL_VALUE_QUERIES)
      public void testContainsNullValueFails() {
        assertThrows(NullPointerException.class, () -> multimap().containsValue(null));
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 19:10:20 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/testers/MapGetOrDefaultTester.java

        try {
          assertEquals(
              "getOrDefault(null, def) should return default or throw",
              v3(),
              getMap().getOrDefault(null, v3()));
        } catch (NullPointerException tolerated) {
        }
      }
    
      @MapFeature.Require(ALLOWS_NULL_KEYS)
      @CollectionSize.Require(absent = ZERO)
      public void testGetOrDefault_nonNullWhenNullContained() {
        initMapWithNullKey();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:51:04 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  6. android/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/collect/ImmutableCollection.java

         *
         * <p>Note that each builder class covariantly returns its own type from this method.
         *
         * @param element the element to add
         * @return this {@code Builder} instance
         * @throws NullPointerException if {@code element} is null
         */
        @CanIgnoreReturnValue
        public abstract Builder<E> add(E element);
    
        /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Aug 12 16:59:15 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/AtomicsTest.java

        }
        assertThrows(IndexOutOfBoundsException.class, () -> refArray.get(array.length));
      }
    
      public void testNewReferenceArray_withNullArray() throws Exception {
        assertThrows(NullPointerException.class, () -> Atomics.newReferenceArray(null));
      }
    
      public void testNullPointers() {
        NullPointerTester tester = new NullPointerTester();
        tester.testAllPublicConstructors(Atomics.class); // there aren't any
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/testers/QueueOfferTester.java

        expectAdded((E) null);
      }
    
      @CollectionFeature.Require(value = SUPPORTS_ADD, absent = ALLOWS_NULL_VALUES)
      public void testOffer_nullUnsupported() {
        assertThrows(NullPointerException.class, () -> getQueue().offer(null));
        expectUnchanged();
        expectNullMissingWhenNullUnsupported("Should not contain null after unsupported offer(null)");
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java

        // Assert that escapers throw null pointer exceptions.
        try {
          escaper.escape((String) null);
          Assert.fail("exception not thrown when escaping a null string");
        } catch (NullPointerException e) {
          // pass
        }
      }
    
      /**
       * Asserts that an escaper escapes the given character into the expected string.
       *
       * @param escaper the non-null escaper to test
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jan 18 20:55:09 UTC 2022
    - 3.8K bytes
    - Viewed (0)
Back to top