-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Java 17 instanceof pattern matching for test and x-pack/qa #82683
Conversation
Pinging @elastic/es-core-infra (Team:Core/Infra) |
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.
One ask, o.w. LGTM
@@ -206,8 +206,8 @@ public synchronized LoginContext login() throws PrivilegedActionException { | |||
try { | |||
return AccessController.doPrivileged((PrivilegedExceptionAction<T>) () -> Subject.doAsPrivileged(subject, action, acc)); | |||
} catch (PrivilegedActionException pae) { | |||
if (pae.getCause() instanceof PrivilegedActionException) { | |||
throw (PrivilegedActionException) pae.getCause(); | |||
if (pae.getCause()instanceof PrivilegedActionException privilegedActionException) { |
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.
reinstate space before instanceof
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.
@ywelsch unfortunately, that whitespace missing there is the result of spotless, because of a bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=574437. We are waiting for Spotless to fix it on their side: diffplug/spotless#1046.
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.
ok 😞
💚 Backport successful
|
Switch to Java 17
instanceof
pattern matching for folderstest
andx-pack/qa
.