mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-09 03:24:58 +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.Map;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
private static void addProcessors(final Processor processor, final String... keys) {
|
||||
for (final String key : keys) {
|
||||
addProcessor(key, processor);
|
||||
}
|
||||
Stream.of(keys).forEach(e -> addProcessor(e, processor));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user