mirror of
https://github.com/google/nomulus
synced 2026-01-05 13:07:04 +00: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:
@@ -126,7 +126,11 @@ public class RdapDomainSearchAction extends RdapActionBase {
|
|||||||
ImmutableMap.Builder<String, Object> builder = new ImmutableMap.Builder<>();
|
ImmutableMap.Builder<String, Object> builder = new ImmutableMap.Builder<>();
|
||||||
builder.put("domainSearchResults", results);
|
builder.put("domainSearchResults", results);
|
||||||
RdapJsonFormatter.addTopLevelEntries(
|
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();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,11 @@ public class RdapEntitySearchAction extends RdapActionBase {
|
|||||||
ImmutableMap.Builder<String, Object> jsonBuilder = new ImmutableMap.Builder<>();
|
ImmutableMap.Builder<String, Object> jsonBuilder = new ImmutableMap.Builder<>();
|
||||||
jsonBuilder.put("entitySearchResults", results);
|
jsonBuilder.put("entitySearchResults", results);
|
||||||
RdapJsonFormatter.addTopLevelEntries(
|
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();
|
return jsonBuilder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ public class RdapHelpAction extends RdapActionBase {
|
|||||||
builder,
|
builder,
|
||||||
BoilerplateType.OTHER,
|
BoilerplateType.OTHER,
|
||||||
ImmutableList.of(getJsonHelpNotice(pathSearchString, rdapLinkBase)),
|
ImmutableList.of(getJsonHelpNotice(pathSearchString, rdapLinkBase)),
|
||||||
ImmutableList.of(),
|
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||||
rdapLinkBase);
|
rdapLinkBase);
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -507,7 +507,10 @@ public class RdapJsonFormatter {
|
|||||||
}
|
}
|
||||||
if (isTopLevel) {
|
if (isTopLevel) {
|
||||||
addTopLevelEntries(
|
addTopLevelEntries(
|
||||||
jsonBuilder, BoilerplateType.DOMAIN, remarks, ImmutableList.of(), linkBase);
|
jsonBuilder,
|
||||||
|
BoilerplateType.DOMAIN,
|
||||||
|
remarks,
|
||||||
|
ImmutableList.<ImmutableMap<String, Object>>of(), linkBase);
|
||||||
} else if (!remarks.isEmpty()) {
|
} else if (!remarks.isEmpty()) {
|
||||||
jsonBuilder.put(REMARKS, remarks);
|
jsonBuilder.put(REMARKS, remarks);
|
||||||
}
|
}
|
||||||
@@ -586,7 +589,10 @@ public class RdapJsonFormatter {
|
|||||||
}
|
}
|
||||||
if (isTopLevel) {
|
if (isTopLevel) {
|
||||||
addTopLevelEntries(
|
addTopLevelEntries(
|
||||||
jsonBuilder, BoilerplateType.NAMESERVER, remarks, ImmutableList.of(), linkBase);
|
jsonBuilder,
|
||||||
|
BoilerplateType.NAMESERVER,
|
||||||
|
remarks,
|
||||||
|
ImmutableList.<ImmutableMap<String, Object>>of(), linkBase);
|
||||||
} else if (!remarks.isEmpty()) {
|
} else if (!remarks.isEmpty()) {
|
||||||
jsonBuilder.put(REMARKS, remarks);
|
jsonBuilder.put(REMARKS, remarks);
|
||||||
}
|
}
|
||||||
@@ -672,7 +678,11 @@ public class RdapJsonFormatter {
|
|||||||
}
|
}
|
||||||
if (isTopLevel) {
|
if (isTopLevel) {
|
||||||
addTopLevelEntries(
|
addTopLevelEntries(
|
||||||
jsonBuilder, BoilerplateType.ENTITY, remarks, ImmutableList.of(), linkBase);
|
jsonBuilder,
|
||||||
|
BoilerplateType.ENTITY,
|
||||||
|
remarks,
|
||||||
|
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||||
|
linkBase);
|
||||||
} else if (!remarks.isEmpty()) {
|
} else if (!remarks.isEmpty()) {
|
||||||
jsonBuilder.put(REMARKS, remarks);
|
jsonBuilder.put(REMARKS, remarks);
|
||||||
}
|
}
|
||||||
@@ -768,7 +778,11 @@ public class RdapJsonFormatter {
|
|||||||
}
|
}
|
||||||
if (isTopLevel) {
|
if (isTopLevel) {
|
||||||
addTopLevelEntries(
|
addTopLevelEntries(
|
||||||
jsonBuilder, BoilerplateType.ENTITY, remarks, ImmutableList.of(), linkBase);
|
jsonBuilder,
|
||||||
|
BoilerplateType.ENTITY,
|
||||||
|
remarks,
|
||||||
|
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||||
|
linkBase);
|
||||||
} else if (!remarks.isEmpty()) {
|
} else if (!remarks.isEmpty()) {
|
||||||
jsonBuilder.put(REMARKS, remarks);
|
jsonBuilder.put(REMARKS, remarks);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,8 +106,8 @@ public class RdapNameserverSearchAction extends RdapActionBase {
|
|||||||
RdapJsonFormatter.addTopLevelEntries(
|
RdapJsonFormatter.addTopLevelEntries(
|
||||||
jsonBuilder,
|
jsonBuilder,
|
||||||
BoilerplateType.NAMESERVER,
|
BoilerplateType.NAMESERVER,
|
||||||
ImmutableList.of(),
|
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||||
ImmutableList.of(),
|
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||||
rdapLinkBase);
|
rdapLinkBase);
|
||||||
return jsonBuilder.build();
|
return jsonBuilder.build();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,8 +83,8 @@ public class RdapActionBaseTest {
|
|||||||
RdapJsonFormatter.addTopLevelEntries(
|
RdapJsonFormatter.addTopLevelEntries(
|
||||||
builder,
|
builder,
|
||||||
BoilerplateType.OTHER,
|
BoilerplateType.OTHER,
|
||||||
ImmutableList.of(),
|
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||||
ImmutableList.of(),
|
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||||
"http://myserver.google.com/");
|
"http://myserver.google.com/");
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -473,8 +473,8 @@ public class RdapJsonFormatterTest {
|
|||||||
RdapJsonFormatter.addTopLevelEntries(
|
RdapJsonFormatter.addTopLevelEntries(
|
||||||
builder,
|
builder,
|
||||||
RdapJsonFormatter.BoilerplateType.OTHER,
|
RdapJsonFormatter.BoilerplateType.OTHER,
|
||||||
ImmutableList.of(),
|
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||||
ImmutableList.of(),
|
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||||
LINK_BASE);
|
LINK_BASE);
|
||||||
assertThat(builder.build()).isEqualTo(loadJson("rdapjson_toplevel.json"));
|
assertThat(builder.build()).isEqualTo(loadJson("rdapjson_toplevel.json"));
|
||||||
}
|
}
|
||||||
@@ -487,7 +487,7 @@ public class RdapJsonFormatterTest {
|
|||||||
builder,
|
builder,
|
||||||
RdapJsonFormatter.BoilerplateType.OTHER,
|
RdapJsonFormatter.BoilerplateType.OTHER,
|
||||||
ImmutableList.of(RdapHelpAction.getJsonHelpNotice("/tos", LINK_BASE)),
|
ImmutableList.of(RdapHelpAction.getJsonHelpNotice("/tos", LINK_BASE)),
|
||||||
ImmutableList.of(),
|
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||||
LINK_BASE);
|
LINK_BASE);
|
||||||
assertThat(builder.build()).isEqualTo(loadJson("rdapjson_toplevel.json"));
|
assertThat(builder.build()).isEqualTo(loadJson("rdapjson_toplevel.json"));
|
||||||
}
|
}
|
||||||
@@ -499,8 +499,8 @@ public class RdapJsonFormatterTest {
|
|||||||
RdapJsonFormatter.addTopLevelEntries(
|
RdapJsonFormatter.addTopLevelEntries(
|
||||||
builder,
|
builder,
|
||||||
RdapJsonFormatter.BoilerplateType.DOMAIN,
|
RdapJsonFormatter.BoilerplateType.DOMAIN,
|
||||||
ImmutableList.of(),
|
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||||
ImmutableList.of(),
|
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||||
LINK_BASE);
|
LINK_BASE);
|
||||||
assertThat(builder.build()).isEqualTo(loadJson("rdapjson_toplevel_domain.json"));
|
assertThat(builder.build()).isEqualTo(loadJson("rdapjson_toplevel_domain.json"));
|
||||||
}
|
}
|
||||||
@@ -513,7 +513,7 @@ public class RdapJsonFormatterTest {
|
|||||||
builder,
|
builder,
|
||||||
RdapJsonFormatter.BoilerplateType.DOMAIN,
|
RdapJsonFormatter.BoilerplateType.DOMAIN,
|
||||||
ImmutableList.of(RdapHelpAction.getJsonHelpNotice("/tos", LINK_BASE)),
|
ImmutableList.of(RdapHelpAction.getJsonHelpNotice("/tos", LINK_BASE)),
|
||||||
ImmutableList.of(),
|
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||||
LINK_BASE);
|
LINK_BASE);
|
||||||
assertThat(builder.build()).isEqualTo(loadJson("rdapjson_toplevel_domain.json"));
|
assertThat(builder.build()).isEqualTo(loadJson("rdapjson_toplevel_domain.json"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user