You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/11/26 21:22:05 UTC

[GitHub] [netbeans] mklaehn commented on a change in pull request #1657: Fix rawtypes warning for Iterator in platform cluster

mklaehn commented on a change in pull request #1657: Fix rawtypes warning for Iterator in platform cluster
URL: https://github.com/apache/netbeans/pull/1657#discussion_r350986015
 
 

 ##########
 File path: platform/core.multiview/src/org/netbeans/core/multiview/MultiViewPeer.java
 ##########
 @@ -801,11 +799,11 @@ private UndoRedo privateGetUndoRedo() {
      * Delegates to CloseOperationHandler.
      */
     boolean canClose() {
-        Collection col = model.getCreatedElements();
-        Iterator it = col.iterator();
-        Collection badOnes = new ArrayList();
+        Collection<MultiViewElement> col = model.getCreatedElements();
+        Iterator<MultiViewElement> it = col.iterator();
+        Collection<CloseOperationState> badOnes = new ArrayList<>();
         while (it.hasNext()) {
 
 Review comment:
   It really shouldn't. They could be converted to enhanced-for-loops but they shouldn't be nested.
   The first while loop collects all non-closeable MVEs which the second while loop - if the closeHandler indicated such - attemps to close again.
   
   You know the dialog showing you the unsaved files when you attempt to close one editor or the whole IDE. That's the principle here.
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists