Skip to content

Commit

Permalink
suppressed warning
Browse files Browse the repository at this point in the history
  • Loading branch information
alexradzin committed May 1, 2024
1 parent 8389c9d commit cb555a6
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,7 @@
import lombok.Builder;
import lombok.Value;

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

/**
Expand All @@ -36,12 +37,13 @@ public class QueryResult {
* TabSeparatedWithNamesAndTypes format
*/
@Override
@SuppressWarnings("java:S6204") // JDK 11 compatible
public String toString() {
StringBuilder stringBuilder = new StringBuilder();
appendWithListValues(stringBuilder, columns.stream().map(Column::getName).collect(toUnmodifiableList()));
appendWithListValues(stringBuilder, columns.stream().map(Column::getName).collect(toList()));
stringBuilder.append(NEXT_LINE);
Function<Column, String> columnToString = c -> c.getType().getAliases()[0] + (c.isNullable() ? " null" : "");
appendWithListValues(stringBuilder, columns.stream().map(columnToString).collect(toUnmodifiableList()));
appendWithListValues(stringBuilder, columns.stream().map(columnToString).collect(toList()));
stringBuilder.append(NEXT_LINE);

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

0 comments on commit cb555a6

Please sign in to comment.