Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 81 for setException (0.2 sec)

  1. android/guava/src/com/google/common/util/concurrent/SettableFuture.java

      @CanIgnoreReturnValue
      @Override
      public boolean set(@ParametricNullness V value) {
        return super.set(value);
      }
    
      @CanIgnoreReturnValue
      @Override
      public boolean setException(Throwable throwable) {
        return super.setException(throwable);
      }
    
      @CanIgnoreReturnValue
      @Override
      public boolean setFuture(ListenableFuture<? extends V> future) {
        return super.setFuture(future);
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 01 17:18:04 GMT 2021
    - 2.4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java

        assertThat(future.set(1)).isTrue();
        assertSuccessful(future, 1);
      }
    
      public void testFailed() throws Exception {
        Exception cause = new Exception();
        assertThat(future.setException(cause)).isTrue();
        assertFailed(future, cause);
      }
    
      public void testCanceled() throws Exception {
        assertThat(future.cancel(false /* mayInterruptIfRunning */)).isTrue();
        assertCancelled(future, false);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java

      }
    
      public void testSetFailure() throws Exception {
        assertTrue(future.setException(new Exception("failure")));
        tester.testFailedFuture("failure");
      }
    
      public void testSetFailureNull() throws Exception {
        assertThrows(NullPointerException.class, () -> future.setException(null));
        assertFalse(future.isDone());
        assertTrue(future.setException(new Exception("failure")));
        tester.testFailedFuture("failure");
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.3K bytes
    - Viewed (1)
  4. android/guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java

      }
    
      public void testSetFailure() throws Exception {
        assertTrue(future.setException(new Exception("failure")));
        tester.testFailedFuture("failure");
      }
    
      public void testSetFailureNull() throws Exception {
        assertThrows(NullPointerException.class, () -> future.setException(null));
        assertFalse(future.isDone());
        assertTrue(future.setException(new Exception("failure")));
        tester.testFailedFuture("failure");
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/AbstractChainedListenableFutureTest.java

      }
    
      public void testFutureGetThrowsWrappedException() throws Exception {
        inputFuture.setException(EXCEPTION);
        listener.assertException(EXCEPTION);
      }
    
      public void testFutureGetThrowsWrappedError() throws Exception {
        Error error = new Error();
        inputFuture.setException(error);
        // Verify that get throws an ExecutionException, caused by an Error, when
        // the callback is called.
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/AbstractTransformFuture.java

         * setException(stackOverflowError) would fail:
         *
         * - If the stack overflowed before set()/setValue() could even store the result in the output
         * Future, then a call setException() would likely also overflow.
         *
         * - If the stack overflowed after set()/setValue() stored its result, then a call to
         * setException() will be a no-op because the Future is already done.
         *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  7. maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java

                    } catch (IOException e) {
                        if (!remoteFile.exists()) {
                            download.setException(new ArtifactNotFoundException(download.getArtifact(), repository));
                        } else {
                            download.setException(new ArtifactTransferException(download.getArtifact(), repository, e));
                        }
                    }
                }
            }
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Wed Feb 28 07:40:37 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java

        boolean set(T t);
    
        @CanIgnoreReturnValue
        boolean setException(Throwable t);
      }
    
      private static class NewAbstractFutureFacade<T> extends AbstractFuture<T> implements Facade<T> {
        @CanIgnoreReturnValue
        @Override
        public boolean set(T t) {
          return super.set(t);
        }
    
        @CanIgnoreReturnValue
        @Override
        public boolean setException(Throwable t) {
          return super.setException(t);
        }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed May 09 15:17:25 GMT 2018
    - 13.6K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java

        boolean set(T t);
    
        @CanIgnoreReturnValue
        boolean setException(Throwable t);
      }
    
      private static class NewAbstractFutureFacade<T> extends AbstractFuture<T> implements Facade<T> {
        @CanIgnoreReturnValue
        @Override
        public boolean set(T t) {
          return super.set(t);
        }
    
        @CanIgnoreReturnValue
        @Override
        public boolean setException(Throwable t) {
          return super.setException(t);
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 13.6K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/UncheckedThrowingFuture.java

        return new UncheckedThrowingFuture<V>();
      }
    
      public void complete(RuntimeException e) {
        if (!super.setException(new WrapperException(checkNotNull(e)))) {
          throw new IllegalStateException("Future was already complete: " + this);
        }
      }
    
      public void complete(Error e) {
        if (!super.setException(new WrapperException(checkNotNull(e)))) {
          throw new IllegalStateException("Future was already complete: " + this);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 12 20:02:10 GMT 2018
    - 3.2K bytes
    - Viewed (0)
Back to top