Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for testOr_nullSupplier_present (0.09 seconds)

  1. android/guava-tests/test/com/google/common/base/OptionalTest.java

        assertThrows(NullPointerException.class, () -> absentOptional.or(nullSupplier));
      }
    
      @SuppressWarnings("OptionalOfRedundantMethod") // Unit tests for Optional
      public void testOr_nullSupplier_present() {
        Supplier<String> nullSupplier = (Supplier<String>) Suppliers.<@Nullable String>ofInstance(null);
        assertThat(Optional.of("a").or(nullSupplier)).isEqualTo("a");
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 10.6K bytes
    - Click Count (0)
Back to Top