Skip to content

Commit

Permalink
fix compilation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lovesh-ap committed Dec 17, 2024
1 parent 6689be4 commit 1374701
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public HttpResponse execute(HttpUriRequest request) throws Exception {
returnObj = Weaver.callOriginal();
} finally {
if (isLockAcquired) {
registerExitOperation(isLockAcquired, operation);
registerExitOperation(isLockAcquired, operation, this.getClass().getName());
releaseLock();
}
}
Expand All @@ -67,7 +67,7 @@ public HttpResponse execute(HttpUriRequest request, HttpContext context) throws
returnObj = Weaver.callOriginal();
} finally {
if (isLockAcquired) {
registerExitOperation(isLockAcquired, operation);
registerExitOperation(isLockAcquired, operation, this.getClass().getName());
releaseLock();
}
}
Expand Down Expand Up @@ -95,7 +95,7 @@ public HttpResponse execute(HttpHost target, HttpRequest request) throws Excepti
returnObj = Weaver.callOriginal();
} finally {
if (isLockAcquired) {
registerExitOperation(isLockAcquired, operation);
registerExitOperation(isLockAcquired, operation, this.getClass().getName());
releaseLock();
}
}
Expand Down Expand Up @@ -123,7 +123,7 @@ public HttpResponse execute(HttpHost target, HttpRequest request, HttpContext co
returnObj = Weaver.callOriginal();
} finally {
if (isLockAcquired) {
registerExitOperation(isLockAcquired, operation);
registerExitOperation(isLockAcquired, operation, this.getClass().getName());
releaseLock();
}
}
Expand All @@ -144,7 +144,7 @@ public <T, R extends T> T execute(HttpUriRequest request, ResponseHandler<R> res
returnObj = Weaver.callOriginal();
} finally {
if (isLockAcquired) {
registerExitOperation(isLockAcquired, operation);
registerExitOperation(isLockAcquired, operation, this.getClass().getName());
releaseLock();
}
}
Expand All @@ -165,7 +165,7 @@ public <T, R extends T> T execute(HttpUriRequest request, ResponseHandler<R> res
returnObj = Weaver.callOriginal();
} finally {
if (isLockAcquired) {
registerExitOperation(isLockAcquired, operation);
registerExitOperation(isLockAcquired, operation, this.getClass().getName());
releaseLock();
}
}
Expand Down Expand Up @@ -194,7 +194,7 @@ public <T, R extends T> T execute(HttpHost target, HttpRequest request, Response
returnObj = Weaver.callOriginal();
} finally {
if (isLockAcquired) {
registerExitOperation(isLockAcquired, operation);
registerExitOperation(isLockAcquired, operation, this.getClass().getName());
releaseLock();
}
}
Expand Down Expand Up @@ -223,7 +223,7 @@ public <T, R extends T> T execute(HttpHost target, HttpRequest request, Response
returnObj = Weaver.callOriginal();
} finally {
if (isLockAcquired) {
registerExitOperation(isLockAcquired, operation);
registerExitOperation(isLockAcquired, operation, this.getClass().getName());
releaseLock();
}
}
Expand All @@ -236,7 +236,7 @@ private static URI getUri(HttpHost target, HttpRequest request) throws URISyntax
return new URI(scheme, null, target.getHostName(), target.getPort(), requestURI.getPath(), requestURI.getQuery(), null);
}

private static void registerExitOperation(boolean isProcessingAllowed, AbstractOperation operation) {
private static void registerExitOperation(boolean isProcessingAllowed, AbstractOperation operation, String className) {
try {
if (operation == null || !isProcessingAllowed || !NewRelicSecurity.isHookProcessingActive() || NewRelicSecurity.getAgent().getSecurityMetaData().getRequest().isEmpty()
) {
Expand All @@ -245,8 +245,8 @@ private static void registerExitOperation(boolean isProcessingAllowed, AbstractO
try {
NewRelicSecurity.getAgent().registerOperation(operation);
} catch (Exception e) {
NewRelicSecurity.getAgent().log(LogLevel.SEVERE, String.format(GenericHelper.REGISTER_OPERATION_EXCEPTION_MESSAGE, SecurityHelper.HTTP_CLIENT_4, e.getMessage()), e, this.getClass().getName());
NewRelicSecurity.getAgent().reportIncident(LogLevel.SEVERE , String.format(GenericHelper.REGISTER_OPERATION_EXCEPTION_MESSAGE, SecurityHelper.HTTP_CLIENT_4, e.getMessage()), e, this.getClass().getName());
NewRelicSecurity.getAgent().log(LogLevel.SEVERE, String.format(GenericHelper.REGISTER_OPERATION_EXCEPTION_MESSAGE, SecurityHelper.HTTP_CLIENT_4, e.getMessage()), e, className);
NewRelicSecurity.getAgent().reportIncident(LogLevel.SEVERE , String.format(GenericHelper.REGISTER_OPERATION_EXCEPTION_MESSAGE, SecurityHelper.HTTP_CLIENT_4, e.getMessage()), e, className);
}
} catch (Throwable ignored) {
NewRelicSecurity.getAgent().log(LogLevel.FINEST, String.format(GenericHelper.EXIT_OPERATION_EXCEPTION_MESSAGE, SecurityHelper.HTTP_CLIENT_4, ignored.getMessage()), ignored, HttpClient_Instrumentation.class.getName());
Expand Down

0 comments on commit 1374701

Please sign in to comment.