jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1776751 - in /jmeter/trunk/src/core/org/apache/jmeter/gui/util: MenuFactory.java TristateCheckBox.java
Date Sat, 31 Dec 2016 14:23:26 GMT
Author: pmouawad
Date: Sat Dec 31 14:23:26 2016
New Revision: 1776751

URL: http://svn.apache.org/viewvc?rev=1776751&view=rev
Log:
sonar : fix squid:S1659  : Declare XXX on a separate line.

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/TristateCheckBox.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=1776751&r1=1776750&r2=1776751&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 Sat Dec 31 14:23:26
2016
@@ -123,9 +123,17 @@ public final class MenuFactory {
     private static final String[] MENU_PARENT_SAMPLER = new String[] {
         MenuFactory.CONTROLLERS };
 
-    private static final List<MenuInfo> timers, controllers, samplers, threads, 
-        fragments,configElements, assertions, listeners, nonTestElements,
-        postProcessors, preProcessors;
+    private static final List<MenuInfo> timers;
+    private static final List<MenuInfo> controllers;
+    private static final List<MenuInfo> samplers;
+    private static final List<MenuInfo> threads;
+    private static final List<MenuInfo> fragments;
+    private static final List<MenuInfo> configElements;
+    private static final List<MenuInfo> assertions;
+    private static final List<MenuInfo> listeners;
+    private static final List<MenuInfo> nonTestElements;
+    private static final List<MenuInfo> postProcessors;
+    private static final List<MenuInfo> preProcessors;
 
     static {
         threads = new LinkedList<>();

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/TristateCheckBox.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/TristateCheckBox.java?rev=1776751&r1=1776750&r2=1776751&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/util/TristateCheckBox.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/TristateCheckBox.java Sat Dec 31 14:23:26
2016
@@ -48,8 +48,9 @@ import org.apache.jmeter.testelement.Tes
 import org.apache.jmeter.testelement.property.JMeterProperty;
 import org.apache.jmeter.testelement.property.NullProperty;
 
-// derived from: http://www.javaspecialists.eu/archive/Issue145.html
-
+/**
+ * derived from: http://www.javaspecialists.eu/archive/Issue145.html
+ */
 public final class TristateCheckBox extends JCheckBox {
     private static final long serialVersionUID = 1L;
     // Listener on model changes to maintain correct focusability
@@ -290,8 +291,9 @@ public final class TristateCheckBox exte
         }
     }
 
-  // derived from: http://www.coderanch.com/t/342563/GUI/java/TriState-CheckBox
-
+    /**
+     * derived from: http://www.coderanch.com/t/342563/GUI/java/TriState-CheckBox
+     */
     private static class TristateCheckBoxIcon implements Icon, UIResource, Serializable {
 
         private static final long serialVersionUID = 290L;
@@ -328,19 +330,11 @@ public final class TristateCheckBox exte
             }
 
             drawLine(g, x, y);
-//            drawCross(g, x, y);
-
         }// paintIcon
 
-//        private void drawCross(Graphics g, int x, int y) {
-//            g.drawLine(x + (iconWidth - 4), y + 2, x + 3, y + (iconHeight - 5));
-//            g.drawLine(x + (iconWidth - 4), y + 3, x + 3, y + (iconHeight - 4));
-//            g.drawLine(x + 3, y + 2, x + (iconWidth - 4), y + (iconHeight - 5));
-//            g.drawLine(x + 3, y + 3, x + (iconWidth - 4), y + (iconHeight - 4));
-//        }
-
         private void drawLine(Graphics g, int x, int y) {
-            final int left = x + 2, right =  x + (iconWidth - 4);
+            final int left = x + 2;
+            final int right =  x + (iconWidth - 4);
             int height = y + iconHeight/2;
             g.drawLine(left, height, right, height);
             g.drawLine(left, height - 1, right, height - 1);



Mime
View raw message