Skip to content

Commit ab6edc8

Browse files
committed
Support Struts 7 (fixes CI muzzle failures)
1 parent 51163cf commit ab6edc8

File tree

23 files changed

+559
-3
lines changed

23 files changed

+559
-3
lines changed

instrumentation/struts-2.3/javaagent/build.gradle.kts renamed to instrumentation/struts/struts-2.3/javaagent/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ muzzle {
66
pass {
77
group.set("org.apache.struts")
88
module.set("struts2-core")
9-
versions.set("[2.3.1,)")
9+
versions.set("[2.1.0,7)")
10+
assertInverse.set(true)
1011
}
1112
}
1213

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
1313
import static net.bytebuddy.matcher.ElementMatchers.isPublic;
1414
import static net.bytebuddy.matcher.ElementMatchers.named;
15+
import static net.bytebuddy.matcher.ElementMatchers.not;
1516

1617
import com.opensymphony.xwork2.ActionInvocation;
1718
import io.opentelemetry.context.Context;
@@ -28,7 +29,8 @@ public class ActionInvocationInstrumentation implements TypeInstrumentation {
2829

2930
@Override
3031
public ElementMatcher<ClassLoader> classLoaderOptimization() {
31-
return hasClassesNamed("com.opensymphony.xwork2.ActionInvocation");
32+
return hasClassesNamed("com.opensymphony.xwork2.ActionInvocation")
33+
.and(not(hasClassesNamed("org.apache.struts2.ActionInvocation")));
3234
}
3335

3436
@Override

0 commit comments

Comments
 (0)