You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/06/26 00:27:13 UTC

[GitHub] [trafficcontrol] rawlinp commented on a change in pull request #4834: fixed TR NPE where ipAddresses gets set to null

rawlinp commented on a change in pull request #4834:
URL: https://github.com/apache/trafficcontrol/pull/4834#discussion_r445907070



##########
File path: traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/edge/Node.java
##########
@@ -89,9 +89,6 @@ public String getId() {
 
 	@SuppressWarnings({"PMD.CyclomaticComplexity", "PMD.NPathComplexity"})
 	public List<InetRecord> getIpAddresses(final JsonNode ttls, final Resolver resolver, final boolean ip6RoutingEnabled) {

Review comment:
       I think this is good.
   
   A) we should never allow an external API to change `ipAddresses`.
   B) I don't think we ever really have a good reason to use a `Resolver` (like `ZoneManager` here, which will default to using the system resolver if the fqdn is outside of TR's zone).
   
   However, I now notice that `resolver` is unused in this method, so we should remove that parameter and fix all the places this method is called to no longer pass in `ZoneManager` as a resolver.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org