jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1846343 - /jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java
Date Sun, 11 Nov 2018 10:31:00 GMT
Author: fschumacher
Date: Sun Nov 11 10:31:00 2018
New Revision: 1846343

URL: http://svn.apache.org/viewvc?rev=1846343&view=rev
Log:
Parameterize raw type that is used internally, only

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=1846343&r1=1846342&r2=1846343&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 Sun Nov 11 10:31:00
2018
@@ -578,8 +578,8 @@ public final class MenuFactory {
         }
 
         if (parent instanceof TestPlan) {
-            List<Class> samplerAndController = Arrays.asList(Sampler.class, Controller.class);
-            List<Class> exceptions = Arrays.asList(AbstractThreadGroup.class, NonTestElement.class);
+            List<Class<?>> samplerAndController = Arrays.asList(Sampler.class,
Controller.class);
+            List<Class<?>> exceptions = Arrays.asList(AbstractThreadGroup.class,
NonTestElement.class);
             return !foundClass(nodes, samplerAndController, exceptions);
         }
         // AbstractThreadGroup is only allowed under a TestPlan
@@ -608,7 +608,7 @@ public final class MenuFactory {
      * @param classes Array of {@link Class}
      * @return true if nodes is one of classes
      */
-    private static boolean foundClass(JMeterTreeNode[] nodes, Class[] classes) {
+    private static boolean foundClass(JMeterTreeNode[] nodes, Class<?>[] classes) {
         for (JMeterTreeNode node : nodes) {
             for (Class<?> aClass : classes) {
                 if (aClass.isInstance(node.getUserObject())) {
@@ -640,7 +640,7 @@ public final class MenuFactory {
      * @return boolean
      */
     private static boolean foundClass(
-            JMeterTreeNode[] nodes, List<Class> classes, List<Class> exceptions)
{
+            JMeterTreeNode[] nodes, List<Class<?>> classes, List<Class<?>>
exceptions) {
         return Arrays.stream(nodes)
                 .map(DefaultMutableTreeNode::getUserObject)
                 .filter(userObj -> exceptions.stream().noneMatch(c -> c.isInstance(userObj)))



Mime
View raw message