This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new 40c623f477 Work around weird spotbugs crash
40c623f477 is described below

commit 40c623f477e5e88bf3d96de3d7821b01df25e6e9
Author: remm <r...@apache.org>
AuthorDate: Fri Apr 11 14:55:33 2025 +0200

    Work around weird spotbugs crash
---
 .../apache/tomcat/util/openssl/openssl_h_Compatibility.java  | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/java/org/apache/tomcat/util/openssl/openssl_h_Compatibility.java 
b/java/org/apache/tomcat/util/openssl/openssl_h_Compatibility.java
index 2ac4e437a5..ae8ae82c9e 100644
--- a/java/org/apache/tomcat/util/openssl/openssl_h_Compatibility.java
+++ b/java/org/apache/tomcat/util/openssl/openssl_h_Compatibility.java
@@ -297,17 +297,9 @@ public class openssl_h_Compatibility {
      * }
      */
     public static int ENGINE_register_all_complete() {
-        class Holder {
-            static final FunctionDescriptor DESC = FunctionDescriptor.of(
-                openssl_h.C_INT        );
-
-            static final MethodHandle MH = 
Linker.nativeLinker().downcallHandle(
-                    openssl_h.findOrThrow("ENGINE_register_all_complete"),
-                    DESC);
-        }
-        var mh$ = Holder.MH;
         try {
-            return (int) mh$.invokeExact();
+            return (int) 
Linker.nativeLinker().downcallHandle(openssl_h.findOrThrow("ENGINE_register_all_complete"),
+                    FunctionDescriptor.of(JAVA_INT)).invokeExact();
         } catch (Throwable ex$) {
            throw new AssertionError("should not reach here", ex$);
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to