Skip to content

Commit

Permalink
replace asIterator to addres android api issues
Browse files Browse the repository at this point in the history
  • Loading branch information
belaban committed Jul 30, 2024
1 parent 57fb2a7 commit dc64687
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/org/jgroups/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -4801,7 +4801,10 @@ private static synchronized Collection<InetAddress> getAllAvailableAddresses() {
for(NetworkInterface intf: interfaces) {
if(!isUp(intf) /*!intf.isUp()*/)
continue;
intf.getInetAddresses().asIterator().forEachRemaining(addresses::add);
Enumeration<InetAddress> inetAddresses=intf.getInetAddresses();
while(inetAddresses.hasMoreElements()) {
addresses.add(inetAddresses.nextElement());
}
}
}
catch(SocketException e) {
Expand Down

0 comments on commit dc64687

Please sign in to comment.