mirror of
https://github.com/apache/sqoop.git
synced 2025-05-21 19:31:13 +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(instanceForProcedure.names[i]);
|
||||||
}
|
}
|
||||||
sql.append(") values (");
|
sql.append(") values (");
|
||||||
sql.append(StringUtils.repeat("?", ", ",
|
for (int i = 0; i < instanceForProcedure.names.length + 2; ++i) {
|
||||||
instanceForProcedure.names.length + 2));
|
sql.append("?,");
|
||||||
|
}
|
||||||
|
// Remove last ,
|
||||||
|
sql = sql.delete(sql.length() - 1, sql.length());
|
||||||
sql.append(")");
|
sql.append(")");
|
||||||
|
|
||||||
PreparedStatement statement = con.prepareStatement(sql.toString());
|
PreparedStatement statement = con.prepareStatement(sql.toString());
|
||||||
|
Loading…
Reference in New Issue
Block a user