AbstractHafasLegacyProvider: Use a bulk operation.

This commit is contained in:
Andreas Schildbach 2019-10-29 09:18:35 +01:00
parent 64c4b240fd
commit 0f8eaaead6

View file

@ -28,6 +28,7 @@ import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar; import java.util.Calendar;
import java.util.Collections; import java.util.Collections;
import java.util.Date; import java.util.Date;
@ -2984,8 +2985,7 @@ public abstract class AbstractHafasLegacyProvider extends AbstractHafasProvider
comment); comment);
} else { } else {
final Set<Line.Attr> attrSet = new HashSet<>(); final Set<Line.Attr> attrSet = new HashSet<>();
for (final Line.Attr attr : attrs) attrSet.addAll(Arrays.asList(attrs));
attrSet.add(attr);
return new Line(null, network, product, normalizedName, lineStyle(network, product, normalizedName), return new Line(null, network, product, normalizedName, lineStyle(network, product, normalizedName),
attrSet, comment); attrSet, comment);
} }