Skip to content

Commit a87ed0b

Browse files
author
nsahai8
committed
improvisiong
1 parent 34a5e48 commit a87ed0b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

core/src/main/java/com/expedia/www/haystack/client/SpanContext.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717
package com.expedia.www.haystack.client;
1818

19+
import org.apache.commons.lang3.Validate;
1920
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
2021
import org.apache.commons.lang3.builder.ToStringStyle;
2122

@@ -44,9 +45,7 @@ public SpanContext(UUID traceId, UUID spanId, UUID parentId, boolean extractedCo
4445
}
4546

4647
SpanContext(UUID traceId, UUID spanId, UUID parentId, Map<String, String> baggage, boolean extractedContext) {
47-
if (baggage == null) {
48-
throw new NullPointerException();
49-
}
48+
Validate.notNull(baggage);
5049

5150
this.traceId = traceId;
5251
this.spanId = spanId;
@@ -57,9 +56,7 @@ public SpanContext(UUID traceId, UUID spanId, UUID parentId, boolean extractedCo
5756

5857

5958
SpanContext(Object traceId, Object spanId, Object parentId, Map<String, String> baggage, boolean extractedContext) {
60-
if (baggage == null) {
61-
throw new NullPointerException();
62-
}
59+
Validate.notNull(baggage);
6360

6461
this.traceId = traceId;
6562
this.spanId = spanId;

0 commit comments

Comments
 (0)