diff --git a/src/de/schildbach/pte/BahnProvider.java b/src/de/schildbach/pte/BahnProvider.java index bd85a173..617c83cd 100644 --- a/src/de/schildbach/pte/BahnProvider.java +++ b/src/de/schildbach/pte/BahnProvider.java @@ -168,7 +168,7 @@ public final class BahnProvider implements NetworkProvider "", Pattern.DOTALL); private static final Pattern P_ADDRESSES = Pattern.compile("\\s*(.*?)\\s*", Pattern.DOTALL); private static final Pattern P_CHECK_CONNECTIONS_ERROR = Pattern - .compile("(?:(zu dicht beieinander|mehrfach vorhanden oder identisch)|(leider konnte zu Ihrer Anfrage keine Verbindung gefunden werden))"); + .compile("(zu dicht beieinander|mehrfach vorhanden oder identisch)|(leider konnte zu Ihrer Anfrage keine Verbindung gefunden werden)"); public QueryConnectionsResult queryConnections(final LocationType fromType, final String from, final LocationType viaType, final String via, final LocationType toType, final String to, final Date date, final boolean dep) throws IOException diff --git a/src/de/schildbach/pte/MvvProvider.java b/src/de/schildbach/pte/MvvProvider.java index b1338342..ae97d669 100644 --- a/src/de/schildbach/pte/MvvProvider.java +++ b/src/de/schildbach/pte/MvvProvider.java @@ -301,8 +301,8 @@ public class MvvProvider implements NetworkProvider private static final Pattern P_PRE_ADDRESS = Pattern.compile("", Pattern.DOTALL); private static final Pattern P_ADDRESSES = Pattern.compile("\\s*(.*?)\\s*", Pattern.DOTALL); - private static final Pattern P_CHECK_CONNECTIONS_ERROR = Pattern.compile("(?:(xxxzudichtxxx)|(konnte keine Verbindung gefunden werden))", - Pattern.CASE_INSENSITIVE); + private static final Pattern P_CHECK_CONNECTIONS_ERROR = Pattern.compile( + "(Start und Ziel sind identisch)|(konnte keine Verbindung gefunden werden)", Pattern.CASE_INSENSITIVE); public QueryConnectionsResult queryConnections(final LocationType fromType, final String from, final LocationType viaType, final String via, final LocationType toType, final String to, final Date date, final boolean dep) throws IOException diff --git a/src/de/schildbach/pte/SbbProvider.java b/src/de/schildbach/pte/SbbProvider.java index 1be9e81d..2dcfadff 100644 --- a/src/de/schildbach/pte/SbbProvider.java +++ b/src/de/schildbach/pte/SbbProvider.java @@ -136,7 +136,8 @@ public class SbbProvider implements NetworkProvider private static final Pattern P_PRE_ADDRESS = Pattern.compile( "", Pattern.DOTALL); private static final Pattern P_ADDRESSES = Pattern.compile("\\s*(.*?)\\s*", Pattern.DOTALL); - private static final Pattern P_CHECK_CONNECTIONS_ERROR = Pattern.compile("(keine Verbindung gefunden werden)"); + private static final Pattern P_CHECK_CONNECTIONS_ERROR = Pattern + .compile("(mehrfach vorhanden oder identisch)|(keine Verbindung gefunden werden)"); public QueryConnectionsResult queryConnections(final LocationType fromType, final String from, final LocationType viaType, final String via, final LocationType toType, final String to, final Date date, final boolean dep) throws IOException @@ -148,6 +149,8 @@ public class SbbProvider implements NetworkProvider if (mError.find()) { if (mError.group(1) != null) + return QueryConnectionsResult.TOO_CLOSE; + if (mError.group(2) != null) return QueryConnectionsResult.NO_CONNECTIONS; } diff --git a/src/de/schildbach/pte/VbbProvider.java b/src/de/schildbach/pte/VbbProvider.java index 88f0c123..a94e60a2 100644 --- a/src/de/schildbach/pte/VbbProvider.java +++ b/src/de/schildbach/pte/VbbProvider.java @@ -240,7 +240,8 @@ public final class VbbProvider implements NetworkProvider private static final Pattern P_CHECK_ADDRESS = Pattern.compile("\\s*(.*?)\\s*", Pattern.DOTALL); private static final Pattern P_CHECK_FROM = Pattern.compile("Von:"); private static final Pattern P_CHECK_TO = Pattern.compile("Nach:"); - private static final Pattern P_CHECK_CONNECTIONS_ERROR = Pattern.compile("(zu dicht beieinander)|(keine Verbindung gefunden)"); + private static final Pattern P_CHECK_CONNECTIONS_ERROR = Pattern + .compile("(zu dicht beieinander|mehrfach vorhanden oder identisch)|(keine Verbindung gefunden)"); public QueryConnectionsResult queryConnections(final LocationType fromType, final String from, final LocationType viaType, final String via, final LocationType toType, final String to, final Date date, final boolean dep) throws IOException