Emmanuel Bourg pushed to branch master at Debian Java Maintainers / metro-policy
Commits: fe1c9b3e by Vladimir Petko at 2024-07-11T09:35:50+00:00 Fix the build failure with Java 21 (Closes: #1057526) - - - - - 3 changed files: - debian/changelog - + debian/patches/java21-stack-offset.patch - + debian/patches/series Changes: ===================================== debian/changelog ===================================== @@ -1,3 +1,10 @@ +metro-policy (2.7.2-4) UNRELEASED; urgency=medium + + * d/p/java21-stack-offset.patch: add proposed fix for Java 21 ftbfs + (Closes: #1057526). + + -- Vladimir Petko <[email protected]> Tue, 30 Jan 2024 14:46:29 +1300 + metro-policy (2.7.2-3) unstable; urgency=medium * Removed the dependency on libactivation-java ===================================== debian/patches/java21-stack-offset.patch ===================================== @@ -0,0 +1,23 @@ +Description: check for "invoke" in getCallerMethodName() + Java 21 has same "shorter" stacktrace same as Mac OS X. + The method name in the trace is "invoke" instead of "invoke0". + This is a bit brittle, but since this approach is already used + in the project, I have just updated the condition. + Probably the better way would be to check the environment. +Author: Vladimir Petko <[email protected]> +Bug: https://github.com/eclipse-ee4j/metro-policy/pull/29 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057526 +Last-Update: 2024-01-30 +--- a/src/main/java/com/sun/xml/ws/policy/privateutil/PolicyUtils.java ++++ b/src/main/java/com/sun/xml/ws/policy/privateutil/PolicyUtils.java +@@ -98,8 +98,8 @@ + */ + public static String getCallerMethodName() { + String result = getStackMethodName(5); +- if (result.equals("invoke0")) { +- // We are likely running on Mac OS X, which returns a shorter stack trace ++ if (result.equals("invoke0") || result.equals("invoke")) { ++ // We are likely running on Mac OS X or Java 21, which returns a shorter stack trace + result = getStackMethodName(4); + } + return result; ===================================== debian/patches/series ===================================== @@ -0,0 +1 @@ +java21-stack-offset.patch View it on GitLab: https://salsa.debian.org/java-team/metro-policy/-/commit/fe1c9b3e63d179d66536077018ef1bb6157b0ae1 -- This project does not include diff previews in email notifications. View it on GitLab: https://salsa.debian.org/java-team/metro-policy/-/commit/fe1c9b3e63d179d66536077018ef1bb6157b0ae1 You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ pkg-java-commits mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-java-commits

