Skip to content

Commit

Permalink
Add SubnetInfo.streamAddressStrings()
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Oct 13, 2024
1 parent a65a553 commit 66f1534
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/org/apache/commons/net/util/SubnetUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import java.util.Iterator;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.commons.io.function.IOStream;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;

/**
* Performs subnet calculations given a network address and a subnet mask.
Expand Down Expand Up @@ -303,8 +303,8 @@ private long networkLong() {
* @see #iterableAddressStrings()
* @since 3.12.0
*/
public IOStream<String> streamAddressStrings() {
return IOStream.of(iterableAddressStrings());
public Stream<String> streamAddressStrings() {
return StreamSupport.stream(iterableAddressStrings().spliterator(), false);
}

/**
Expand Down

0 comments on commit 66f1534

Please sign in to comment.