diff --git a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/LibraryObject.java b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/LibraryObject.java index 9496533008036fd849e8d5de651f85147aeae7ae..76040ea3fe476675236b9bf1e5f666e22ed8fa2e 100644 --- a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/LibraryObject.java +++ b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/LibraryObject.java @@ -9,6 +9,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import java.io.Serial; +import java.nio.file.Files; import java.nio.file.Path; import java.util.List; import java.util.Map; @@ -64,7 +65,7 @@ public class LibraryObject extends Geometry { private static Geometry parseFile(Path path, ParserConfiguration config) { Geometry geo = null; - if (path.toFile().exists()) { + if (Files.exists(path)) { try { geo = getProtoGeometry(CityGmlParser.parseCityGmlFileSilently(path.toString(), config)); } catch (CityGmlParseException e) {