Skip to content

Commit

Permalink
Fix potential NPE in AppStateCollector.getIpAddresses()
Browse files Browse the repository at this point in the history
  • Loading branch information
ehrmann committed May 3, 2019
1 parent 21d6f21 commit 4ea9125
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ private List<String> getIpAddresses() {
List<String> addresses = new ArrayList<>();
try {
for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces();
en.hasMoreElements(); ) {
en != null && en.hasMoreElements(); ) {
NetworkInterface intf = en.nextElement();
for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses();
enumIpAddr.hasMoreElements(); ) {
Expand Down

0 comments on commit 4ea9125

Please sign in to comment.