Skip to content

Commit d5219d1

Browse files
committed
More cleanups from review.
1 parent 7ace665 commit d5219d1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
Comparing source compatibility of opentelemetry-sdk-common-1.52.0-SNAPSHOT.jar against opentelemetry-sdk-common-1.51.0.jar
22
*** MODIFIED CLASS: PUBLIC ABSTRACT io.opentelemetry.sdk.resources.Resource (not serializable)
33
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
4-
+++ NEW METHOD: PUBLIC(+) STATIC(+) io.opentelemetry.sdk.resources.Resource create(io.opentelemetry.api.common.Attributes, java.lang.String, java.util.Collection<io.opentelemetry.sdk.resources.internal.Entity>)
54
*** MODIFIED METHOD: PUBLIC NON_ABSTRACT (<- ABSTRACT) io.opentelemetry.api.common.Attributes getAttributes()

sdk/common/src/main/java/io/opentelemetry/sdk/resources/internal/SdkEntityBuilder.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ final class SdkEntityBuilder implements EntityBuilder {
2222
@Nullable private String schemaUrl;
2323

2424
SdkEntityBuilder(String entityType) {
25+
AttributeCheckUtil.isValid(entityType);
2526
this.entityType = entityType;
2627
this.description = Attributes.empty();
2728
this.id = Attributes.empty();
@@ -42,12 +43,14 @@ public EntityBuilder setSchemaUrl(String schemaUrl) {
4243

4344
@Override
4445
public EntityBuilder withDescription(Attributes description) {
46+
AttributeCheckUtil.checkAttributes(description);
4547
this.description = description;
4648
return this;
4749
}
4850

4951
@Override
5052
public EntityBuilder withId(Attributes id) {
53+
AttributeCheckUtil.checkAttributes(id);
5154
this.id = id;
5255
return this;
5356
}

0 commit comments

Comments
 (0)