From 8d18fc9775c8cc7502aa3b9550bcce89c10897b1 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Sun, 25 Jun 2023 14:09:39 +0200 Subject: [PATCH] Network.toString(): Print edges, not reverse edges --- .../main/java/org/pgpainless/wot/dijkstra/sq/Network.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wot-dijkstra/src/main/java/org/pgpainless/wot/dijkstra/sq/Network.java b/wot-dijkstra/src/main/java/org/pgpainless/wot/dijkstra/sq/Network.java index 6596c5dd..1b7b21aa 100644 --- a/wot-dijkstra/src/main/java/org/pgpainless/wot/dijkstra/sq/Network.java +++ b/wot-dijkstra/src/main/java/org/pgpainless/wot/dijkstra/sq/Network.java @@ -113,7 +113,11 @@ public class Network { StringBuilder sb = new StringBuilder("Network with " + getNodes().size() + " nodes, " + edgeNum + " edges:\n"); for (OpenPgpFingerprint issuer : getNodes().keySet()) { - for (CertificationSet edge : getReverseEdges().get(issuer)) { + List edges = getEdges().get(issuer); + if (edges == null) { + continue; + } + for (CertificationSet edge : edges) { sb.append(edge); } }