Package com.google.common.util.concurrent

Examples of com.google.common.util.concurrent.UncheckedExecutionException


   public void testLoaderThrowsAuthorizationExceptionAndAlsoSetsExceptionTypeWhenInUncheckedExecutionException() {
      AtomicReference<AuthorizationException> authException = newReference();
      try {
         new SetAndThrowAuthorizationExceptionSupplierBackedLoader<String>(new Supplier<String>() {
            public String get() {
               throw new UncheckedExecutionException(new AuthorizationException());
            }
         }, authException).load("KEY");
      } finally {
         assertEquals(authException.get().getClass(), AuthorizationException.class);
      }
View Full Code Here


   @SuppressWarnings("serial")
   @DataProvider(name = "exceptions")
   public Object[][] createExceptions() {
      return new Object[][] { { new ExecutionException() {
      } }, { new UncheckedExecutionException() {
      } }, { new InvalidCacheLoadException("foo") } };
   }
View Full Code Here

TOP

Related Classes of com.google.common.util.concurrent.UncheckedExecutionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.