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 Mar 30, 2016
Merged
Conversation
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.
6a03731 to
1cdd3e9
Compare
| * [#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). |
Member
There was a problem hiding this comment.
We usually don't mention unit tests. Those are taken for granted as we always require lots of them :)
Member
Author
There was a problem hiding this comment.
Of course :-) I'll keep that in mind. Thanks for taking care of this!
| 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 |
Contributor
There was a problem hiding this comment.
Please use Java 5 generic definitions:
public static Object toJavaObject(VARIANT value, Class<?> targetClass, Factory factory, boolean addReference) {
...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.