Skip to content

Added standard Kernel32Util#closeHandle method that throws an exception if failed to close the handle#614

Merged
lgoldstein merged 1 commit intojava-native-access:masterfrom
lgoldstein:close-handle
Mar 9, 2016
Merged

Added standard Kernel32Util#closeHandle method that throws an exception if failed to close the handle#614
lgoldstein merged 1 commit intojava-native-access:masterfrom
lgoldstein:close-handle

Conversation

@lgoldstein
Copy link
Copy Markdown
Contributor

Provide bolierplate template for code that is supposed to close a handle and check the returned error code if failed to do so

@lgoldstein lgoldstein force-pushed the close-handle branch 2 times, most recently from eac4644 to 946a453 Compare March 8, 2016 18:43
Comment thread CHANGES.md Outdated
* [#612](https://github.com/java-native-access/jna/pull/612): Kernel32Util#freeLocal/GlobalMemory always throws Win32Exception if failed [@lgoldstein](https://github.com/lgoldstein).
* [#608](https://github.com/java-native-access/jna/pull/608): Mavenize the build process - change parent and native pom artifactId/name to differentiate in IDE and build tools. [@bhamail](https://github.com/bhamail)
* [#613](https://github.com/java-native-access/jna/pull/613): Make Win32Exception extend LastErrorException [@lgoldstein](https://github.com/lgoldstein).
* [#613](https://github.com/java-native-access/jna/pull/614): Added standard Kernel32Util#closeHandle method that throws a eption if failed to close the handle [@lgoldstein](https://github.com/lgoldstein).
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.

throws a .... exception :) Also quote these function names in backticks probably (and above).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will do.

@dblock
Copy link
Copy Markdown
Member

dblock commented Mar 9, 2016

Correct the typo in CHANGELOG, otherwise feel free to merge, code looks good.

@lgoldstein lgoldstein changed the title Added standard Kernel32Util#closeHandle method that throws a eption if failed to close the handle Added standard Kernel32Util#closeHandle method that throws an exception if failed to close the handle Mar 9, 2016
lgoldstein added a commit that referenced this pull request Mar 9, 2016
Added standard Kernel32Util#closeHandle method that throws an exception if failed to close the handle
@lgoldstein lgoldstein merged commit c23b590 into java-native-access:master Mar 9, 2016
@lgoldstein lgoldstein deleted the close-handle branch March 9, 2016 17:31
Comment thread CHANGES.md
* [#582](https://github.com/java-native-access/jna/pull/582): Mavenize the build process - Phase 1: building the native code via Maven [@lgoldstein](https://github.com/lgoldstein).
* [#606](https://github.com/java-native-access/jna/pull/606): Added Kerne32Util method to facilitate checking that calls to LocalFree/GlobalFree are successful [@lgoldstein](https://github.com/lgoldstein).
* [#612](https://github.com/java-native-access/jna/pull/612): Kernel32Util#freeLocal/GlobalMemory always throws Win32Exception if failed [@lgoldstein](https://github.com/lgoldstein).
* [#612](https://github.com/java-native-access/jna/pull/612): 'Kernel32Util#freeLocal/GlobalMemory' always throws Win32Exception if failed [@lgoldstein](https://github.com/lgoldstein).
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.

Those backticks are the wrong kind ;) Also above there's a typo, Kerne32Util is missing an L :)

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