-
Notifications
You must be signed in to change notification settings - Fork 246
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
fix(java): exception is logged when Java VM is shutting down #2305
Conversation
Guards against the `IllegalStateException` that will be thrown upon attempting to remove a shutdown hook during VM shut down. In such cases, the removal is no longer possible nor necessary, so the exception can be safely ignored. Fixes #2303
|
||
<!-- https://mvnrepository.com/artifact/javax.annotation/javax.annotation-api --> | ||
<dependency> | ||
<groupId>javax.annotation</groupId> | ||
<artifactId>javax.annotation-api</artifactId> | ||
<version>\${javax-annotations.version}</version> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This improves compat with "more recent" JDKs (where the "built-in" @javax.annotations.*
was moved to a different package).
Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it! |
Merging (with squash)... |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Merging (with squash)... |
Guards against the
IllegalStateException
that will be thrown uponattempting to remove a shutdown hook during VM shut down. In such cases,
the removal is no longer possible nor necessary, so the exception can be
safely ignored.
Fixes #2303
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.