Skip to content

Commit

Permalink
Suppress future Error Prone error for AsyncFunction that returns a _n…
Browse files Browse the repository at this point in the history
…ull Future_, rather than the intended _Future whose value is null_.

-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=86830267
  • Loading branch information
cpovirk committed Feb 23, 2015
1 parent 7765943 commit 9c300eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ public void testCatchingAsync_nullInsteadOfFuture() throws Exception {
ListenableFuture<?> chainedFuture = Futures.catchingAsync(inputFuture, Throwable.class,
new AsyncFunction<Throwable, Integer>() {
@Override
@SuppressWarnings("AsyncFunctionReturnsNull")
public ListenableFuture<Integer> apply(Throwable t) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,7 @@ public void testCatchingAsync_nullInsteadOfFuture() throws Exception {
ListenableFuture<?> chainedFuture = Futures.catchingAsync(inputFuture, Throwable.class,
new AsyncFunction<Throwable, Integer>() {
@Override
@SuppressWarnings("AsyncFunctionReturnsNull")
public ListenableFuture<Integer> apply(Throwable t) {
return null;
}
Expand Down

0 comments on commit 9c300eb

Please sign in to comment.