Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 55 for setException (0.48 sec)

  1. 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)
  2. 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)
  3. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

        SettableFuture<Object> future3 = SettableFuture.create();
        ListenableFuture<List<Object>> all = allAsList(future1, future2, future3);
    
        future1.setException(new MyException());
        future2.setException(new MyException());
        future3.setException(new MyException());
    
        try {
          getDone(all);
          fail();
        } catch (ExecutionException expected) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/AggregateFutureState.java

         * immediately fails with the same exception:
         *
         * Thread1: calls setException(), which returns true, context switch before it can CAS
         * seenExceptions to its exception
         *
         * Thread2: calls setException(), which returns false, CASes seenExceptions to its exception,
         * and wrongly believes that its exception is new (leading it to logging it when it shouldn't)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Dec 14 20:35:03 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  9. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/CombinedFuture.java

             */
            CombinedFuture.this.setException(((ExecutionException) error).getCause());
          } else if (error instanceof CancellationException) {
            cancel(false);
          } else {
            CombinedFuture.this.setException(error);
          }
        }
    
        abstract void setValue(@ParametricNullness T value);
      }
    
      @WeakOuter
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 6.8K bytes
    - Viewed (0)
Back to top