mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-14 00:30:31 +00:00
fixed NPE
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@718 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
6603880c56
commit
a06282ca44
1 changed files with 11 additions and 4 deletions
|
@ -639,10 +639,17 @@ public abstract class AbstractHafasProvider implements NetworkProvider
|
|||
c.setTime(date);
|
||||
|
||||
final StringBuilder productsStr = new StringBuilder(numProductBits);
|
||||
for (int i = 0; i < numProductBits; i++)
|
||||
productsStr.append('0');
|
||||
for (final char p : products.toCharArray())
|
||||
setProductBits(productsStr, p);
|
||||
if (products != null)
|
||||
{
|
||||
for (int i = 0; i < numProductBits; i++)
|
||||
productsStr.append('0');
|
||||
for (final char p : products.toCharArray())
|
||||
setProductBits(productsStr, p);
|
||||
}
|
||||
else
|
||||
{
|
||||
productsStr.append(allProductsString());
|
||||
}
|
||||
|
||||
final StringBuilder request = new StringBuilder("<ConReq>");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue