File tree Expand file tree Collapse file tree
src/main/java/com/mynosql/shell Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments