khadgarmage commented on a change in pull request #1035: spotbugs: make map 
traversal more efficient
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/1035#discussion_r335786568
 
 

 ##########
 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:
   这个我编译了,可能后来我又手工删了,没编译,sorry

----------------------------------------------------------------
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

Reply via email to