Skip to content

Commit

Permalink
hopefully fixed warning
Browse files Browse the repository at this point in the history
  • Loading branch information
alexradzin committed May 1, 2024
1 parent 5bb2853 commit 8389c9d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/com/firebolt/jdbc/QueryResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import lombok.Builder;
import lombok.Value;

import static java.util.stream.Collectors.toUnmodifiableList;

/**
* Class containing a query result that can be used to create a
* {@link com.firebolt.jdbc.resultset.FireboltResultSet}
Expand All @@ -36,10 +38,10 @@ public class QueryResult {
@Override
public String toString() {
StringBuilder stringBuilder = new StringBuilder();
appendWithListValues(stringBuilder, columns.stream().map(Column::getName).collect(Collectors.toList()));
appendWithListValues(stringBuilder, columns.stream().map(Column::getName).collect(toUnmodifiableList()));
stringBuilder.append(NEXT_LINE);
Function<Column, String> columnToString = c -> c.getType().getAliases()[0] + (c.isNullable() ? " null" : "");
appendWithListValues(stringBuilder, columns.stream().map(columnToString).collect(Collectors.toList()));
appendWithListValues(stringBuilder, columns.stream().map(columnToString).collect(toUnmodifiableList()));
stringBuilder.append(NEXT_LINE);

for (int i = 0; i < rows.size(); i++) {
Expand Down

0 comments on commit 8389c9d

Please sign in to comment.