From a7de9a63f77faac8c535d1ab340bb5046f3955fd Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 4 Jan 2021 21:33:29 +0100 Subject: VPN work. Finding all connections for a VPN host. --- src/main/java/io/trygvis/rules/acme/AcmeIo.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java/io') diff --git a/src/main/java/io/trygvis/rules/acme/AcmeIo.java b/src/main/java/io/trygvis/rules/acme/AcmeIo.java index 0bd0f1e..498a4a6 100644 --- a/src/main/java/io/trygvis/rules/acme/AcmeIo.java +++ b/src/main/java/io/trygvis/rules/acme/AcmeIo.java @@ -57,6 +57,7 @@ public class AcmeIo { dump(s, factHandles, (o) -> true); } + // This should just sort by all getters instead. static class FactCollection { public final Class type; public final List values; @@ -73,6 +74,10 @@ public class AcmeIo { comparator = comparable(type, "name"); } + if (comparator == null) { + comparator = comparable(type, "fqdn"); + } + if (comparator == null) { comparator = Comparator.comparingInt(System::identityHashCode); } -- cgit v1.2.3