mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-29 20:17:36 +01:00
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...
This commit is contained in:
parent
152d1dc216
commit
7b3bd3f4ea
@ -6,11 +6,10 @@ import fr.xephi.authme.initialization.factory.Factory;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.function.Function;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Debug command main.
|
* Debug command main.
|
||||||
@ -44,9 +43,12 @@ public class DebugCommand implements ExecutableCommand {
|
|||||||
// Lazy getter
|
// Lazy getter
|
||||||
private Map<String, DebugSection> getSections() {
|
private Map<String, DebugSection> getSections() {
|
||||||
if (sections == null) {
|
if (sections == null) {
|
||||||
sections = sectionClasses.stream()
|
Map<String, DebugSection> sections = new HashMap<>();
|
||||||
.map(debugSectionFactory::newInstance)
|
for (Class<? extends DebugSection> sectionClass : sectionClasses) {
|
||||||
.collect(Collectors.toMap(DebugSection::getName, Function.identity()));
|
DebugSection section = debugSectionFactory.newInstance(sectionClass);
|
||||||
|
sections.put(section.getName(), section);
|
||||||
|
}
|
||||||
|
this.sections = sections;
|
||||||
}
|
}
|
||||||
return sections;
|
return sections;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user