Baoqi commented on a change in pull request #1035: spotbugs: make map traversal
more efficient
URL:
https://github.com/apache/incubator-dolphinscheduler/pull/1035#discussion_r335783529
##########
File path:
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/sql/SqlTask.java
##########
@@ -355,10 +355,9 @@ private PreparedStatement
prepareStatementAndBind(Connection connection, SqlBind
}
Map<Integer, Property> params = sqlBinds.getParamsMap();
if(params != null){
- for(Integer key : params.keySet()){
- Property prop = params.get(key);
-
ParameterUtils.setInParameter(key,stmt,prop.getType(),prop.getValue());
- }
+ for(Map.Entry<Integer, Property> entry: params.entrySet()) {
+ Property prop = entry.getValue();
+
ParameterUtils.setInParameter(entry.getKey(),stmt,prop.getType(),prop.getValue());
Review comment:
Here, you delete an extra } So, it can not compile
(你是不是多删除了一个 } 这样会编译不过, 最好先编译一下再提交)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services