Skip to content

Commit 986cf74

Browse files
committed
ScriptProcessorService: be less Java-8-happy
The PluginService already has a perfectly nice, succinct createInstances method. No need to map over its createInstance method via streams.
1 parent 793ab91 commit 986cf74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/scijava/script/process/ScriptProcessorService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public interface ScriptProcessorService extends
5858
* line in sequence.
5959
*/
6060
default String process(final ScriptInfo info) throws IOException {
61-
final List<ScriptProcessor> processors = getPlugins().stream().map(
62-
p -> pluginService().createInstance(p)).collect(Collectors.toList());
61+
final List<ScriptProcessor> processors = //
62+
pluginService().createInstances(getPlugins());
6363

6464
BufferedReader reader = info.getReader();
6565
if (reader == null) {

0 commit comments

Comments
 (0)