mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-13 05:25:20 +00:00
Use a stream instead of a loop.
This commit is contained in:
parent
9c4d162fdc
commit
ea123dd82e
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An utility class for the os.arch System Property. The class defines methods for
|
* An utility class for the os.arch System Property. The class defines methods for
|
||||||
@ -100,9 +101,7 @@ private static void addProcessor(final String key, final Processor processor) {
|
|||||||
* @throws IllegalStateException If the key already exists.
|
* @throws IllegalStateException If the key already exists.
|
||||||
*/
|
*/
|
||||||
private static void addProcessors(final Processor processor, final String... keys) {
|
private static void addProcessors(final Processor processor, final String... keys) {
|
||||||
for (final String key : keys) {
|
Stream.of(keys).forEach(e -> addProcessor(e, processor));
|
||||||
addProcessor(key, processor);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user