Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions xds/src/main/java/io/grpc/xds/XdsNameResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ private class ConfigWatcherImpl implements ConfigWatcher {
this.listener = listener;
}

@SuppressWarnings("unchecked")
@Override
public void onConfigChanged(ConfigUpdate update) {
Map<String, ?> rawLbConfig;
Expand Down Expand Up @@ -220,7 +219,7 @@ public void onError(Status error) {
}
}

private static Map<String, ?> generateXdsRoutingRawConfig(List<Route> routesUpdate) {
private static ImmutableMap<String, ?> generateXdsRoutingRawConfig(List<Route> routesUpdate) {
List<Object> routes = new ArrayList<>(routesUpdate.size());
Map<String, Object> actions = new LinkedHashMap<>();
Map<RouteAction, String> exitingActions = new HashMap<>();
Expand Down Expand Up @@ -275,7 +274,7 @@ public void onError(Status error) {
ImmutableMap.of("route", routes, "action", actions));
}

private static Map<String, ?> generateWeightedTargetRawConfig(
private static ImmutableMap<String, ?> generateWeightedTargetRawConfig(
List<ClusterWeight> clusterWeights) {
Map<String, Object> targets = new LinkedHashMap<>();
for (ClusterWeight clusterWeight : clusterWeights) {
Expand All @@ -292,7 +291,7 @@ public void onError(Status error) {
ImmutableMap.of("targets", targets));
}

private static Map<String, ?> generateCdsRawConfig(String clusterName) {
private static ImmutableMap<String, ?> generateCdsRawConfig(String clusterName) {
return ImmutableMap.of(XdsLbPolicies.CDS_POLICY_NAME, ImmutableMap.of("cluster", clusterName));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
@VisibleForTesting
public final class SdsProtocolNegotiators {

// Prevent instantiation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this being removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is to be added.

private SdsProtocolNegotiators() {
}

private static final Logger logger = Logger.getLogger(SdsProtocolNegotiators.class.getName());

private static final AsciiString SCHEME = AsciiString.of("https");
Expand Down