8268124: Update java.lang to use switch expressions

Reviewed-by: naoto, darcy, mchung, iris, lancea, dfuchs
This commit is contained in:
Patrick Concannon 2021-06-10 11:12:37 +00:00
parent a187fcc3ec
commit d43c8a74b3
22 changed files with 421 additions and 551 deletions

View file

@ -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;