jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1656180 - /jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java
Date Sat, 31 Jan 2015 11:05:48 GMT
Author: fschumacher
Date: Sat Jan 31 11:05:48 2015
New Revision: 1656180

URL: http://svn.apache.org/r1656180
Log:
Bug: 57110
Convert to new for loop.
Bugzilla Id: 57110

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java?rev=1656180&r1=1656179&r2=1656180&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java Sat Jan 31 11:05:48 2015
@@ -321,8 +321,8 @@ public class MainFrame extends JFrame im
         if (menuBar.isSelected()) {
             MenuElement[] menuElement = menuBar.getSubElements();
             if (menuElement != null) {
-                for (int i = 0; i < menuElement.length; i++) {
-                    JMenu menu = (JMenu) menuElement[i];
+                for (MenuElement element : menuElement) {
+                    JMenu menu = (JMenu) element;
                     if (menu.isSelected()) {
                         menu.setPopupMenuVisible(false);
                         menu.setSelected(false);
@@ -702,9 +702,9 @@ public class MainFrame extends JFrame im
         try {
             Transferable tr = dtde.getTransferable();
             DataFlavor[] flavors = tr.getTransferDataFlavors();
-            for (int i = 0; i < flavors.length; i++) {
+            for (DataFlavor flavor : flavors) {
                 // Check for file lists specifically
-                if (flavors[i].isFlavorJavaFileListType()) {
+                if (flavor.isFlavorJavaFileListType()) {
                     dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);
                     try {
                         openJmxFilesFromDragAndDrop(tr);



Mime
View raw message