mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-20 17:29:51 +00:00
EFA: Fix parsing of empty <nu> in mobile trips query.
This commit is contained in:
parent
b96238c817
commit
fd3a932957
1 changed files with 8 additions and 2 deletions
|
@ -1776,8 +1776,14 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
|
||||||
final String productName = n != null ? n : de;
|
final String productName = n != null ? n : de;
|
||||||
final String lineId = parseMobileDv(pp);
|
final String lineId = parseMobileDv(pp);
|
||||||
|
|
||||||
final String symbol = productNu.endsWith(" " + productName) ? productNu.substring(0, productNu.length() - productName.length() - 1)
|
final String symbol;
|
||||||
: productNu;
|
if (productName != null && productNu == null)
|
||||||
|
symbol = productName;
|
||||||
|
else if (productName != null && productNu.endsWith(" " + productName))
|
||||||
|
symbol = productNu.substring(0, productNu.length() - productName.length() - 1);
|
||||||
|
else
|
||||||
|
symbol = productNu;
|
||||||
|
|
||||||
final String trainType;
|
final String trainType;
|
||||||
final String trainNum;
|
final String trainNum;
|
||||||
final Matcher mSymbol = P_MOBILE_M_SYMBOL.matcher(symbol);
|
final Matcher mSymbol = P_MOBILE_M_SYMBOL.matcher(symbol);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue