Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/maven/com.graphhopper-graphhopp…
Browse files Browse the repository at this point in the history
…er-core-9.1
  • Loading branch information
jfbischoff authored Jun 13, 2024
2 parents 4390f0a + 8d02df1 commit c8a045d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ public Integer call() throws Exception {
private Config prepareConfig() {
Config config = ConfigUtils.loadConfig(ApplicationUtils.matchInput("config.xml", input.getRunDirectory()).toAbsolutePath().toString(), new NoiseConfigGroup());

config.vehicles().setVehiclesFile(ApplicationUtils.matchInput("vehicles", input.getRunDirectory()).toAbsolutePath().toString());
//it is important to match "output_vehicles" because otherwise dvrpVehicle files might be matched and the code crashes later
config.vehicles().setVehiclesFile(ApplicationUtils.matchInput("output_vehicles", input.getRunDirectory()).toAbsolutePath().toString());
config.network().setInputFile(ApplicationUtils.matchInput("network", input.getRunDirectory()).toAbsolutePath().toString());
config.transit().setTransitScheduleFile(null);
config.transit().setVehiclesFile(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ public void startTag(final String name, final Attributes atts, final Stack<Strin
throw new RuntimeException("no reader found for " + str ) ;
}
} else{
if (this.delegate == null) {
log.error("found no valid. vehicle definition file. this may happen if you try to parse a dvrp vehicles file for example or if no vehicle definition file is provided.\n" +
"Valid vehicle definitions are at http://www.matsim.org/files/dtd/vehicleDefinitions_v2.0.xsd and http://www.matsim.org/files/dtd/vehicleDefinitions_v1.0.xsd\n" +
"The code will crash with a NullPointerException.");
}
this.delegate.startTag( name, atts, context );
}
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<argLine></argLine>

<log4j.version>2.23.1</log4j.version>
<geotools.version>31.0</geotools.version>
<geotools.version>31.1</geotools.version>
<osmosis.version>0.49.2</osmosis.version>
<jts.version>1.19.0</jts.version>
<guice.version>7.0.0</guice.version>
Expand Down

0 comments on commit c8a045d

Please sign in to comment.