Skip to content

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

Merged
dblock merged 1 commit intojava-native-access:masterfrom
matthiasblaesing:flexibleVariantConversion
Mar 30, 2016
Merged

Make conversion to/from java in c.s.j.p.win32.COM.util more flexible#625
dblock merged 1 commit intojava-native-access:masterfrom
matthiasblaesing:flexibleVariantConversion

Conversation

@matthiasblaesing
Copy link
Copy Markdown
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.
@matthiasblaesing matthiasblaesing force-pushed the flexibleVariantConversion branch from 6a03731 to 1cdd3e9 Compare March 30, 2016 20:37
Comment thread CHANGES.md
* [#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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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