diff --git a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerBulkCSVFileRecord.java b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerBulkCSVFileRecord.java index 7583aea1a..1b21544f9 100644 --- a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerBulkCSVFileRecord.java +++ b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerBulkCSVFileRecord.java @@ -246,7 +246,7 @@ private String readLineEscapeDelimiters() throws SQLServerException { if (c == -1 && quoteCount % 2 != 0) { // stream ended, but we are within quotes -- data problem throw new SQLServerException(SQLServerException.getErrString("R_InvalidCSVQuotes"), null, 0, null); } - if ((c == -1) && sb.toString().isEmpty()) { // keep semantics of readLine() by returning a null when there is no more data + if ((c == -1) && (sb.length() == 0)) { // keep semantics of readLine() by returning a null when there is no more data return null; } } catch (IOException e) {