Skip to content

[8.19] Use checked exceptions in entitlement constructor rules (#145234)#145350

Merged
elasticsearchmachine merged 2 commits intoelastic:8.19from
jdconrad:backport/8.19/pr-145234
Mar 31, 2026
Merged

[8.19] Use checked exceptions in entitlement constructor rules (#145234)#145350
elasticsearchmachine merged 2 commits intoelastic:8.19from
jdconrad:backport/8.19/pr-145234

Conversation

@jdconrad
Copy link
Copy Markdown
Contributor

Backports the following commits to 8.19:

Constructor entitlement rules updated to throw appropriate 
checked exceptions instead of NotEntitledException (a 
RuntimeException). Method references (IOException::new) 
are used where the exception has a (Throwable) constructor; 
lambdas with initCause are used where no such constructor 
exists.
@jdconrad jdconrad added :Core/Infra/Entitlements Entitlements infrastructure >refactoring auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Core/Infra Meta label for core/infra team labels Mar 31, 2026
…bility

SocketException(String, Throwable) was added in Java 16. Replace the
two-arg constructor with the initCause pattern so the code compiles on
Java 11 (used by the 8.x branches).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@elasticsearchmachine elasticsearchmachine merged commit 28d15e3 into elastic:8.19 Mar 31, 2026
24 checks passed
@jdconrad jdconrad deleted the backport/8.19/pr-145234 branch March 31, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport :Core/Infra/Entitlements Entitlements infrastructure >refactoring Team:Core/Infra Meta label for core/infra team v8.19.14

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants