mirror of
https://github.com/google/nomulus.git
synced 2025-06-26 22:34:55 +02:00
Migrate Guava Predicates.notNull to Objects.nonNull
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=179569444
This commit is contained in:
parent
633eb3179a
commit
0bb2e12a8a
7 changed files with 15 additions and 16 deletions
|
@ -14,7 +14,6 @@
|
|||
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.base.Predicates.notNull;
|
||||
import static com.google.common.util.concurrent.Futures.addCallback;
|
||||
import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
|
||||
|
||||
|
@ -30,6 +29,7 @@ import google.registry.export.ExportConstants;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/** Command to load Datastore snapshots into Bigquery. */
|
||||
@Parameters(separators = " =", commandDescription = "Load Datastore snapshot into Bigquery")
|
||||
|
@ -120,7 +120,7 @@ final class LoadSnapshotCommand extends BigqueryCommand {
|
|||
}
|
||||
// Block on the completion of all the load jobs.
|
||||
List<?> results = Futures.successfulAsList(loadJobs.values()).get();
|
||||
int numSucceeded = (int) results.stream().filter(notNull()).count();
|
||||
int numSucceeded = (int) results.stream().filter(Objects::nonNull).count();
|
||||
System.err.printf(
|
||||
"All load jobs have terminated: %d/%d successful.\n",
|
||||
numSucceeded, loadJobs.size());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue