-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Test Structure.getFieldOrder() #183
Test Structure.getFieldOrder() #183
Conversation
…. allows for ignoring all inner classes of a given class.
Dan, Thanks for putting this together. A few notes:
On Jan 24, 2013, at 2:49 AM, Dan Rollo wrote:
|
I've checked through these, and the only warnings that don't refer to a subclass alias or a non-public or static member field are the DBT$DEV_BROADCAST_HANDLE, DBT$DEV_BROADCAST_PORT, and GROUP_INFO_3. I think any patches should be made as part of this PR. On Jan 24, 2013, at 2:49 AM, Dan Rollo wrote:
|
Can you re-format this PR so that it's a branch-to-master PR on the jna repo (instead of from your private one)? or you can just apply the following diff to yours and the PR will update automatically. This diff addresses the missing default constructor warnings.
|
I`ve checked the classes DEV_BROADCAST_HANDLE and DEV_BROADCAST_PORT and Von: twall [mailto:notifications@github.com] I've checked through these, and the only warnings that don't refer to a I think any patches should be made as part of this PR. On Jan 24, 2013, at 2:49 AM, Dan Rollo wrote:
Reply to this email directly or view it on <https://github.com/notifications/beacon/Jshd8sI44GVrKZBvymxqKIcbr1qTlzgkagz |
…:1511: warning: unmappable character for encoding UTF8
…tead of grpi3_group_id.
Ugh. Looks like git config for core.autocrlf ("input") did badness to the windows line endings. changed core.autocrlf setting to "false", cleared local cache and reset local head, and things seem to be behaving better now. |
Test Structure.getFieldOrder() All Structure warnings are solved, so I'm going to commit this. BTW, I saw something odd ("has unknown size" error) when instantiating an empty Structure (one with no instance fields). Please see the @todo comments in com.sun.jna.StructureFieldOrderInspectorTest.java. Restore the test: testCheckMethodGetFieldOrderStaticFieldOnlyStatic() to reproduce the behavior.
Motivation: At the moment we dont provide a lot of details in the SSLHandshakeException which makes it hard to understand why a handshake fails. Modifications: - Add native method which will peek into the error queue and provide more details if possible - Use these details when constructing the exception message Result: Easier to debug SSLHandshakeException causes
We've seen a number of problems with missing or outdated Structure.getFieldOrder() implementations, so I put together a unit test (and reusable unit test utility class) that scans for Structure sub types and flags problematic getFieldOrder() implementations.
I used the "Reflections" library to do this, and put it's libs in a new "lib/test" sub folder (to keep them outta the distro).
Currently, the scan shows no problems in the core jna project, but there appear to be a number of problems (23) in the platform tree. If we commit this right now, the platform build will start failing due to these problems. I have pasted the output of these scans below. Maybe some of these are false alarms, but I'm pretty sure some of them are genuine problems.
Should we commit, and fix? Or fix, then commit?
Dan