Skip to content

Commit

Permalink
Add @DoNotMock to ListenableFuture
Browse files Browse the repository at this point in the history
Remove @DoNotMock from AbstractFuture, as it is now covered by @DoNotMock on ListenableFuture

RELNOTES=N/A

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=284433016
  • Loading branch information
jlavallee authored and cgdecker committed Dec 9, 2019
1 parent 4eea0f7 commit add4309
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
Expand Up @@ -21,6 +21,7 @@
import com.google.common.annotations.GwtIncompatible;
import com.google.common.base.Function;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import com.google.errorprone.annotations.DoNotMock;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
Expand Down Expand Up @@ -69,6 +70,7 @@
* @since 23.0
*/
@Beta
@DoNotMock("Use FluentFuture.from(Futures.immediate*Future) or SettableFuture")
@GwtCompatible(emulated = true)
public abstract class FluentFuture<V> extends GwtFluentFutureCatchingSpecialization<V> {

Expand Down
Expand Up @@ -14,6 +14,7 @@

package com.google.common.util.concurrent;

import com.google.errorprone.annotations.DoNotMock;
import java.util.concurrent.Executor;
import java.util.concurrent.Future;
import java.util.concurrent.RejectedExecutionException;
Expand Down Expand Up @@ -98,6 +99,7 @@
* @author Nishant Thakkar
* @since 1.0
*/
@DoNotMock("Use the methods in Futures (like immediateFuture) or SettableFuture")
public interface ListenableFuture<V> extends Future<V> {
/**
* Registers a listener to be {@linkplain Executor#execute(Runnable) run} on the given executor.
Expand Down
Expand Up @@ -14,6 +14,7 @@

package com.google.common.util.concurrent;

import com.google.errorprone.annotations.DoNotMock;
import java.util.concurrent.Executor;
import java.util.concurrent.Future;
import java.util.concurrent.RejectedExecutionException;
Expand Down Expand Up @@ -98,6 +99,7 @@
* @author Nishant Thakkar
* @since 1.0
*/
@DoNotMock("Use the methods in Futures (like immediateFuture) or SettableFuture")
public interface ListenableFuture<V> extends Future<V> {
/**
* Registers a listener to be {@linkplain Executor#execute(Runnable) run} on the given executor.
Expand Down
2 changes: 2 additions & 0 deletions guava/src/com/google/common/util/concurrent/FluentFuture.java
Expand Up @@ -22,6 +22,7 @@
import com.google.common.annotations.GwtIncompatible;
import com.google.common.base.Function;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import com.google.errorprone.annotations.DoNotMock;
import java.time.Duration;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
Expand Down Expand Up @@ -71,6 +72,7 @@
* @since 23.0
*/
@Beta
@DoNotMock("Use FluentFuture.from(Futures.immediate*Future) or SettableFuture")
@GwtCompatible(emulated = true)
public abstract class FluentFuture<V> extends GwtFluentFutureCatchingSpecialization<V> {

Expand Down
Expand Up @@ -14,6 +14,7 @@

package com.google.common.util.concurrent;

import com.google.errorprone.annotations.DoNotMock;
import java.util.concurrent.Executor;
import java.util.concurrent.Future;
import java.util.concurrent.RejectedExecutionException;
Expand Down Expand Up @@ -98,6 +99,7 @@
* @author Nishant Thakkar
* @since 1.0
*/
@DoNotMock("Use the methods in Futures (like immediateFuture) or SettableFuture")
public interface ListenableFuture<V> extends Future<V> {
/**
* Registers a listener to be {@linkplain Executor#execute(Runnable) run} on the given executor.
Expand Down

0 comments on commit add4309

Please sign in to comment.