Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 2,240 for throwIf (0.04 seconds)

  1. guava-tests/test/com/google/common/io/CloserTest.java

          this.closeable = closeable;
          this.thrown = thrown;
          this.suppressed = suppressed;
        }
    
        @Override
        public boolean equals(@Nullable Object obj) {
          if (obj instanceof Suppression) {
            Suppression other = (Suppression) obj;
            return closeable.equals(other.closeable)
                && thrown.equals(other.thrown)
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 11.9K bytes
    - Click Count (0)
  2. android/guava/src/com/google/common/base/SneakyThrows.java

       *     write {@code throw sneakyThrow(t);} to convince the compiler that the statement will always
       *     throw.
       */
      @CanIgnoreReturnValue
      static Error sneakyThrow(Throwable t) {
        throw new SneakyThrows<Error>().throwIt(t);
      }
    
      @SuppressWarnings("unchecked") // not really safe, but that's the point
      private Error throwIt(Throwable t) throws T {
        throw (T) t;
      }
    
      private SneakyThrows() {}
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 03 21:52:39 GMT 2025
    - 2.4K bytes
    - Click Count (0)
  3. android/guava-tests/test/com/google/common/io/FlushablesTest.java

      public void testFlush_flushableWithEatenException() throws IOException {
        // make sure that no exception is thrown if 'swallowException' is true
        // when the mock does throw an exception on flush.
        setupFlushable(true);
        doFlush(mockFlushable, true, false);
      }
    
      public void testFlush_flushableWithThrownException() throws IOException {
        // make sure that the exception is thrown if 'swallowException' is false
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Jul 16 20:34:52 GMT 2025
    - 3.3K bytes
    - Click Count (0)
  4. android/guava/src/com/google/common/io/Closeables.java

       *     does nothing
       * @param swallowIOException if true, don't propagate IO exceptions thrown by the {@code close}
       *     methods
       * @throws IOException if {@code swallowIOException} is false and {@code close} throws an {@code
       *     IOException}.
       */
      /*
       * The proper capitalization would be "swallowIoException." However:
       *
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 17 20:26:29 GMT 2025
    - 5.1K bytes
    - Click Count (0)
  5. android/guava/src/com/google/common/util/concurrent/Futures.java

       *
       * @throws X if {@code get} throws any checked exception except for an {@code ExecutionException}
       *     whose cause is not itself a checked exception
       * @throws UncheckedExecutionException if {@code get} throws an {@code ExecutionException} with a
       *     {@code RuntimeException} as its cause
       * @throws ExecutionError if {@code get} throws an {@code ExecutionException} with an {@code
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 19:26:39 GMT 2026
    - 64.2K bytes
    - Click Count (0)
  6. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

        final int throwAfterCount;
        final RuntimeException thrown;
        int count;
    
        ThrowingRunnable(int throwAfterCount, RuntimeException thrown) {
          this.throwAfterCount = throwAfterCount;
          this.thrown = thrown;
        }
    
        @Override
        public void run() {
          if (++count >= throwAfterCount) {
            throw thrown;
          }
        }
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 26.1K bytes
    - Click Count (0)
  7. android/guava/src/com/google/common/collect/SneakyThrows.java

       *     write {@code throw sneakyThrow(t);} to convince the compiler that the statement will always
       *     throw.
       */
      @CanIgnoreReturnValue
      static Error sneakyThrow(Throwable t) {
        throw new SneakyThrows<Error>().throwIt(t);
      }
    
      @SuppressWarnings("unchecked") // not really safe, but that's the point
      private Error throwIt(Throwable t) throws T {
        throw (T) t;
      }
    
      private SneakyThrows() {}
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Dec 30 18:44:22 GMT 2024
    - 2.4K bytes
    - Click Count (0)
  8. android/guava/src/com/google/common/util/concurrent/SneakyThrows.java

       *     write {@code throw sneakyThrow(t);} to convince the compiler that the statement will always
       *     throw.
       */
      @CanIgnoreReturnValue
      static Error sneakyThrow(Throwable t) {
        throw new SneakyThrows<Error>().throwIt(t);
      }
    
      @SuppressWarnings("unchecked") // not really safe, but that's the point
      private Error throwIt(Throwable t) throws T {
        throw (T) t;
      }
    
      private SneakyThrows() {}
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Dec 30 18:44:22 GMT 2024
    - 2.4K bytes
    - Click Count (0)
  9. guava-tests/test/com/google/common/eventbus/SubscriberTest.java

        methodCalled = true;
        methodArgument = arg;
      }
    
      @Subscribe
      public void exceptionThrowingMethod(Object arg) throws Exception {
        throw new IntentionalException();
      }
    
      /** Local exception subclass to check variety of exception thrown. */
      static final class IntentionalException extends Exception {
    
        private static final long serialVersionUID = -2500191180248181379L;
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Dec 26 21:52:12 GMT 2025
    - 4.8K bytes
    - Click Count (0)
  10. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

         *
         * @throws ExecutionException if {@code closingFuture} is a failed step
         * @throws CancellationException if the {@code closingFuture}'s future was cancelled
         * @throws IllegalArgumentException if {@code closingFuture} is not one of the futures passed to
         *     {@link #whenAllComplete(Iterable)} or {@link #whenAllComplete(Iterable)}
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Apr 01 17:27:13 GMT 2026
    - 101.7K bytes
    - Click Count (0)
Back to Top