File tree Expand file tree Collapse file tree
raptor/src/main/java/org/opentripplanner/raptor/api/request Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,24 +138,10 @@ private List<RaptorViaConnection> validateConnections(List<BuilderStopAndTransfe
138138 if (connections .isEmpty ()) {
139139 throw new IllegalArgumentException ("At least one connection is required." );
140140 }
141- var list = connections
141+ return connections
142142 .stream ()
143143 .map (it -> RaptorViaConnection .of (this , it .fromStop , it .transfer ))
144144 .toList ();
145-
146- // Compare all pairs to check for duplicates and non-optimal connections
147- for (int i = 0 ; i < list .size (); ++i ) {
148- var a = list .get (i );
149- for (int j = i + 1 ; j < list .size (); ++j ) {
150- var b = list .get (j );
151- if (a .isBetterOrEqual (b ) || b .isBetterOrEqual (a )) {
152- throw new IllegalArgumentException (
153- "All connection need to be pareto-optimal: (" + a + ") <-> (" + b + ")"
154- );
155- }
156- }
157- }
158- return list ;
159145 }
160146
161147 public abstract static sealed class AbstractBuilder <T extends AbstractBuilder > {
You can’t perform that action at this time.
0 commit comments