Skip to content

Commit

Permalink
update witness class in springmvc-annotation-5.x-plugin (#571)
Browse files Browse the repository at this point in the history
Co-authored-by: 熊哲源 <[email protected]>
  • Loading branch information
xzyJavaX and 熊哲源 authored Jul 7, 2023
1 parent b9075ce commit 6229b22
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Release Notes.
* Implement new naming policies for names of auxiliary type, interceptor delegate field, renamed origin method, method
access name, method cache value field. All names are under `sw$` name trait. They are predictable and unchanged after
re-transform.
* Fix witness class in springmvc-annotation-5.x-plugin to avoid falling into v3 use cases.

```
* SWAuxiliaryTypeNamingStrategy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;

public abstract class AbstractSpring5Instrumentation extends ClassInstanceMethodsEnhancePluginDefine {
public static final String WITNESS_CLASSES = "org.springframework.beans.annotation.AnnotationBeanUtils";
public static final String WITNESS_CLASSES_LOW_VERSION = "org.springframework.beans.annotation.AnnotationBeanUtils";
public static final String WITNESS_CLASSES_HIGH_VERSION = "org.springframework.core.ReactiveAdapterRegistry";

@Override
protected final String[] witnessClasses() {
return new String[] {WITNESS_CLASSES};
return new String[] {WITNESS_CLASSES_LOW_VERSION, WITNESS_CLASSES_HIGH_VERSION};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;

public abstract class AbstractSpring5ReactiveInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
public static final String WITNESS_CLASSES = "org.springframework.beans.annotation.AnnotationBeanUtils";
public static final String WITNESS_CLASSES_LOW_VERSION = "org.springframework.beans.annotation.AnnotationBeanUtils";
public static final String WITNESS_CLASSES_HIGH_VERSION = "org.springframework.core.ReactiveAdapterRegistry";

@Override
protected final String[] witnessClasses() {
return new String[] {WITNESS_CLASSES};
return new String[] {WITNESS_CLASSES_LOW_VERSION, WITNESS_CLASSES_HIGH_VERSION};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.v2.ClassInstanceMethodsEnhancePluginDefineV2;

public abstract class AbstractSpring5ReactiveInstrumentationV2 extends ClassInstanceMethodsEnhancePluginDefineV2 {
public static final String WITNESS_CLASSES = "org.springframework.beans.annotation.AnnotationBeanUtils";
public static final String WITNESS_CLASSES_LOW_VERSION = "org.springframework.beans.annotation.AnnotationBeanUtils";
public static final String WITNESS_CLASSES_HIGH_VERSION = "org.springframework.core.ReactiveAdapterRegistry";

@Override
protected final String[] witnessClasses() {
return new String[] {WITNESS_CLASSES};
return new String[] {WITNESS_CLASSES_LOW_VERSION, WITNESS_CLASSES_HIGH_VERSION};
}
}

0 comments on commit 6229b22

Please sign in to comment.