Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
mmusgrov committed Apr 16, 2019
1 parent b078183 commit 119037b
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,7 @@ public Response reset(@HeaderParam(LRA_TCK_HTTP_CONTEXT_HEADER) String lraId) {
endPhase = EndPhase.SUCCESS;
endPhaseStatus = Response.Status.OK;

if (metrics.containsKey(lraId)) {
metrics.get(lraId).clear();
}
metrics.clear();

return Response.ok().build();
}
Expand Down Expand Up @@ -243,7 +241,7 @@ public Response count(@HeaderParam(LRA_TCK_HTTP_CONTEXT_HEADER) String lraId,
@PathParam("metric") String metric) {
if (metrics.containsKey(lraId)) {
return Response.ok(metrics.get(lraId).get(metric)).build();
}else {
} else {
return Response.ok(-1).build();
}
}
Expand Down Expand Up @@ -305,8 +303,7 @@ public Response clearStatus(@HeaderParam(LRA_TCK_HTTP_CONTEXT_HEADER) String lra
case Completing:
status = ParticipantStatus.Completed;
break;
default:
break;
// do nothing for the other branches
}

endPhase = EndPhase.SUCCESS;
Expand All @@ -324,8 +321,7 @@ private Response getEndPhaseResponse(boolean completing) {
case FAILED:
status = completing ? ParticipantStatus.FailedToComplete : ParticipantStatus.FailedToCompensate;
return Response.status(endPhaseStatus).entity(status.name()).build();
case SUCCESS: /* FALLTHRU */
default:
case SUCCESS:
status = completing ? ParticipantStatus.Completed : ParticipantStatus.Compensated;
return Response.status(Response.Status.OK).entity(status.name()).build();
}
Expand Down

0 comments on commit 119037b

Please sign in to comment.