jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1818935 - /jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuInfo.java
Date Thu, 21 Dec 2017 15:20:56 GMT
Author: pmouawad
Date: Thu Dec 21 15:20:56 2017
New Revision: 1818935

URL: http://svn.apache.org/viewvc?rev=1818935&view=rev
Log:
Reuse constructor
Indicate silent catch is voluntary

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

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuInfo.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuInfo.java?rev=1818935&r1=1818934&r2=1818935&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuInfo.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuInfo.java Thu Dec 21 15:20:56 2017
@@ -33,16 +33,17 @@ public class MenuInfo {
     private final int sortOrder;
 
     public MenuInfo(String displayLabel, String classFullName) {
-        label = displayLabel;
-        className = classFullName;
-        guiComp = null;
-        sortOrder = getSortOrderFromName(classFullName);
+        this(displayLabel, null, classFullName);
     }
 
     public MenuInfo(JMeterGUIComponent item, String classFullName) {
-        label = item.getStaticLabel();
-        className = classFullName;
+        this(item.getStaticLabel(), item, classFullName);
+    }
+    
+    public MenuInfo(String label, JMeterGUIComponent item, String classFullName) {
+        this.label = label;
         guiComp = item;
+        className = classFullName;
         sortOrder = getSortOrderFromName(classFullName);
     }
 
@@ -54,6 +55,7 @@ public class MenuInfo {
                 return menuSortOrder.value();
             }
         } catch (ClassNotFoundException ignored) {
+            // NOOP
         }
         return SORT_ORDER_DEFAULT;
     }



Mime
View raw message