Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Add xdock client service #122

Merged
merged 6 commits into from
Jan 27, 2017
Merged

Add xdock client service #122

merged 6 commits into from
Jan 27, 2017

Conversation

black-adder
Copy link
Contributor

No description provided.

return tags;
}

@Override
Copy link
Contributor

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> {
Copy link
Contributor

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(
Copy link
Contributor

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);
Copy link
Contributor

@vprithvi vprithvi Jan 24, 2017

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);
Copy link
Contributor

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() {
Copy link
Contributor

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);
Copy link
Contributor

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.

@codecov-io
Copy link

codecov-io commented Jan 25, 2017

Current coverage is 81.39% (diff: 71.79%)

Merging #122 into master will decrease coverage by 0.15%

@@             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          

Powered by Codecov. Last update f027bc7...de3047a

@@ -30,20 +30,20 @@

public class EndToEndBehavior {

private static final Configuration cfg = new Configuration(
Copy link
Contributor

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

@black-adder black-adder merged commit fe877db into master Jan 27, 2017
@black-adder black-adder deleted the crossdock_client branch January 27, 2017 21:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants