Copilot commented on code in PR #62064:
URL: https://github.com/apache/doris/pull/62064#discussion_r3028451511


##########
fe/fe-core/src/main/java/org/apache/doris/journal/bdbje/BDBEnvironment.java:
##########
@@ -312,21 +312,15 @@ public Database openDatabase(String dbName) {
     public void removeDatabase(String dbName) {
         lock.writeLock().lock();
         try {
-            String targetDbName = null;
-            int index = 0;
-            for (Database db : openedDatabases) {
+            for (java.util.Iterator<Database> iter = 
openedDatabases.iterator(); iter.hasNext();) {

Review Comment:
   Using a fully-qualified type (`java.util.Iterator`) inside method bodies 
hurts readability and is inconsistent with typical Java style. Prefer importing 
`java.util.Iterator` (or using an existing import) and writing `for 
(Iterator<Database> iter = ...)` instead.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to