Fix type inference error in RdapDomainSearchAction

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135482307
This commit is contained in:
mcilwain 2016-10-07 09:12:39 -07:00 committed by Ben McIlwain
parent fabbf8871c
commit 503a10bbf8

View file

@ -143,10 +143,10 @@ public class RdapDomainSearchAction extends RdapActionBase {
if (!partialStringQuery.getHasWildcard()) { if (!partialStringQuery.getHasWildcard()) {
DomainResource domainResource = DomainResource domainResource =
loadByForeignKey(DomainResource.class, partialStringQuery.getInitialString(), now); loadByForeignKey(DomainResource.class, partialStringQuery.getInitialString(), now);
return makeSearchResults( ImmutableList<DomainResource> results = (domainResource == null)
(domainResource == null) ? ImmutableList.of() : ImmutableList.of(domainResource), ? ImmutableList.<DomainResource>of()
false, : ImmutableList.of(domainResource);
now); return makeSearchResults(results, false, now);
// Handle queries with a wildcard. // Handle queries with a wildcard.
} else { } else {
// We can't query for undeleted domains as part of the query itself; that would require an // We can't query for undeleted domains as part of the query itself; that would require an
@ -254,7 +254,7 @@ public class RdapDomainSearchAction extends RdapActionBase {
/** /**
* Locates all domains which are linked to a set of host keys. * Locates all domains which are linked to a set of host keys.
* *
* <p>This method is called by {@link #searchByNameserverLdhName} and * <p>This method is called by {@link #searchByNameserverLdhName} and
* {@link #searchByNameserverIp} after they assemble the relevant host keys. * {@link #searchByNameserverIp} after they assemble the relevant host keys.
*/ */
@ -285,7 +285,7 @@ public class RdapDomainSearchAction extends RdapActionBase {
/** /**
* Output JSON for a list of domains. * Output JSON for a list of domains.
* *
* <p>The isTruncated parameter should be true if the search found more results than are in the * <p>The isTruncated parameter should be true if the search found more results than are in the
* list, meaning that the truncation notice should be added. * list, meaning that the truncation notice should be added.
*/ */