Change Optional::isEmpty to Optional::isPresent (#1428)

This commit is contained in:
Rachel Guan 2021-11-18 17:08:15 -05:00 committed by GitHub
parent 8393c75929
commit 548ae25fac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -160,7 +160,7 @@ public class CloudTasksUtils implements Serializable {
Multimap<String, String> params,
Clock clock,
Optional<Integer> jitterSeconds) {
if (jitterSeconds.isEmpty() || jitterSeconds.get() <= 0) {
if (!jitterSeconds.isPresent() || jitterSeconds.get() <= 0) {
return createTask(path, method, service, params);
}
Instant scheduleTime =