Merge pull request #1319 from DataDog/tyler/fix-array-out-of-bounds
Add check to ensure value isn't empty
This commit is contained in:
commit
42e3086190
|
@ -301,7 +301,9 @@ public final class OpenTracing32 implements TracerAPI {
|
||||||
// extracted header value
|
// extracted header value
|
||||||
String s = getter.get(carrier, key);
|
String s = getter.get(carrier, key);
|
||||||
// in case of multiple values in the header, need to parse
|
// in case of multiple values in the header, need to parse
|
||||||
if (s != null) s = s.split(",")[0].trim();
|
if (s != null && !s.isEmpty()) {
|
||||||
|
s = s.split(",")[0].trim();
|
||||||
|
}
|
||||||
extracted.put(key, s);
|
extracted.put(key, s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue