-
Notifications
You must be signed in to change notification settings - Fork 231
Conversation
return tags; | ||
} | ||
|
||
@Override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a @ToString
annotation on the class instead.
import java.util.Map; | ||
|
||
@Slf4j | ||
public class CreateTracesRequestDeserializer extends JsonDeserializer<CreateTracesRequest> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need this? The default annotation based deserializer should deserialize CreateTracesRequest
just fine. See http://wiki.fasterxml.com/JacksonInFiveMinutes#Full_Data_Binding_.28POJO.29_Example for an example.
private io.opentracing.Tracer tracer; | ||
|
||
public EndToEndBehavior(io.opentracing.Tracer tracer) { | ||
final Configuration cfg = new Configuration( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not simply instantiate a tracer directly?
private final EndToEndBehavior behavior; | ||
|
||
public EndToEndBehaviorResource() { | ||
this.behavior = new EndToEndBehavior(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simply call a EndToEndBehavior()
instead.
@Test | ||
public void testCreateTraces() throws Exception { | ||
CreateTracesRequest request = | ||
new CreateTracesRequest("operation", 2, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why no tags?
this.tags = tags; | ||
} | ||
|
||
public String getOperation() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed this last time, but you could simply use @Getter
on the class to generate getters for all private fields
private io.opentracing.Tracer tracer; | ||
|
||
public EndToEndBehavior() { | ||
this(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move the configuration block here instead of the other constructor. Then, you don't need to have the conditional test on line 46.
Current coverage is 81.39% (diff: 71.79%)@@ master #122 diff @@
==========================================
Files 94 97 +3
Lines 1913 1951 +38
Methods 0 0
Messages 0 0
Branches 237 239 +2
==========================================
+ Hits 1560 1588 +28
- Misses 264 274 +10
Partials 89 89
|
@@ -30,20 +30,20 @@ | |||
|
|||
public class EndToEndBehavior { | |||
|
|||
private static final Configuration cfg = new Configuration( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: This doesn't really need to be a static field because nothing is writing to it
No description provided.