File tree Expand file tree Collapse file tree 2 files changed +1
-16
lines changed
api/incubator/src/main/java/io/opentelemetry/api/incubator Expand file tree Collapse file tree 2 files changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ default AttributeKey<T> asAttributeKey() {
5050 /** Return an ExtendedAttributeKey equivalent to the {@code attributeKey}. */
5151 // TODO (jack-berg): remove once AttributeKey.asExtendedAttributeKey is available
5252 static <T > ExtendedAttributeKey <T > fromAttributeKey (AttributeKey <T > attributeKey ) {
53- return InternalExtendedAttributeKeyImpl .fromAttributeKey (attributeKey );
53+ return InternalExtendedAttributeKeyImpl .toExtendedAttributeKey (attributeKey );
5454 }
5555
5656 /** Returns a new ExtendedAttributeKey for String valued attributes. */
Original file line number Diff line number Diff line change 1111import io .opentelemetry .api .incubator .common .ExtendedAttributeType ;
1212import io .opentelemetry .api .internal .InternalAttributeKeyImpl ;
1313import java .nio .charset .StandardCharsets ;
14- import java .util .concurrent .ConcurrentHashMap ;
1514import javax .annotation .Nullable ;
1615
1716/**
2019 */
2120public final class InternalExtendedAttributeKeyImpl <T > implements ExtendedAttributeKey <T > {
2221
23- private static final ConcurrentHashMap <AttributeKey <?>, ExtendedAttributeKey <?>>
24- ATTRIBUTE_KEY_CACHE = new ConcurrentHashMap <>();
25-
2622 private final ExtendedAttributeType type ;
2723 private final String key ;
2824 private final int hashCode ;
@@ -47,17 +43,6 @@ public static <T> ExtendedAttributeKey<T> create(
4743 return new InternalExtendedAttributeKeyImpl <>(type , key != null ? key : "" );
4844 }
4945
50- /**
51- * Return an {@link ExtendedAttributeKey} equivalent to the {@code attributeKey}, caching entries
52- * in {@link #ATTRIBUTE_KEY_CACHE}.
53- */
54- @ SuppressWarnings ("unchecked" )
55- public static <T > ExtendedAttributeKey <T > fromAttributeKey (AttributeKey <T > attributeKey ) {
56- return (ExtendedAttributeKey <T >)
57- ATTRIBUTE_KEY_CACHE .computeIfAbsent (
58- attributeKey , InternalExtendedAttributeKeyImpl ::toExtendedAttributeKey );
59- }
60-
6146 @ Override
6247 public ExtendedAttributeType getType () {
6348 return type ;
You can’t perform that action at this time.
0 commit comments