Source:
<code>public static GraphHopperStorage createOrLoad(GHDirectory directory, EncodingManager encodingManager, PtFlagEncoder ptFlagEncoder, GtfsStorage gtfsStorage, boolean createWalkNetwork, Collection<String> gtfsFiles, Collection<String> osmFiles) { GraphHopperStorage graphHopperStorage = new GraphHopperStorage(directory, encodingManager, false, gtfsStorage); if (graphHopperStorage.loadExisting()) { return graphHopperStorage; } else { graphHopperStorage.create(1000); for (String osmFile : osmFiles) { OSMReader osmReader = new OSMReader(graphHopperStorage); osmReader.setFile(new File(osmFile)); osmReader.setCreateStorage(false); try { osmReader.readGraph(); } catch (IOException e) { throw new RuntimeException(e); } } int id = 0; for (String gtfsFile : gtfsFiles) { try { ((GtfsStorage) graphHopperStorage.getExtension()).loadGtfsFromFile("gtfs_" + id++, new ZipFile(gtfsFile)); } catch (IOException e) { throw new RuntimeException(e); } } if (createWalkNetwork) { FakeWalkNetworkBuilder.buildWalkNetwork(((GtfsStorage) graphHopperStorage.getExtension()).getGtfsFeeds().values(), graphHopperStorage, ptFlagEncoder, Helper.DIST_EARTH); } LocationIndex walkNetworkIndex; if (graphHopperStorage.getNodes() > 0) { walkNetworkIndex = new LocationIndexTree(graphHopperStorage, new RAMDirectory()).prepareIndex(); } else { walkNetworkIndex = new EmptyLocationIndex(); } for (int i = 0; i < id; i++) { new GtfsReader("gtfs_" + i, graphHopperStorage, gtfsStorage, ptFlagEncoder, walkNetworkIndex).readGraph(); } <START> new PrepareRoutingSubnetworks(graphHopperStorage, Collections.singletonList(ptFlagEncoder)).doWork(); <END> graphHopperStorage.flush(); return graphHopperStorage; } }</code><technical_language>Strange, revert change @michaz I merged master? <LINK_0></technical_language>

Target:
public static GraphHopperStorage createOrLoad(GHDirectory directory, EncodingManager encodingManager, PtFlagEncoder ptFlagEncoder, GtfsStorage gtfsStorage, boolean createWalkNetwork, Collection<String> gtfsFiles, Collection<String> osmFiles) { GraphHopperStorage graphHopperStorage = new GraphHopperStorage(directory, encodingManager, false, gtfsStorage); if (graphHopperStorage.loadExisting()) { return graphHopperStorage; } else { graphHopperStorage.create(1000); for (String osmFile : osmFiles) { OSMReader osmReader = new OSMReader(graphHopperStorage); osmReader.setFile(new File(osmFile)); osmReader.setCreateStorage(false); try { osmReader.readGraph(); } catch (IOException e) { throw new RuntimeException(e); } } new PrepareRoutingSubnetworks(graphHopperStorage, Collections.singletonList(ptFlagEncoder)).doWork(); int id = 0; for (String gtfsFile : gtfsFiles) { try { ((GtfsStorage) graphHopperStorage.getExtension()).loadGtfsFromFile("gtfs_" + id++, new ZipFile(gtfsFile)); } catch (IOException e) { throw new RuntimeException(e); } } if (createWalkNetwork) { FakeWalkNetworkBuilder.buildWalkNetwork(((GtfsStorage) graphHopperStorage.getExtension()).getGtfsFeeds().values(), graphHopperStorage, ptFlagEncoder, Helper.DIST_EARTH); } LocationIndex walkNetworkIndex; if (graphHopperStorage.getNodes() > 0) { walkNetworkIndex = new LocationIndexTree(graphHopperStorage, new RAMDirectory()).prepareIndex(); } else { walkNetworkIndex = new EmptyLocationIndex(); } for (int i = 0; i < id; i++) { new GtfsReader("gtfs_" + i, graphHopperStorage, gtfsStorage, ptFlagEncoder, walkNetworkIndex).readGraph(); } graphHopperStorage.flush(); return graphHopperStorage; } }