mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-18 08:19:51 +00:00
Hafas: Fix handling of lines with unknown product.
This commit is contained in:
parent
d934dfa0d4
commit
9bef580434
7 changed files with 13 additions and 12 deletions
|
@ -3042,8 +3042,6 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
}
|
||||
|
||||
final Product normalizedType = normalizeType(type);
|
||||
if (normalizedType == null)
|
||||
throw new IllegalStateException("cannot normalize type '" + type + "' line '" + normalizedName + "'");
|
||||
|
||||
final Line.Attr[] attrs;
|
||||
if (wheelchairAccess)
|
||||
|
@ -3105,9 +3103,9 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
if (mTram.matches())
|
||||
return newLine(Product.TRAM, mTram.group(1), null);
|
||||
}
|
||||
|
||||
return newLine(normalizedType, number.replaceAll("\\s+", ""), null);
|
||||
}
|
||||
|
||||
return newLine(normalizedType, number.replaceAll("\\s+", ""), null);
|
||||
}
|
||||
|
||||
throw new IllegalStateException("cannot normalize type '" + type + "' number '" + number + "' line#type '" + lineAndType + "'");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue