diff --git a/studio/src/main/java/acolyte/RowFormatter.java b/studio/src/main/java/acolyte/RowFormatter.java index 6bae4134..1c2ded6f 100644 --- a/studio/src/main/java/acolyte/RowFormatter.java +++ b/studio/src/main/java/acolyte/RowFormatter.java @@ -223,7 +223,7 @@ static void appendNull(final Appender ap, /** * Result set values. */ - static void appendValues(final Iterator it, + static void appendValues(final ResultRow rs, final Appender ap, final Charset charset, final Formatting fmt, @@ -241,11 +241,10 @@ static void appendValues(final Iterator it, } // end of if final ColumnType col = cols.next(); - final ResultRow rs = it.next(); if (rs.isNull(colIndex)) { appendNull(ap, fmt, col); - appendValues(it, ap, charset, fmt, cols, colIndex+1); + appendValues(rs, ap, charset, fmt, cols, colIndex+1); return; } // end of if @@ -316,7 +315,7 @@ static void appendValues(final Iterator it, break; } // end of switch - appendValues(it, ap, charset, fmt, cols, colIndex+1); + appendValues(rs, ap, charset, fmt, cols, colIndex+1); } // end of appendValues /** @@ -336,7 +335,7 @@ protected static void appendRows(final Iterator it, ap.append(" "); ap.append(fmt.rowStart); - appendValues(it, ap, charset, fmt, cols.iterator(), 0); + appendValues(it.next(), ap, charset, fmt, cols.iterator(), 0); ap.append(fmt.rowEnd); } // end of while