From 124011a8ce470341579fed102a47615f770212e4 Mon Sep 17 00:00:00 2001 From: mcilwain Date: Tue, 24 Jan 2017 12:27:34 -0800 Subject: [PATCH] Add Optional types to fix Java 7 WHOIS build breakage ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=145452302 --- java/google/registry/whois/DomainLookupCommand.java | 2 +- java/google/registry/whois/NameserverLookupByHostCommand.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/google/registry/whois/DomainLookupCommand.java b/java/google/registry/whois/DomainLookupCommand.java index 0c0deee1d..8391acd50 100644 --- a/java/google/registry/whois/DomainLookupCommand.java +++ b/java/google/registry/whois/DomainLookupCommand.java @@ -37,7 +37,7 @@ public class DomainLookupCommand extends DomainOrHostLookupCommand { protected Optional getResponse(InternetDomainName domainName, DateTime now) { final DomainResource domainResource = loadByForeignKey(DomainResource.class, domainName.toString(), now); - return Optional.fromNullable( + return Optional.fromNullable( domainResource == null ? null : new DomainWhoisResponse(domainResource, now)); } } diff --git a/java/google/registry/whois/NameserverLookupByHostCommand.java b/java/google/registry/whois/NameserverLookupByHostCommand.java index 298f95b3b..9dc39c735 100644 --- a/java/google/registry/whois/NameserverLookupByHostCommand.java +++ b/java/google/registry/whois/NameserverLookupByHostCommand.java @@ -37,7 +37,7 @@ public class NameserverLookupByHostCommand extends DomainOrHostLookupCommand { protected Optional getResponse(InternetDomainName hostName, DateTime now) { final HostResource hostResource = loadByForeignKey(HostResource.class, hostName.toString(), now); - return Optional.fromNullable( + return Optional.fromNullable( hostResource == null ? null : new NameserverWhoisResponse(hostResource, now)); } }