Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 409 for NullPointerException (0.21 sec)

  1. guava/src/com/google/common/collect/CollectPreconditions.java

    @ElementTypesAreNonnullByDefault
    final class CollectPreconditions {
    
      static void checkEntryNotNull(Object key, Object value) {
        if (key == null) {
          throw new NullPointerException("null key in entry: null=" + value);
        } else if (value == null) {
          throw new NullPointerException("null value in entry: " + key + "=null");
        }
      }
    
      @CanIgnoreReturnValue
      static int checkNonnegative(int value, String name) {
        if (value < 0) {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Wed Jun 30 10:33:07 GMT 2021
    - 2.1K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/CollectPreconditions.java

    @ElementTypesAreNonnullByDefault
    final class CollectPreconditions {
    
      static void checkEntryNotNull(Object key, Object value) {
        if (key == null) {
          throw new NullPointerException("null key in entry: null=" + value);
        } else if (value == null) {
          throw new NullPointerException("null value in entry: " + key + "=null");
        }
      }
    
      @CanIgnoreReturnValue
      static int checkNonnegative(int value, String name) {
        if (value < 0) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Jun 30 10:33:07 GMT 2021
    - 2.1K bytes
    - Viewed (0)
  3. maven-builder-support/src/test/java/org/apache/maven/building/FileSourceTest.java

    import static org.junit.jupiter.api.Assertions.assertThrows;
    
    class FileSourceTest {
    
        @Test
        void testFileSource() {
            NullPointerException e = assertThrows(
                    NullPointerException.class,
                    () -> new FileSource((File) null),
                    "Should fail, since you must specify a file");
            assertEquals("file cannot be null", e.getMessage());
        }
    
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Mon Feb 26 17:04:44 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapContainsValueTester.java

      }
    
      @MapFeature.Require(absent = ALLOWS_NULL_VALUE_QUERIES)
      public void testContainsNullValueFails() {
        try {
          multimap().containsValue(null);
          fail("Expected NullPointerException");
        } catch (NullPointerException expected) {
          // success
        }
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Nov 16 17:41:24 GMT 2022
    - 2.3K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/testers/CollectionRemoveTester.java

      public void testRemove_nullNotSupported() {
        try {
          assertFalse(
              "remove(null) should return false or throw NullPointerException",
              collection.remove(null));
        } catch (NullPointerException tolerated) {
        }
        expectUnchanged();
      }
    
      @CollectionFeature.Require({SUPPORTS_REMOVE, ALLOWS_NULL_QUERIES})
      public void testRemove_nullAllowed() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddAllTester.java

      public void testAddAll_nullCollectionReference() {
        try {
          collection.addAll(null);
          fail("addAll(null) should throw NullPointerException");
        } catch (NullPointerException expected) {
        }
      }
    
      /**
       * Returns the {@link Method} instance for {@link #testAddAll_nullUnsupported()} so that tests can
       * suppress it with {@code FeatureSpecificTestSuiteBuilder.suppressing()} until <a
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/google/MultimapContainsValueTester.java

      }
    
      @MapFeature.Require(absent = ALLOWS_NULL_VALUE_QUERIES)
      public void testContainsNullValueFails() {
        try {
          multimap().containsValue(null);
          fail("Expected NullPointerException");
        } catch (NullPointerException expected) {
          // success
        }
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Nov 16 17:41:24 GMT 2022
    - 2.3K bytes
    - Viewed (0)
  8. maven-builder-support/src/test/java/org/apache/maven/building/UrlSourceTest.java

    import static org.junit.jupiter.api.Assertions.assertThrows;
    
    class UrlSourceTest {
    
        @Test
        void testUrlSource() {
            NullPointerException e = assertThrows(
                    NullPointerException.class, () -> new UrlSource(null), "Should fail, since you must specify a url");
            assertEquals("url cannot be null", e.getMessage());
        }
    
        @Test
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Sat Apr 15 17:24:20 GMT 2023
    - 2K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/InternersTest.java

        assertSame(canonical, pool.intern(canonical));
        assertSame(canonical, pool.intern(not));
      }
    
      public void testStrong_null() {
        Interner<String> pool = Interners.newStrongInterner();
        assertThrows(NullPointerException.class, () -> pool.intern(null));
      }
    
      public void testStrong_builder() {
        int concurrencyLevel = 42;
        Interner<Object> interner =
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapGetTester.java

      }
    
      @MapFeature.Require(absent = ALLOWS_NULL_KEY_QUERIES)
      public void testGetNullForbidden() {
        try {
          multimap().get(null);
          fail("Expected NullPointerException");
        } catch (NullPointerException expected) {
          // success
        }
      }
    
      @MapFeature.Require(ALLOWS_NULL_VALUES)
      @CollectionSize.Require(absent = ZERO)
      public void testGetWithNullValue() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Nov 16 17:41:24 GMT 2022
    - 5.6K bytes
    - Viewed (0)
Back to top