Skip to content

Commit

Permalink
Http Status code - indentation fixes, adding final to some fields
Browse files Browse the repository at this point in the history
  • Loading branch information
meiao committed Nov 16, 2021
1 parent 18ba60f commit 876591d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ class ExternalRequestImpl extends RequestImpl implements ExternalRequest {
private static Pattern EXTERNAL_TX_METRIC = Pattern.compile("ExternalTransaction/([^/]+)/(.+)");
private static Pattern EXTERNAL_TX_SEGMENT = Pattern.compile("ExternalTransaction/([^/]+)/(.+)");

private String library;
private String operation;
private Integer statusCode;
private String statusText;
private String segmentName;
private String catTransactionGuid;
private final String library;
private final String operation;
private final Integer statusCode;
private final String statusText;
private final String segmentName;
private final String catTransactionGuid;

private ExternalRequestImpl(String originalMetric, String segmentName, String host, String lib, String operation, Integer statusCode, String statusText,
String catTransactionGuid) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ public void failed(Exception ex) {
}

private Integer getStatusCode() {
if (httpResponse != null && httpResponse.getStatusLine() != null)
{
if (httpResponse != null && httpResponse.getStatusLine() != null) {
return httpResponse.getStatusLine().getStatusCode();
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ public T onCompleted() throws Exception {
}

private Integer getStatusCode() {
if (responseStatus != null)
{
if (responseStatus != null) {
return responseStatus.getStatusCode();
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public String getProcedure() {
* Returns the HTTP status code for the call.
*
* @return the status code for the call, null if not available
* @since 6.5.0
* @since 7.5.0
*/
public Integer getStatusCode() {
return statusCode;
Expand All @@ -123,7 +123,7 @@ public Integer getStatusCode() {
* Returns the HTTP reason message for the call.
*
* @return the text of the reason message, null if not available
* @since 6.5.0
* @since 7.5.0
*/
public String getStatusText() {
return statusText;
Expand Down

0 comments on commit 876591d

Please sign in to comment.