Fix bug in makeDBConnection
The stream was producing a map that had a string composed of forge=uri
as a key. In the map we want to have forge as the key to be able to
select the connection based on the forge.
@@ -231,7 +231,7 @@ public class FastenServer implements Runnable {
dbPlugins.forEach((p) -> {
if (dbUrls != null) {
p.setDBConnection(dbUrls.entrySet().stream().map(e -> new AbstractMap.SimpleEntry<>(e.getKey(),
- e.getValue())).collect(Collectors.toMap(AbstractMap.SimpleEntry::toString, e -> {
+ e.getValue())).collect(Collectors.toMap(AbstractMap.SimpleEntry::getKey, e -> {
try {
logger.debug("Set {} DB connection successfully for plug-in {}",
e.getKey(), p.getClass().getSimpleName());
