mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8268967: Update java.security to use switch expressions
Reviewed-by: xuelei
This commit is contained in:
parent
b565459f83
commit
35c4702055
3 changed files with 46 additions and 107 deletions
|
@ -447,12 +447,8 @@ public abstract class MessageDigest extends MessageDigestSpi {
|
|||
PrintStream p = new PrintStream(baos);
|
||||
p.print(algorithm+" Message Digest from "+getProviderName()+", ");
|
||||
switch (state) {
|
||||
case INITIAL:
|
||||
p.print("<initialized>");
|
||||
break;
|
||||
case IN_PROGRESS:
|
||||
p.print("<in progress>");
|
||||
break;
|
||||
case INITIAL -> p.print("<initialized>");
|
||||
case IN_PROGRESS -> p.print("<in progress>");
|
||||
}
|
||||
p.println();
|
||||
return (baos.toString());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue