From 027b4520467f5cc27cc70c4171c89f7f23b2c61e Mon Sep 17 00:00:00 2001 From: Alexander Navratil Date: Wed, 10 Oct 2018 13:07:19 +0200 Subject: [PATCH] fix to return all lines for a given steig --- build.gradle | 2 +- .../at/alexnavratil/echtzeitdaten/EchtzeitdatenApi.java | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index e4ae86c..1890e84 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { } group 'at.alexnavratil' -version '1.3.1' +version '1.3.2' sourceCompatibility = 1.8 diff --git a/src/main/java/at/alexnavratil/echtzeitdaten/EchtzeitdatenApi.java b/src/main/java/at/alexnavratil/echtzeitdaten/EchtzeitdatenApi.java index ef44cee..0f5e441 100644 --- a/src/main/java/at/alexnavratil/echtzeitdaten/EchtzeitdatenApi.java +++ b/src/main/java/at/alexnavratil/echtzeitdaten/EchtzeitdatenApi.java @@ -213,7 +213,12 @@ private Map> extractRealtimeData(String responseB .forEach(departure -> departureList.add(departure.get("departureTime").get("countdown").as(Integer.class))); monitorResponseList.add(new MonitorResponse(lineName, towards, departureList)); }); - responseMap.put(currentRbl, monitorResponseList); + + if(responseMap.containsKey(currentRbl)) { + responseMap.get(currentRbl).addAll(monitorResponseList); + } else { + responseMap.put(currentRbl, monitorResponseList); + } }); return responseMap; } else {