mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-16 09:29:49 +00:00
avoid StringIndexOutOfBoundsException
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@334 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
d4af2b36d1
commit
9a2a66391f
3 changed files with 6 additions and 0 deletions
|
@ -1267,6 +1267,8 @@ public abstract class AbstractEfaProvider implements NetworkProvider
|
|||
|
||||
public int[] lineColors(final String line)
|
||||
{
|
||||
if (line.isEmpty())
|
||||
return null;
|
||||
return LINES.get(line.charAt(0));
|
||||
}
|
||||
|
||||
|
|
|
@ -921,6 +921,8 @@ public abstract class AbstractHafasProvider implements NetworkProvider
|
|||
|
||||
public final int[] lineColors(final String line)
|
||||
{
|
||||
if (line.isEmpty())
|
||||
return null;
|
||||
return LINES.get(line.charAt(0));
|
||||
}
|
||||
|
||||
|
|
|
@ -746,6 +746,8 @@ public final class BvgProvider implements NetworkProvider
|
|||
|
||||
public int[] lineColors(final String line)
|
||||
{
|
||||
if (line.isEmpty())
|
||||
return null;
|
||||
return LINES.get(line);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue