Propagate @Nonnull and @Nullable annotations
[yangtools.git] / common / util / src / test / java / org / opendaylight / yangtools / util / concurrent / MappingCheckedFutureTest.java
index 5087f15895f823ae8641f8276b4571c24a8339ec..deeafc1c1b747b3412387a308abb9b4036548cd1 100644 (file)
@@ -14,6 +14,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.fail;
+
 import com.google.common.util.concurrent.CheckedFuture;
 import com.google.common.util.concurrent.SettableFuture;
 import java.util.concurrent.CancellationException;
@@ -60,7 +61,7 @@ public class MappingCheckedFutureTest {
         @Override
         public Throwable extractWrappedTestEx( final Exception from ) {
             if (from instanceof ExecutionException ) {
-                return ((ExecutionException)from).getCause();
+                return from.getCause();
             }
 
             return from;
@@ -76,7 +77,7 @@ public class MappingCheckedFutureTest {
         @Override
         public Throwable extractWrappedTestEx( final Exception from ) {
             if (from instanceof ExecutionException ) {
-                return ((ExecutionException)from).getCause();
+                return from.getCause();
             }
 
             return from;