From 6886ebdf1d0701c1374d236069c28908f58abd6e Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Tue, 4 Jan 2022 15:08:06 -0600 Subject: [PATCH] Allow non-varargs to get wrapped with sync This early return skipped logic below to wrap the invoker with synchronization. --- src/main/java/jnr/ffi/provider/jffi/DefaultInvokerFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/jnr/ffi/provider/jffi/DefaultInvokerFactory.java b/src/main/java/jnr/ffi/provider/jffi/DefaultInvokerFactory.java index b23f02ae..8ab348c4 100644 --- a/src/main/java/jnr/ffi/provider/jffi/DefaultInvokerFactory.java +++ b/src/main/java/jnr/ffi/provider/jffi/DefaultInvokerFactory.java @@ -138,7 +138,7 @@ public Invoker createInvoker(Method method) { marshallers[i] = getMarshaller(parameterTypes[i]); } - return new DefaultInvoker(runtime, library, function, functionInvoker, marshallers); + invoker = new DefaultInvoker(runtime, library, function, functionInvoker, marshallers); } //