mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Use Predicates.not for one-liner functionals when appropriate
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=193386976
This commit is contained in:
parent
744727a58f
commit
9ed4d43f41
3 changed files with 5 additions and 4 deletions
|
@ -14,6 +14,7 @@
|
|||
|
||||
package google.registry.rdap;
|
||||
|
||||
import static com.google.common.base.Predicates.not;
|
||||
import static com.google.common.base.Strings.nullToEmpty;
|
||||
import static com.google.common.collect.ImmutableList.toImmutableList;
|
||||
import static com.google.common.collect.ImmutableSortedSet.toImmutableSortedSet;
|
||||
|
@ -57,7 +58,6 @@ import java.net.URI;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
import javax.annotation.Nullable;
|
||||
|
@ -1153,7 +1153,7 @@ public class RdapJsonFormatter {
|
|||
if (isDeleted) {
|
||||
stream =
|
||||
Streams.concat(
|
||||
stream.filter(rdapStatus -> !Objects.equals(rdapStatus, RdapStatus.ACTIVE)),
|
||||
stream.filter(not(RdapStatus.ACTIVE::equals)),
|
||||
Stream.of(RdapStatus.INACTIVE));
|
||||
}
|
||||
return stream
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue