Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ private static IllegalArgumentException invalid(String expr) {
private static Comparable<?> parseValue(String raw) {
try {
return Long.parseLong(raw);
} catch (NumberFormatException _) {
} catch (NumberFormatException _) { // not this type; try the next
}
try {
return Double.parseDouble(raw);
} catch (NumberFormatException _) {
} catch (NumberFormatException _) { // not this type; try the next
}
if ("true".equalsIgnoreCase(raw)) {
return Boolean.TRUE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,7 @@ private void handleKey(Key key, List<Item> items) {
case Key.PageUp _ -> selected = Math.max(selected - 10, 0);
case Key.Home _ -> selected = 0;
case Key.End _ -> selected = items.size() - 1;
default -> {
}
default -> { /* ignore unhandled keys */ }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ private void indexNested(Ast.MessageDecl parent, String parentFqn, String javaPa
String fqn = parentFqn + "." + e.name();
byFqn.put(fqn, new ResolvedType.Enum(e, fqn, javaPackage));
}
case Ast.FieldDecl _ -> { }
case Ast.OneOfDecl _ -> { }
case Ast.FieldDecl _ -> { /* not a type declaration */ }
case Ast.OneOfDecl _ -> { /* not a type declaration */ }
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ void randomChunkMetaBytes_neverThrowsJvmException(byte[] chunkMetaBytes) {
assertThatCode(() -> {
try {
SUT.decode(ctx);
} catch (VortexException _) {
} catch (VortexException _) { // acceptable; only non-Vortex failures should escape
}
}).doesNotThrowAnyException();
}
Expand All @@ -467,7 +467,7 @@ void randomPageBytes_classicMode_neverThrowsJvmException(byte[] pageBytes) {
assertThatCode(() -> {
try {
SUT.decode(ctx);
} catch (VortexException _) {
} catch (VortexException _) { // acceptable; only non-Vortex failures should escape
}
}).doesNotThrowAnyException();
}
Expand Down