Skip to content

Commit

Permalink
bump to 0.2.0-beta2 and fix npe
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnu-liguobin committed Jan 17, 2024
1 parent 1d29138 commit eba7629
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 37 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
package org.bitlap.skywalking.apm.plugin.common.interceptor

import java.lang.reflect.Method
import java.util.concurrent.Callable
import java.util.concurrent.RunnableFuture
import java.util.concurrent.{ Callable, RunnableFuture }

import org.apache.skywalking.apm.agent.core.context.*
import org.apache.skywalking.apm.agent.core.logging.api.LogManager
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.*
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
import org.apache.skywalking.apm.network.trace.component.ComponentsDefine
import org.bitlap.skywalking.apm.plugin.common.*

final class CaptureContextOnScheduleInterceptor extends CaptureContextInterceptor
Expand Down Expand Up @@ -36,8 +33,9 @@ open class CaptureContextInterceptor extends InstanceMethodsAroundInterceptor:
val argument = allArguments(0)
// Avoid duplicate enhancement, such as the case where it has already been enhanced by RunnableWrapper or CallableWrapper with toolkit.
argument match
case instance: EnhancedInstance if instance.getSkyWalkingDynamicField.isInstanceOf[ContextSnapshot] =>
return
case instance: EnhancedInstance =>
val ctx = instance.getSkyWalkingDynamicField
if ctx != null && ctx.isInstanceOf[ContextSnapshot] then return
case _ =>
val wrappedObject = wrap(argument, objInst.getClass.getName, method.getName)
if wrappedObject != null then allArguments.update(0, wrappedObject)
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ThisBuild / version := "0.3.0-SNAPSHOT"
ThisBuild / version := "0.2.0-beta2"

0 comments on commit eba7629

Please sign in to comment.