Skip to content

Commit

Permalink
8333837: [11u] HexPrinterTest.java javac compile fails illegal start …
Browse files Browse the repository at this point in the history
…of expression

Reviewed-by: mdoerr, shade
  • Loading branch information
SendaoYan authored and shipilev committed Jun 12, 2024
1 parent f343625 commit c9cc14b
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions test/lib-test/jdk/test/lib/hexdump/HexPrinterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,22 @@ Object[][] builtinParams() {
public void testBuiltins(String name, String offsetFormat, String binFormat, int colWidth,
String annoDelim, int annoWidth,
HexPrinter.Formatter mapper, String lineSep) {
HexPrinter f = switch (name) {
case "minimal" -> HexPrinter.minimal();
case "simple" -> HexPrinter.simple();
case "canonical" -> HexPrinter.canonical();
case "source" -> HexPrinter.source();
default -> throw new IllegalStateException("Unexpected value: " + name);
HexPrinter f;
switch (name) {
case "minimal":
f = HexPrinter.minimal();
break;
case "simple":
f = HexPrinter.simple();
break;
case "canonical":
f = HexPrinter.canonical();
break;
case "source":
f = HexPrinter.source();
break;
default:
throw new IllegalStateException("Unexpected value: " + name);
};

testParams(f, offsetFormat, binFormat, colWidth, annoDelim, annoWidth, mapper, lineSep);
Expand Down

1 comment on commit c9cc14b

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.