Skip to content

Commit daff126

Browse files
authored
Copy in copy method; otherwise reuse (#750)
1 parent 93bd1cb commit daff126

File tree

1 file changed

+2
-2
lines changed
  • maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/manager

1 file changed

+2
-2
lines changed

maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/manager/MMap.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ public static <K, V> MMap<K, V> empty() {
4444
}
4545

4646
public static <K, V> MMap<K, V> copy(MMap<K, V> orig) {
47-
return new MMap<>(orig.delegate);
47+
return new MMap<>(new HashMap<>(orig.delegate));
4848
}
4949

5050
protected final HashMap<K, V> delegate;
5151

5252
private MMap(HashMap<K, V> delegate) {
53-
this.delegate = new HashMap<>(delegate);
53+
this.delegate = delegate;
5454
}
5555

5656
public boolean containsKey(K key) {

0 commit comments

Comments
 (0)