mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-06 15:18:49 +00:00
VrsProvider: Use generic type inference for constructing objects.
This commit is contained in:
parent
49f6572fe4
commit
f5c475cf0b
1 changed files with 3 additions and 3 deletions
|
@ -460,11 +460,11 @@ public class VrsProvider extends AbstractNetworkProvider {
|
|||
return new QueryDeparturesResult(header, QueryDeparturesResult.Status.INVALID_STATION);
|
||||
}
|
||||
for (int iStation = 0; iStation < timetable.length(); iStation++) {
|
||||
final List<Departure> departures = new ArrayList<Departure>();
|
||||
final List<Departure> departures = new ArrayList<>();
|
||||
final JSONObject station = timetable.getJSONObject(iStation);
|
||||
final Location location = parseLocationAndPosition(station.getJSONObject("stop")).location;
|
||||
final JSONArray events = station.getJSONArray("events");
|
||||
final List<LineDestination> lines = new ArrayList<LineDestination>();
|
||||
final List<LineDestination> lines = new ArrayList<>();
|
||||
// for all departures
|
||||
for (int iEvent = 0; iEvent < events.length(); iEvent++) {
|
||||
final JSONObject event = events.getJSONObject(iEvent);
|
||||
|
@ -518,7 +518,7 @@ public class VrsProvider extends AbstractNetworkProvider {
|
|||
}
|
||||
|
||||
private void queryLinesForStation(String stationId, List<LineDestination> lineDestinations) throws IOException {
|
||||
Set<String> lineNumbersAlreadyKnown = new HashSet<String>();
|
||||
Set<String> lineNumbersAlreadyKnown = new HashSet<>();
|
||||
for (LineDestination lineDestionation : lineDestinations) {
|
||||
lineNumbersAlreadyKnown.add(lineDestionation.line.label);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue