harnen / p2p-service-discovery

0 stars 4 forks source link

Ticket compareTo method violates transitivity #15

Open oascigil opened 4 years ago

oascigil commented 4 years ago

This occasionally leads to the exception below: Exception in thread "main" java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.base/java.util.ComparableTimSort.mergeHi(ComparableTimSort.java:870) at java.base/java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:487) at java.base/java.util.ComparableTimSort.mergeForceCollapse(ComparableTimSort.java:426) at java.base/java.util.ComparableTimSort.sort(ComparableTimSort.java:222) at java.base/java.util.Arrays.sort(Arrays.java:1315) at java.base/java.util.Arrays.sort(Arrays.java:1509) at java.base/java.util.ArrayList.sort(ArrayList.java:1749) at java.base/java.util.Collections.sort(Collections.java:145) at peersim.kademlia.Discv5TopicTable.makeRegisterDecisionForTopic(Discv5TopicTable.java:184) at peersim.kademlia.Discv5TicketProtocol.makeRegisterDecision(Discv5TicketProtocol.java:177) at peersim.kademlia.Discv5TicketProtocol.processEvent(Discv5TicketProtocol.java:800) at peersim.edsim.EDSimulator.executeNext(EDSimulator.java:316) at peersim.edsim.EDSimulator.nextExperiment(EDSimulator.java:362) at peersim.Simulator.main(Simulator.java:194)