jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1199781 - /jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java
Date Wed, 09 Nov 2011 15:00:04 GMT
Author: sebb
Date: Wed Nov  9 15:00:04 2011
New Revision: 1199781

URL: http://svn.apache.org/viewvc?rev=1199781&view=rev
Log:
Don't bother instantiating classes that won't be used

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

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java?rev=1199781&r1=1199780&r2=1199781&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java Wed Nov  9 15:00:04
2011
@@ -431,6 +431,11 @@ public final class MenuFactory {
                     continue;// Don't try to instantiate these
                 }
 
+                if (elementsToSkip.contains(name)) { // No point instantiating class
+                    log.info("Skipping " + name);
+                    continue;
+                }
+
                 JMeterGUIComponent item;
                 try {
                     Class<?> c = Class.forName(name);
@@ -452,11 +457,11 @@ public final class MenuFactory {
                     }
                     continue;
                 }
-                if (elementsToSkip.contains(name) || elementsToSkip.contains(item.getStaticLabel()))
{
+                if (elementsToSkip.contains(item.getStaticLabel())) {
                     log.info("Skipping " + name);
                     continue;
                 } else {
-                    elementsToSkip.add(name);
+                    elementsToSkip.add(name); // Don't add it again
                 }
                 Collection<String> categories = item.getMenuCategories();
                 if (categories == null) {



Mime
View raw message