diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Routing.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Routing.java index 2cdc552b6..7c97fab6e 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Routing.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Routing.java @@ -8,6 +8,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; +import java.util.stream.Collectors; /** * 交路(从一个车站的可折返区段到另一个车站的可折返区段,途经的所有可停车区段列表) @@ -69,6 +70,6 @@ public class Routing { } list.add(endSection); } - return list; + return list.stream().distinct().collect(Collectors.toList()); } }