mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-18 16:29:51 +00:00
Clear 'potential null pointer access' warnings.
This commit is contained in:
parent
5f8fc199a4
commit
4c8f48931c
2 changed files with 9 additions and 4 deletions
|
@ -1201,10 +1201,10 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
XmlPullUtil.skipExit(pp, "Arrival");
|
||||
|
||||
// remove last intermediate
|
||||
final int size = intermediateStops != null ? intermediateStops.size() : 0;
|
||||
if (size >= 1)
|
||||
if (!intermediateStops.get(size - 1).location.id.equals(sectionArrivalLocation.id))
|
||||
intermediateStops.remove(size - 1);
|
||||
if (intermediateStops != null)
|
||||
if (!intermediateStops.isEmpty())
|
||||
if (!intermediateStops.get(intermediateStops.size() - 1).location.id.equals(sectionArrivalLocation.id))
|
||||
intermediateStops.remove(intermediateStops.size() - 1);
|
||||
|
||||
XmlPullUtil.skipExit(pp, "ConSection");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue