mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8268124: Update java.lang to use switch expressions
Reviewed-by: naoto, darcy, mchung, iris, lancea, dfuchs
This commit is contained in:
parent
a187fcc3ec
commit
d43c8a74b3
22 changed files with 421 additions and 551 deletions
|
@ -163,11 +163,11 @@ abstract class DelegatingMethodHandle extends MethodHandle {
|
|||
}
|
||||
|
||||
private static Kind whichKind(int whichCache) {
|
||||
switch(whichCache) {
|
||||
case MethodTypeForm.LF_REBIND: return BOUND_REINVOKER;
|
||||
case MethodTypeForm.LF_DELEGATE: return DELEGATE;
|
||||
default: return REINVOKER;
|
||||
}
|
||||
return switch (whichCache) {
|
||||
case MethodTypeForm.LF_REBIND -> BOUND_REINVOKER;
|
||||
case MethodTypeForm.LF_DELEGATE -> DELEGATE;
|
||||
default -> REINVOKER;
|
||||
};
|
||||
}
|
||||
|
||||
static final NamedFunction NF_getTarget;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue