Skip to content

Commit

Permalink
refactor: sonarcloud issues
Browse files Browse the repository at this point in the history
  • Loading branch information
EddeCCC committed Oct 7, 2024
1 parent 67d4fed commit 8c65a4e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public InternalInspectitContext onEnter(Object[] instrumentedMethodArgs, Object

try {
spanScope = spanAction.startSpan(spanName);
} catch (Throwable t) {
log.error("Could not execute start-span-action", t);
} catch (Exception e) {
log.error("Could not execute start-span-action", e);
}

// Using our log4j here will not be visible in the target application...
Expand All @@ -50,8 +50,8 @@ public void onExit(
AutoCloseable spanScope = context.getSpanScope();
try {
spanAction.endSpan(spanScope);
} catch (Throwable t) {
log.error("Could not execute end-span-action", t);
} catch (Exception e) {
log.error("Could not execute end-span-action", e);
}

// Using our log4j here will not be visible in the target application...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,32 @@ public void onError(

@Override
public void onDiscovery(
String typeName, ClassLoader classLoader, JavaModule module, boolean loaded) {}
String typeName, ClassLoader classLoader, JavaModule module, boolean loaded) {
// unused
}

@Override
public void onTransformation(
TypeDescription typeDescription,
ClassLoader classLoader,
JavaModule module,
boolean loaded,
DynamicType dynamicType) {}
DynamicType dynamicType) {
// unused
}

@Override
public void onIgnored(
TypeDescription typeDescription,
ClassLoader classLoader,
JavaModule module,
boolean loaded) {}
boolean loaded) {
// unused
}

@Override
public void onComplete(
String typeName, ClassLoader classLoader, JavaModule module, boolean loaded) {}
String typeName, ClassLoader classLoader, JavaModule module, boolean loaded) {
// unused
}
}

0 comments on commit 8c65a4e

Please sign in to comment.