Skip to content

Commit

Permalink
removed system.out and usage of new java api
Browse files Browse the repository at this point in the history
  • Loading branch information
chernser committed Sep 18, 2024
1 parent 85d06d8 commit 7bf6d71
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions client-v2/src/main/java/com/clickhouse/client/api/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,6 @@ public CompletableFuture<InsertResponse> insert(String tableName, List<?> data,
if (serializer == null) {
throw new IllegalArgumentException("No serializer found for column '" + column.getColumnName() + "'. Did you forget to register it?");
}
System.out.println("Serializer: " + serializer.toString() + " for column: " + column.getColumnName());
serializersForTable.add(serializer);
}

Expand Down Expand Up @@ -1130,7 +1129,6 @@ public CompletableFuture<InsertResponse> insert(String tableName, List<?> data,
for (Object obj : data) {

for (POJOSerializer serializer : serializersForTable) {
System.out.println("Serializer: " + serializer.toString());
try {
serializer.serialize(obj, out);
} catch (InvocationTargetException | IllegalAccessException | IOException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public Exception readError(ClassicHttpResponse httpResponse) {
}
}

return new ServerException(serverCode, ERROR_CODE_PREFIX_PATTERN.formatted(serverCode) + " <Unreadable error message>");
return new ServerException(serverCode, String.format(ERROR_CODE_PREFIX_PATTERN, serverCode) + " <Unreadable error message>");
} catch (IOException e) {
throw new ClientException("Failed to read response body", e);
}
Expand Down

0 comments on commit 7bf6d71

Please sign in to comment.