Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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)
  2. 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)
  3. guava-testlib/src/com/google/common/collect/testing/testers/MapReplaceTester.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 19 12:43:09 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 3.8K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/google/MultimapPutAllMultimapTester.java

      public void testPutAllRejectsNullValue() {
        Multimap<K, V> source = getSubjectGenerator().create(Helpers.mapEntry(k0(), null));
        try {
          multimap().putAll(source);
          fail("Expected NullPointerException");
        } catch (NullPointerException expected) {
        }
        expectUnchanged();
      }
    
      @MapFeature.Require(value = SUPPORTS_PUT, absent = ALLOWS_NULL_KEYS)
      public void testPutAllRejectsNullKey() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 4.1K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/ImmutableListMultimapTest.java

        try {
          builder.put(null, 1);
          fail();
        } catch (NullPointerException expected) {
        }
        try {
          builder.putAll(null, Arrays.asList(1, 2, 3));
          fail();
        } catch (NullPointerException expected) {
        }
        try {
          builder.putAll(null, 1, 2, 3);
          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
    - 22.2K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/collect/testing/testers/CollectionRetainAllTester.java

        } catch (NullPointerException tolerated) {
        }
      }
    
      @CollectionFeature.Require(SUPPORTS_REMOVE)
      @CollectionSize.Require(absent = ZERO)
      public void testRetainAll_nullCollectionReferenceNonEmptySubject() {
        try {
          collection.retainAll(null);
          fail("retainAll(null) should throw NullPointerException");
        } catch (NullPointerException expected) {
        }
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/ImmutableSortedMultiset.java

       *
       * @throws NullPointerException if any element is null
       */
      public static <E extends Comparable<? super E>> ImmutableSortedMultiset<E> of(
          E e1, E e2, E e3, E e4) {
        return copyOf(Ordering.natural(), Arrays.asList(e1, e2, e3, e4));
      }
    
      /**
       * Returns an immutable sorted multiset containing the given elements sorted by their natural
       * ordering.
       *
       * @throws NullPointerException if any element is null
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 29.6K bytes
    - Viewed (0)
  8. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Nov 16 17:41:24 GMT 2022
    - 3.1K bytes
    - Viewed (0)
  9. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  10. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

       * fail to insert an element only by throwing an exception.
       *
       * @throws NullPointerException if the specified element is null
       */
      @CanIgnoreReturnValue
      @Override
      public boolean offer(E e) {
        if (e == null) throw new NullPointerException();
        final Monitor monitor = this.monitor;
        if (monitor.enterIf(notFull)) {
          try {
            insert(e);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 22.5K bytes
    - Viewed (0)
Back to top