Search Options

Results per page
Sort
Preferred Languages
Advance

Results 281 - 290 of 344 for NullPointerException (0.4 sec)

  1. guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

      @Override
      public void setUp() {
        fakePool = new FakeExecutor();
        e = new SequentialExecutor(fakePool);
      }
    
      public void testConstructingWithNullExecutor_fails() {
        assertThrows(NullPointerException.class, () -> new SequentialExecutor(null));
      }
    
      public void testBasics() {
        final AtomicInteger totalCalls = new AtomicInteger();
        Runnable intCounter =
            new Runnable() {
              @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/primitives/BooleansTest.java

            }
          }
        }
      }
    
      public void testToArray_withNull() {
        List<@Nullable Boolean> list = Arrays.asList(false, true, null);
        assertThrows(NullPointerException.class, () -> Booleans.toArray(list));
      }
    
      @SuppressWarnings({"CollectionIsEmptyTruth", "CollectionIsNotEmptyTruth"})
      public void testAsListIsEmpty() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 24.8K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ObjectArrays.java

      // creation cost.
      @CanIgnoreReturnValue
      static Object checkElementNotNull(Object element, int index) {
        if (element == null) {
          throw new NullPointerException("at index " + index);
        }
        return element;
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 9K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java

          assertBitEquals(0.0, aa.get(i));
        }
      }
    
      /** constructor with null array throws NPE */
      public void testConstructor2NPE() {
        double[] a = null;
        assertThrows(NullPointerException.class, () -> new AtomicDoubleArray(a));
      }
    
      /** constructor with array is of same size and has all elements */
      public void testConstructor2() {
        AtomicDoubleArray aa = new AtomicDoubleArray(VALUES);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/ObjectArrays.java

      // creation cost.
      @CanIgnoreReturnValue
      static Object checkElementNotNull(@CheckForNull Object element, int index) {
        if (element == null) {
          throw new NullPointerException("at index " + index);
        }
        return element;
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 9K bytes
    - Viewed (0)
  6. docs/changelogs/changelog_2x.md

        cancelation.
     *  Fix: When a network interceptor mutates a request, that change is now
        reflected in `Response.networkResponse()`.
     *  Fix: Badly-behaving caches now throw a checked exception instead of a
        `NullPointerException`.
     *  Fix: Better handling of uncaught exceptions in MockWebServer with HTTP/2.
    
    ## Version 2.3.0
    
    _2015-03-16_
    
     *  **HTTP/2 support.** We've done interop testing and haven't seen any
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Feb 06 02:19:09 UTC 2022
    - 26.6K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/TreeMultiset.java

          AvlNode<E> root = rootReference.get();
          if (!range.contains(e) || root == null) {
            return 0;
          }
          return root.count(comparator(), e);
        } catch (ClassCastException | NullPointerException e) {
          return 0;
        }
      }
    
      @CanIgnoreReturnValue
      @Override
      public int add(@ParametricNullness E element, int occurrences) {
        checkNonnegative(occurrences, "occurrences");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 34.1K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/ImmutableSetMultimap.java

       * safe to do so. The exact circumstances under which a copy will or will not be performed are
       * undocumented and subject to change.
       *
       * @throws NullPointerException if any key or value in {@code multimap} is null
       */
      public static <K, V> ImmutableSetMultimap<K, V> copyOf(
          Multimap<? extends K, ? extends V> multimap) {
        return copyOf(multimap, null);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 25.9K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/Helpers.java

         * field.
         */
        @GwtTransient private final String justAfterNull;
    
        protected NullsBefore(String justAfterNull) {
          if (justAfterNull == null) {
            throw new NullPointerException();
          }
    
          this.justAfterNull = justAfterNull;
        }
    
        @Override
        public int compare(@Nullable String lhs, @Nullable String rhs) {
          if (lhs == rhs) {
            return 0;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/primitives/BytesTest.java

            }
          }
        }
      }
    
      public void testToArray_withNull() {
        List<@Nullable Byte> list = Arrays.asList((byte) 0, (byte) 1, null);
        assertThrows(NullPointerException.class, () -> Bytes.toArray(list));
      }
    
      public void testToArray_withConversion() {
        byte[] array = {(byte) 0, (byte) 1, (byte) 2};
    
        List<Byte> bytes = Arrays.asList((byte) 0, (byte) 1, (byte) 2);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 17.3K bytes
    - Viewed (0)
Back to top