From ce0c66f9843b584338ca88a6231ae1dca28f8ed6 Mon Sep 17 00:00:00 2001 From: Michael Reichert Date: Thu, 23 May 2024 19:17:00 +0200 Subject: [PATCH] Bugfix: The copy constructor of ReaderWay should make a deep copy of tags --- core/src/main/java/com/graphhopper/reader/ReaderWay.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/graphhopper/reader/ReaderWay.java b/core/src/main/java/com/graphhopper/reader/ReaderWay.java index a8638739b74..f7184030b8c 100644 --- a/core/src/main/java/com/graphhopper/reader/ReaderWay.java +++ b/core/src/main/java/com/graphhopper/reader/ReaderWay.java @@ -33,7 +33,10 @@ public ReaderWay(long id) { } public ReaderWay(ReaderWay other) { - super(other.getId(), other.getType(), other.getTags()); + super(other.getId(), other.getType()); + for (String key : other.getTags().keySet()) { + setTag(key, other.getTag(key)); + } this.nodes = other.getNodes(); }