rawlinp opened a new pull request #4765:
URL: https://github.com/apache/trafficcontrol/pull/4765


   ## What does this PR (Pull Request) do?
   
   Fixes a Null Pointer Exception (where there are no available caches for a 
requested DS) and converts some `==` usage to `.equals()` (since I believe we 
want to compare the actual IP addresses and not the pointer references). Also, 
change the method for determining whether a given IP address is IPv4 or IPv6 to 
match what is used elsewhere in similar cases (since `getByName` can have the 
side-effect of doing DNS lookups).
   
   - [x] This PR is not related to any Issue
   
   ## Which Traffic Control components are affected by this PR?
   
   - Traffic Router
   
   ## What is the best way to verify this PR?
   Run the TR unit tests, verify they still pass:
   ```
   mvn clean test -Djava.library.path=/usr/local/opt/tomcat-native/lib
   ```
   Make a request for a DS that doesn't have any available caches, make sure 
that `editCacheListForIpVersion` does not throw a `NullPointerException`.
   
   ## If this is a bug fix, what versions of Traffic Control are affected?
   - master
   - 4.1.0-RC1
   
   ## The following criteria are ALL met by this PR
   
   - [x] Fairly minor fixes, performed manual tests to validate since there 
aren't pre-existing unit tests in this specific area (as far as I can tell)
   - [x] Bugfix, docs unnecessary
   - [x] Unreleased bug, changelog entry unnecessary
   - [x] This PR includes any and all required license headers
   - [x] This PR does not include a database migration
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the 
Apache Software Foundation's security 
guidelines](https://www.apache.org/security/) for details)


----------------------------------------------------------------
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:
[email protected]


Reply via email to