Skip to content

Commit

Permalink
Immutable String array values for AttributeValue
Browse files Browse the repository at this point in the history
  • Loading branch information
thisthat committed Feb 28, 2020
1 parent 3c38ea5 commit f31ec08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/src/main/java/io/opentelemetry/trace/AttributeValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ static AttributeValue create(String... stringValues) {
return new AutoValue_AttributeValue_AttributeValueStringArray(
Collections.<String>emptyList());
}
return new AutoValue_AttributeValue_AttributeValueStringArray(Arrays.asList(stringValues));
return new AutoValue_AttributeValue_AttributeValueStringArray(
Collections.unmodifiableList(Arrays.asList(stringValues)));
}

@Override
Expand Down

0 comments on commit f31ec08

Please sign in to comment.