Skip to content

Commit 40c623f

Browse files
committed
Work around weird spotbugs crash
1 parent 1f1dcfc commit 40c623f

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

Diff for: java/org/apache/tomcat/util/openssl/openssl_h_Compatibility.java

+2-10
Original file line numberDiff line numberDiff line change
@@ -297,17 +297,9 @@ class Holder {
297297
* }
298298
*/
299299
public static int ENGINE_register_all_complete() {
300-
class Holder {
301-
static final FunctionDescriptor DESC = FunctionDescriptor.of(
302-
openssl_h.C_INT );
303-
304-
static final MethodHandle MH = Linker.nativeLinker().downcallHandle(
305-
openssl_h.findOrThrow("ENGINE_register_all_complete"),
306-
DESC);
307-
}
308-
var mh$ = Holder.MH;
309300
try {
310-
return (int) mh$.invokeExact();
301+
return (int) Linker.nativeLinker().downcallHandle(openssl_h.findOrThrow("ENGINE_register_all_complete"),
302+
FunctionDescriptor.of(JAVA_INT)).invokeExact();
311303
} catch (Throwable ex$) {
312304
throw new AssertionError("should not reach here", ex$);
313305
}

0 commit comments

Comments
 (0)