- if (ipAddresses.length() == 0) { // This is the first IP address.
- // Add the IP address to the string builder.
- ipAddresses.append(inetAddress.getHostAddress());
- } else { // This is not the first IP address.
- // Add a line break to the string builder first.
+ // Add a line break to the string builder if this is not the first IP address.
+ if (ipAddresses.length() > 0) {