From 7b3bd3f4ea2534bbabe4304b80d7139b942902f7 Mon Sep 17 00:00:00 2001 From: ljacqu Date: Sat, 18 Feb 2017 23:00:19 +0100 Subject: [PATCH] Make the Travis build great again Curious that only TravisCI has issues with some lambda code creating a map. Both CircleCI and our project Jenkins are happy with it. The same JDK is configured for TravisCI and CircleCI, too... --- .../executable/authme/debug/DebugCommand.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/fr/xephi/authme/command/executable/authme/debug/DebugCommand.java b/src/main/java/fr/xephi/authme/command/executable/authme/debug/DebugCommand.java index 8e7168f2d..9d67da39a 100644 --- a/src/main/java/fr/xephi/authme/command/executable/authme/debug/DebugCommand.java +++ b/src/main/java/fr/xephi/authme/command/executable/authme/debug/DebugCommand.java @@ -6,11 +6,10 @@ import fr.xephi.authme.initialization.factory.Factory; import org.bukkit.command.CommandSender; import javax.inject.Inject; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.function.Function; -import java.util.stream.Collectors; /** * Debug command main. @@ -44,9 +43,12 @@ public class DebugCommand implements ExecutableCommand { // Lazy getter private Map getSections() { if (sections == null) { - sections = sectionClasses.stream() - .map(debugSectionFactory::newInstance) - .collect(Collectors.toMap(DebugSection::getName, Function.identity())); + Map sections = new HashMap<>(); + for (Class sectionClass : sectionClasses) { + DebugSection section = debugSectionFactory.newInstance(sectionClass); + sections.put(section.getName(), section); + } + this.sections = sections; } return sections; }