Skip to content

Commit 24fe110

Browse files
committed
[Config] Add unused vars for some call sites
The `unused` vars were added to address a warning raised by errorprone about ignoring returned types. (internal) See b/424298831
1 parent ec904ec commit 24fe110

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

firebase-config/src/main/java/com/google/firebase/remoteconfig/internal/ConfigAutoFetch.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import java.util.Random;
3838
import java.util.Set;
3939
import java.util.concurrent.ScheduledExecutorService;
40+
import java.util.concurrent.ScheduledFuture;
4041
import java.util.concurrent.TimeUnit;
4142
import org.json.JSONException;
4243
import org.json.JSONObject;
@@ -248,11 +249,11 @@ private void autoFetch(int remainingAttempts, long targetVersion) {
248249

249250
// Randomize fetch to occur between 0 - 4 seconds.
250251
int timeTillFetch = random.nextInt(4);
251-
scheduledExecutorService.schedule(
252+
ScheduledFuture<?> unused = scheduledExecutorService.schedule(
252253
new Runnable() {
253254
@Override
254255
public void run() {
255-
fetchLatestConfig(remainingAttempts, targetVersion);
256+
Task<Void> unused = fetchLatestConfig(remainingAttempts, targetVersion);
256257
}
257258
},
258259
timeTillFetch,

firebase-config/src/main/java/com/google/firebase/remoteconfig/internal/ConfigRealtimeHttpClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
import java.util.Random;
5858
import java.util.Set;
5959
import java.util.concurrent.ScheduledExecutorService;
60+
import java.util.concurrent.ScheduledFuture;
6061
import java.util.concurrent.TimeUnit;
6162
import java.util.regex.Matcher;
6263
import java.util.regex.Pattern;
@@ -381,7 +382,7 @@ private synchronized void makeRealtimeHttpConnection(long retryMilliseconds) {
381382

382383
if (httpRetriesRemaining > 0) {
383384
httpRetriesRemaining--;
384-
scheduledExecutorService.schedule(
385+
ScheduledFuture<?> unused = scheduledExecutorService.schedule(
385386
new Runnable() {
386387
@Override
387388
public void run() {

0 commit comments

Comments
 (0)