Skip to content

Commit 2bdb1cf

Browse files
committed
Remove unused code
1 parent b90449d commit 2bdb1cf

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

sdk/src/main/java/io/opentelemetry/sdk/resources/Resource.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -120,27 +120,9 @@ public static Resource getTelemetrySdk() {
120120
*/
121121
public static Resource create(Attributes attributes) {
122122
checkAttributes(Objects.requireNonNull(attributes, "attributes"));
123-
Attributes.Builder attrBuilder = Attributes.newBuilder();
124-
attributes.forEach(new NullValueFilter(attrBuilder));
125123
return new AutoValue_Resource(attributes);
126124
}
127125

128-
private static final class NullValueFilter implements KeyValueConsumer<AttributeValue> {
129-
private final Attributes.Builder attrBuilder;
130-
131-
private NullValueFilter(Attributes.Builder attrBuilder) {
132-
this.attrBuilder = attrBuilder;
133-
}
134-
135-
@Override
136-
public void consume(String key, AttributeValue value) {
137-
if (value.isEmpty()) {
138-
return;
139-
}
140-
attrBuilder.setAttribute(key, value);
141-
}
142-
}
143-
144126
/**
145127
* Returns a {@link Resource}. This resource information is loaded from the
146128
* OTEL_RESOURCE_ATTRIBUTES environment variable or otel.resource.attributes system properties.

0 commit comments

Comments
 (0)