Skip to content

Commit 1eaaf0c

Browse files
committed
fix(shell): resolve CI compile type mismatches
1 parent 46023f9 commit 1eaaf0c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/main/java/com/mynosql/shell/Shell.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ private void printBanner() {
416416
}
417417
System.out.println("A beginner-friendly document database shell.");
418418
System.out.println(keyword("Current database:") + " " + value(currentDb.getName()));
419-
System.out.println(keyword("Data directory:") + " " + value(server.getBaseDir()));
419+
System.out.println(keyword("Data directory:") + " " + value(String.valueOf(server.getBaseDir())));
420420
System.out.println();
421421
System.out.println(keyword("Quick start:"));
422422
System.out.println(" 1. Type " + command("show collections") + " to inspect the current database.");
@@ -510,15 +510,16 @@ private void printHelpLine(String commandText, String description) {
510510
System.out.printf(" %-48s %s%n", command(commandText), description);
511511
}
512512

513-
private void printStringList(String title, List<String> items, String emptyMessage) {
513+
private void printStringList(String title, Collection<String> items, String emptyMessage) {
514514
printSection(title);
515515
if (items.isEmpty()) {
516516
printInfo(emptyMessage);
517517
return;
518518
}
519519

520-
for (int i = 0; i < items.size(); i++) {
521-
System.out.println(" " + (i + 1) + ". " + value(items.get(i)));
520+
int i = 1;
521+
for (String item : items) {
522+
System.out.println(" " + (i++) + ". " + value(item));
522523
}
523524
}
524525

0 commit comments

Comments
 (0)