openzipkin-contrib / brave-opentracing

Bridge between OpenTracing and Brave
http://opentracing.io
Apache License 2.0
64 stars 39 forks source link

BraveSpanBuilder.addReference(???, null) throws NPE #63

Closed bhanafee closed 6 years ago

bhanafee commented 6 years ago

BraveSpanBuilder.addReference throws NPE if the referencedContext parameter is null. Per the Javadoc on io.opentracing.Tracer.SpanBuilder, this should be a noop.

Same issue with the asChildOf convenience methods.

codefromthecrypt commented 6 years ago

strange api decision. thanks for raising the issue

codefromthecrypt commented 6 years ago

ps this was changed in the recent RC, so we shouldn't cut this without bumping to latest https://github.com/opentracing/opentracing-java/commit/3192429cee1d142759bc0e01da7d702bdaa22375