com4j
com4j copied to clipboard
Methods with return type void fail when using default values
When generateDefaultMethodOverloads is set to true, methods with return type void have a @ReturnValue annotation added with index=-1.
Void methods don't need a ReturnValue annotation, even when using default values. This causes problems later as when invoking the method the runtime looks for a converter and doesn't find one.
See MethodBind.java @ line 556 and ComMethod.java @ line 96 (called indirectly from Wrapper.java @ line 179)