Skip to content

Commit 777f46b

Browse files
committed
Keeping null check consistency
1 parent 984f8d2 commit 777f46b

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

instrumentation/vaadin-14.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vaadin/ClientCallableRpcInstrumentation.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,9 @@ public static AdviceScope onEnter(
8484
public static void onExit(
8585
@Advice.Thrown @Nullable Throwable throwable,
8686
@Advice.Enter @Nullable AdviceScope adviceScope) {
87-
if (adviceScope == null) {
88-
return;
87+
if (adviceScope != null) {
88+
adviceScope.end(throwable);
8989
}
90-
adviceScope.end(throwable);
9190
}
9291
}
9392
}

instrumentation/vaadin-14.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vaadin/RequestHandlerInstrumentation.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,9 @@ public static void onExit(
8888
@Advice.Thrown Throwable throwable,
8989
@Advice.Return boolean handled,
9090
@Advice.Enter @Nullable AdviceScope adviceScope) {
91-
if (adviceScope == null) {
92-
return;
91+
if (adviceScope != null) {
92+
adviceScope.end(throwable, handled);
9393
}
94-
adviceScope.end(throwable, handled);
9594
}
9695
}
9796
}

instrumentation/vaadin-14.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vaadin/RpcInvocationHandlerInstrumentation.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,9 @@ public static AdviceScope onEnter(
9393
public static void onExit(
9494
@Advice.Thrown @Nullable Throwable throwable,
9595
@Advice.Enter @Nullable AdviceScope adviceScope) {
96-
if (adviceScope == null) {
97-
return;
96+
if (adviceScope != null) {
97+
adviceScope.end(throwable);
9898
}
99-
adviceScope.end(throwable);
10099
}
101100
}
102101
}

instrumentation/vaadin-14.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vaadin/VaadinServiceInstrumentation.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,9 @@ public static AdviceScope onEnter(
8080
public static void onExit(
8181
@Advice.Thrown @Nullable Throwable throwable,
8282
@Advice.Enter @Nullable AdviceScope adviceScope) {
83-
if (adviceScope == null) {
84-
return;
83+
if (adviceScope != null) {
84+
adviceScope.end(throwable);
8585
}
86-
adviceScope.end(throwable);
8786
}
8887
}
8988
}

0 commit comments

Comments
 (0)