Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
This commit is contained in:
parent
46ee284b0a
commit
1f97c4bce0
|
|
@ -36,7 +36,6 @@ public final class BooleanAttributeSetter {
|
|||
private final String attributeKey;
|
||||
|
||||
private BooleanAttributeSetter(String attributeKey) {
|
||||
super();
|
||||
if (attributeKey == null || attributeKey.length() == 0) {
|
||||
throw new IllegalArgumentException("attributeKey cannot be empty");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ public final class DoubleAttributeSetter {
|
|||
private final String attributeKey;
|
||||
|
||||
private DoubleAttributeSetter(String attributeKey) {
|
||||
super();
|
||||
if (attributeKey == null || attributeKey.length() == 0) {
|
||||
throw new IllegalArgumentException("attributeKey cannot be empty");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ public final class LongAttributeSetter {
|
|||
private final String attributeKey;
|
||||
|
||||
private LongAttributeSetter(String attributeKey) {
|
||||
super();
|
||||
if (attributeKey == null || attributeKey.length() == 0) {
|
||||
throw new IllegalArgumentException("attributeKey cannot be empty");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ public final class StringAttributeSetter {
|
|||
private final String attributeKey;
|
||||
|
||||
private StringAttributeSetter(String attributeKey) {
|
||||
super();
|
||||
if (attributeKey == null || attributeKey.length() == 0) {
|
||||
throw new IllegalArgumentException("attributeKey cannot be empty");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ public class SemanticAttributesTest {
|
|||
public void shouldEnableSetAttributeOnSpan() throws IllegalAccessException {
|
||||
Set<String> keys = new HashSet<>();
|
||||
Field[] fields = SemanticAttributes.class.getFields();
|
||||
for (int i = 0; i < fields.length; i++) {
|
||||
Object attribute = fields[i].get(null);
|
||||
for (Field field : fields) {
|
||||
Object attribute = field.get(null);
|
||||
if (attribute instanceof StringAttributeSetter) {
|
||||
keys.add(((StringAttributeSetter) attribute).key());
|
||||
((StringAttributeSetter) attribute).set(span, "TestValue");
|
||||
|
|
|
|||
Loading…
Reference in New Issue