Skip to content

Commit 70a5eb9

Browse files
committed
Minor tweaking of code layout
1 parent b09f810 commit 70a5eb9

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

java/client/src/org/openqa/selenium/remote/tracing/empty/NullSpan.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public Span setAttribute(String key, String value) {
5353
}
5454

5555
@Override
56-
public Span addEvent(String name){
56+
public Span addEvent(String name) {
5757
Require.nonNull("Name", name);
5858
return this;
5959
}

java/client/src/org/openqa/selenium/remote/tracing/opentelemetry/OpenTelemetrySpan.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,22 @@ public Span addEvent(String name, Map<String, EventAttributeValue> attributeMap)
9797
(key, value) -> {
9898
Require.nonNull("Event Attribute Value", value);
9999
switch (value.getAttributeType()) {
100+
case BOOLEAN:
101+
openTelAttributeMap.put(key, AttributeValue.booleanAttributeValue(value.getBooleanValue()));
102+
break;
103+
100104
case DOUBLE:
101105
openTelAttributeMap.put(key, AttributeValue.doubleAttributeValue(value.getNumberValue().doubleValue()));
102106
break;
107+
103108
case LONG:
104109
openTelAttributeMap.put(key, AttributeValue.longAttributeValue(value.getNumberValue().longValue()));
105110
break;
111+
106112
case STRING:
107113
openTelAttributeMap.put(key, AttributeValue.stringAttributeValue(value.getStringValue()));
108114
break;
109-
case BOOLEAN:
110-
openTelAttributeMap.put(key, AttributeValue.booleanAttributeValue(value.getBooleanValue()));
111-
break;
115+
112116
default:
113117
throw new IllegalArgumentException("Unrecognized status value type: " + value.getAttributeType());
114118
}

0 commit comments

Comments
 (0)