mirror of
https://github.com/google/nomulus.git
synced 2025-05-16 17:37:13 +02:00
Add type parameters to suppress Eclipse error message
Eclipse (with Guide) is bothering me very much that it cannot infer the intended type for ImmutableList.of() from the argument type that the calling function defines. Adding explicit type parameters to get rid of the annoying exclamations marks in Eclipse. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=134105086
This commit is contained in:
parent
8d4234090e
commit
de7fb7a202
7 changed files with 39 additions and 17 deletions
|
@ -126,7 +126,11 @@ public class RdapDomainSearchAction extends RdapActionBase {
|
|||
ImmutableMap.Builder<String, Object> builder = new ImmutableMap.Builder<>();
|
||||
builder.put("domainSearchResults", results);
|
||||
RdapJsonFormatter.addTopLevelEntries(
|
||||
builder, BoilerplateType.DOMAIN, ImmutableList.of(), ImmutableList.of(), rdapLinkBase);
|
||||
builder,
|
||||
BoilerplateType.DOMAIN,
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
rdapLinkBase);
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,11 @@ public class RdapEntitySearchAction extends RdapActionBase {
|
|||
ImmutableMap.Builder<String, Object> jsonBuilder = new ImmutableMap.Builder<>();
|
||||
jsonBuilder.put("entitySearchResults", results);
|
||||
RdapJsonFormatter.addTopLevelEntries(
|
||||
jsonBuilder, BoilerplateType.ENTITY, ImmutableList.of(), ImmutableList.of(), rdapLinkBase);
|
||||
jsonBuilder,
|
||||
BoilerplateType.ENTITY,
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
rdapLinkBase);
|
||||
return jsonBuilder.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ public class RdapHelpAction extends RdapActionBase {
|
|||
builder,
|
||||
BoilerplateType.OTHER,
|
||||
ImmutableList.of(getJsonHelpNotice(pathSearchString, rdapLinkBase)),
|
||||
ImmutableList.of(),
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
rdapLinkBase);
|
||||
return builder.build();
|
||||
}
|
||||
|
|
|
@ -507,7 +507,10 @@ public class RdapJsonFormatter {
|
|||
}
|
||||
if (isTopLevel) {
|
||||
addTopLevelEntries(
|
||||
jsonBuilder, BoilerplateType.DOMAIN, remarks, ImmutableList.of(), linkBase);
|
||||
jsonBuilder,
|
||||
BoilerplateType.DOMAIN,
|
||||
remarks,
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(), linkBase);
|
||||
} else if (!remarks.isEmpty()) {
|
||||
jsonBuilder.put(REMARKS, remarks);
|
||||
}
|
||||
|
@ -586,7 +589,10 @@ public class RdapJsonFormatter {
|
|||
}
|
||||
if (isTopLevel) {
|
||||
addTopLevelEntries(
|
||||
jsonBuilder, BoilerplateType.NAMESERVER, remarks, ImmutableList.of(), linkBase);
|
||||
jsonBuilder,
|
||||
BoilerplateType.NAMESERVER,
|
||||
remarks,
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(), linkBase);
|
||||
} else if (!remarks.isEmpty()) {
|
||||
jsonBuilder.put(REMARKS, remarks);
|
||||
}
|
||||
|
@ -672,7 +678,11 @@ public class RdapJsonFormatter {
|
|||
}
|
||||
if (isTopLevel) {
|
||||
addTopLevelEntries(
|
||||
jsonBuilder, BoilerplateType.ENTITY, remarks, ImmutableList.of(), linkBase);
|
||||
jsonBuilder,
|
||||
BoilerplateType.ENTITY,
|
||||
remarks,
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
linkBase);
|
||||
} else if (!remarks.isEmpty()) {
|
||||
jsonBuilder.put(REMARKS, remarks);
|
||||
}
|
||||
|
@ -768,7 +778,11 @@ public class RdapJsonFormatter {
|
|||
}
|
||||
if (isTopLevel) {
|
||||
addTopLevelEntries(
|
||||
jsonBuilder, BoilerplateType.ENTITY, remarks, ImmutableList.of(), linkBase);
|
||||
jsonBuilder,
|
||||
BoilerplateType.ENTITY,
|
||||
remarks,
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
linkBase);
|
||||
} else if (!remarks.isEmpty()) {
|
||||
jsonBuilder.put(REMARKS, remarks);
|
||||
}
|
||||
|
|
|
@ -106,8 +106,8 @@ public class RdapNameserverSearchAction extends RdapActionBase {
|
|||
RdapJsonFormatter.addTopLevelEntries(
|
||||
jsonBuilder,
|
||||
BoilerplateType.NAMESERVER,
|
||||
ImmutableList.of(),
|
||||
ImmutableList.of(),
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
rdapLinkBase);
|
||||
return jsonBuilder.build();
|
||||
}
|
||||
|
|
|
@ -83,8 +83,8 @@ public class RdapActionBaseTest {
|
|||
RdapJsonFormatter.addTopLevelEntries(
|
||||
builder,
|
||||
BoilerplateType.OTHER,
|
||||
ImmutableList.of(),
|
||||
ImmutableList.of(),
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
"http://myserver.google.com/");
|
||||
return builder.build();
|
||||
}
|
||||
|
|
|
@ -473,8 +473,8 @@ public class RdapJsonFormatterTest {
|
|||
RdapJsonFormatter.addTopLevelEntries(
|
||||
builder,
|
||||
RdapJsonFormatter.BoilerplateType.OTHER,
|
||||
ImmutableList.of(),
|
||||
ImmutableList.of(),
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
LINK_BASE);
|
||||
assertThat(builder.build()).isEqualTo(loadJson("rdapjson_toplevel.json"));
|
||||
}
|
||||
|
@ -487,7 +487,7 @@ public class RdapJsonFormatterTest {
|
|||
builder,
|
||||
RdapJsonFormatter.BoilerplateType.OTHER,
|
||||
ImmutableList.of(RdapHelpAction.getJsonHelpNotice("/tos", LINK_BASE)),
|
||||
ImmutableList.of(),
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
LINK_BASE);
|
||||
assertThat(builder.build()).isEqualTo(loadJson("rdapjson_toplevel.json"));
|
||||
}
|
||||
|
@ -499,8 +499,8 @@ public class RdapJsonFormatterTest {
|
|||
RdapJsonFormatter.addTopLevelEntries(
|
||||
builder,
|
||||
RdapJsonFormatter.BoilerplateType.DOMAIN,
|
||||
ImmutableList.of(),
|
||||
ImmutableList.of(),
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
LINK_BASE);
|
||||
assertThat(builder.build()).isEqualTo(loadJson("rdapjson_toplevel_domain.json"));
|
||||
}
|
||||
|
@ -513,7 +513,7 @@ public class RdapJsonFormatterTest {
|
|||
builder,
|
||||
RdapJsonFormatter.BoilerplateType.DOMAIN,
|
||||
ImmutableList.of(RdapHelpAction.getJsonHelpNotice("/tos", LINK_BASE)),
|
||||
ImmutableList.of(),
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
LINK_BASE);
|
||||
assertThat(builder.build()).isEqualTo(loadJson("rdapjson_toplevel_domain.json"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue