Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.sun.jna.platform.win32.COM.util.ProxyObject#invoke fails with default methods #1070

Closed
joerg1985 opened this issue Mar 8, 2019 · 1 comment

Comments

@joerg1985
Copy link
Contributor

  1. Version of JNA and related jars: 5.2.0
  2. Version and vendor of the java virtual machine: Open JDK 11.0.2
  3. Operating System: Windows 10
  4. System architecture (CPU type, bitness of the JVM)
  5. Complete description of the problem:

I have an interface with default methods beside the @ComProperty / @ComMethod methods, but the calls to the default methods are redirected to COM.
In my mind the issue is related to th implementation in com.sun.jna.platform.win32.COM.util.ProxyObject#invoke.

There is a checks if the method is declared inside some defined classes and not annotated with @ComProperty / @ComMethod.
It might be enought to check if the method is not annotated with @ComProperty / @ComMethod to decide wether to redirect or not?

Another option might be to define a e.g. @ComIgnore annotation to explicit define the method should not be redirected.

  1. Steps to reproduce

create a COM binding interface, define a default method and try to call the default method.

Kind regards
Jörg

@matthiasblaesing
Copy link
Member

Handling default methods is a generic problem and is already openend as #813. Please have a look there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants