Add mapping for EnumProcesses to Psapi#1214
Add mapping for EnumProcesses to Psapi#1214T-Svensson wants to merge 12 commits intojava-native-access:masterfrom
Conversation
Added arm64 support to .travis.yml file
Add structures and methods to enumerate sessions
Remove too-strict filestore available size test
Add mappings for Thread32First and Thread32Next to Kernel32
eadcb25 to
9c27512
Compare
dbwiddis
left a comment
There was a problem hiding this comment.
Thanks for your submission! I've left a few comments inline.
9c27512 to
104889d
Compare
|
Please review again @dbwiddis, I think I covered all your comments. |
dbwiddis
left a comment
There was a problem hiding this comment.
Looking good. A few more comments.
104889d to
3c0dc33
Compare
|
Since there was no additional comment on my questions above, I've uploaded a new changeset that addresses the other topics. |
|
It looks generally good to me. I don't seem to have the powers (yet) to merge this so I'll let @matthiasblaesing take it from here, if he has any other changes. |
758a829 to
8895113
Compare
|
I decided to add 2 more functions to the utility to extract the name of the process. |
dbwiddis
left a comment
There was a problem hiding this comment.
Thanks for your patience. A few more comments.
8895113 to
49c276a
Compare
49c276a to
3ccc9d1
Compare
|
Unless there are any obvious errors in the last push, I'll consider this PR ready for merge. |
dbwiddis
left a comment
There was a problem hiding this comment.
Just a few last changes.
| int[] pids = PsapiUtil.enumProcesses(); | ||
|
|
||
| assertNotNull("List should not be null", pids); | ||
| assertTrue("List should contain my pid", Arrays.stream(pids).anyMatch(pid -> pid == myPid)); |
There was a problem hiding this comment.
We retain compatibility with Java 1.6, so as neat as streams and lambdas are, you have to do it the old fashioned way.
There was a problem hiding this comment.
If you aim to also have the test classes in Java6, I suggest that the Eclipse project is set to have Java6 as the target and the build.xml should also check ./test-classes, not just ./classes.
Anyway, I'll push a fix for this.
There was a problem hiding this comment.
There are one or two exceptions in the test classes that require Java 8, which is why the project includes a higher compatibility level in the config files, but we otherwise maintain the standard.
There was a problem hiding this comment.
(I know this because I did the same thing not too long ago!)
| int size = 0; | ||
| IntByReference lpdwSize = new IntByReference(); | ||
| do { | ||
| size = size + 1024; |
There was a problem hiding this comment.
Since WinDef.MAX_PATH should work in most cases, let's use that as the initial size. You can initialize on line 914 and increment (I'm ok with += 1024) after the query conditional.
Added utility method QueryFullProcessImageName that takes a PID. Fixed QueryFullProcessImageName to properly handle paths longer than 260 characters that can happen on Win10 / paths with UNC.
3ccc9d1 to
6579864
Compare
|
Thanks for the updates. I'll commit this later today. |
|
Merged in 22dc037 |
No description provided.