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

Make conversion to/from java in c.s.j.p.win32.COM.util more flexible #625

Merged

Conversation

matthiasblaesing
Copy link
Member

ProxyObject and Callback both use the Convert class as helper to convert
java object to/from VARIANT. This change adds more flexibility and adds
tests to fixate and check conversion.

ProxyObject and Callback both use the Convert class as helper to convert
java object to/from VARIANT. This change adds more flexibility and adds
tests to fixate and check conversion.
@@ -46,6 +46,7 @@ Features
* [#618](https://github.com/java-native-access/jna/pull/618): Implement SAFEARRAY access and bugfix VARIANT - [@matthiasblaesing](https://github.com/matthiasblaesing).
* [#616](https://github.com/java-native-access/jna/pull/616): Allow access to base interfaces (most important IDispatch) via ProxyObject and improve binding by allowing to use dispId for the call - [@matthiasblaesing](https://github.com/matthiasblaesing).
* [#621](https://github.com/java-native-access/jna/pull/621): Added TYPEFLAGS-constants for `wTypeFlags` in `com.sun.jna.platform.win32.OaIdl.TYPEATTR` - [@SevenOf9Sleeper](https://github.com/SevenOf9Sleeper).
* [#625](https://github.com/java-native-access/jna/pull/625): Make conversion to/from java to/from VARIANT in `com.sun.jna.platform.win32.COM.util.Convert` more flexible and dependable by introducing more conversions and unittests - [@matthiasblaesing](https://github.com/matthiasblaesing).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually don't mention unit tests. Those are taken for granted as we always require lots of them :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course :-) I'll keep that in mind. Thanks for taking care of this!

@dblock dblock merged commit 7123030 into java-native-access:master Mar 30, 2016
public static Object toJavaObject(VARIANT value, Class targetClass) {
if (null==value) {
public static Object toJavaObject(VARIANT value, Class targetClass, Factory factory, boolean addReference) {
if (null==value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Java 5 generic definitions:

public static Object toJavaObject(VARIANT value, Class<?> targetClass, Factory factory, boolean addReference) {
...

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

Successfully merging this pull request may close these issues.

3 participants