From 8d283322d0aa3840351961d81c5c228ee83e2a50 Mon Sep 17 00:00:00 2001 From: NipunaMadhushan Date: Mon, 24 Jun 2024 10:33:52 +0530 Subject: [PATCH] Address review suggestions --- .../observe/nativeimpl/OpenTracerBallerinaWrapper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/observelib/observe/src/main/java/org/ballerinalang/observe/nativeimpl/OpenTracerBallerinaWrapper.java b/observelib/observe/src/main/java/org/ballerinalang/observe/nativeimpl/OpenTracerBallerinaWrapper.java index dd75e18f16a9..5f2de6059d9e 100644 --- a/observelib/observe/src/main/java/org/ballerinalang/observe/nativeimpl/OpenTracerBallerinaWrapper.java +++ b/observelib/observe/src/main/java/org/ballerinalang/observe/nativeimpl/OpenTracerBallerinaWrapper.java @@ -126,7 +126,7 @@ public boolean finishSpan(Strand strand, long spanId) { if (!enabled) { return false; } - ObserverContext observerContext = observerContextList.getOrDefault(spanId, null); + ObserverContext observerContext = observerContextList.get(spanId); if (observerContext != null) { if (observerContext.isSystemSpan()) { ObserveUtils.setObserverContextToCurrentFrame(strand, observerContext.getParent()); @@ -153,7 +153,7 @@ public boolean addTag(String tagKey, String tagValue, long spanId, Strand strand if (!enabled) { return false; } - ObserverContext observerContext = observerContextList.getOrDefault(spanId, null); + ObserverContext observerContext = observerContextList.get(spanId); if (spanId == -1) { Optional observer = ObserveUtils.getObserverContextOfCurrentFrame(strand); if (observer.isPresent()) {