Fix build with additional WeakHash map implementation
MODIFY
dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/WeakMap.java
dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/WeakMap.java
@@ -108,7 +108,6 @@ public interface WeakMap<K, V> {
@Override
public synchronized V getOrCreate(K key, ValueSupplier<V> supplier) {
-
if (!map.containsKey(key)) {
map.put(key, supplier.get());
}

MODIFY
dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/WeakMapSuppliers.java
dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/WeakMapSuppliers.java
@@ -175,6 +175,15 @@ class WeakMapSuppliers {
public void putIfAbsent(final K key, final V value) {
map.putIfAbsent(key, value);
}
+
+ @Override
+ public V getOrCreate(K key, ValueSupplier<V> supplier) {
+ if (!map.containsKey(key)) {
+ map.put(key, supplier.get());
+ }
+
+ return map.get(key);
+ }
}
static class Inline implements WeakMap.Implementation {

Fix build with additional WeakHash map implementation