mirror of
https://github.com/apache/sqoop.git
synced 2025-05-21 11:21:39 +08:00
SQOOP-1474: Fix usage of StringUtils.repeat method
This commit is contained in:
parent
b1cc817792
commit
309cf45e7e
@ -241,8 +241,11 @@ private static void insertFunction(int id, String msg,
|
||||
sql.append(instanceForProcedure.names[i]);
|
||||
}
|
||||
sql.append(") values (");
|
||||
sql.append(StringUtils.repeat("?", ", ",
|
||||
instanceForProcedure.names.length + 2));
|
||||
for (int i = 0; i < instanceForProcedure.names.length + 2; ++i) {
|
||||
sql.append("?,");
|
||||
}
|
||||
// Remove last ,
|
||||
sql = sql.delete(sql.length() - 1, sql.length());
|
||||
sql.append(")");
|
||||
|
||||
PreparedStatement statement = con.prepareStatement(sql.toString());
|
||||
|
Loading…
Reference in New Issue
Block a user