jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ago...@apache.org
Subject svn commit: r1817321 [2/3] - in /jmeter/trunk: ./ docs/images/screenshots/ docs/images/screenshots/http-config/ docs/images/screenshots/webtest/ src/components/org/apache/jmeter/assertions/ src/components/org/apache/jmeter/assertions/gui/ src/component...
Date Wed, 06 Dec 2017 22:21:23 GMT
Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties Wed Dec  6 22:21:19 2017
@@ -860,7 +860,7 @@ remove=Supprimer
 remove_confirm_msg=Etes-vous s\u00FBr de vouloir supprimer ce(s) \u00E9l\u00E9ment(s) ?
 remove_confirm_title=Confirmer la suppression ?
 rename=Renommer une entr\u00E9e
-replace_file=Remplacer le fichier existant	
+replace_file=Remplacer le fichier existant
 report=Rapport
 report_bar_chart=Graphique \u221A\u2020 barres
 report_bar_graph_url=URL

Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/AsynchSampleSender.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/AsynchSampleSender.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/samplers/AsynchSampleSender.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/samplers/AsynchSampleSender.java Wed Dec  6 22:21:19 2017
@@ -146,7 +146,8 @@ public class AsynchSampleSender extends
                 while (!eof) {
                     List<SampleEvent> l = new ArrayList<>();
                     SampleEvent e = queue.take();
-                    while (!(eof = (e == FINAL_EVENT)) && e != null) { // try to process as many as possible
+                    // try to process as many as possible
+                    while (!(eof = FINAL_EVENT.equals(e)) && e != null) {
                         l.add(e);
                         e = queue.poll(); // returns null if nothing on queue currently
                     }

Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSenderFactory.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSenderFactory.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSenderFactory.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSenderFactory.java Wed Dec  6 22:21:19 2017
@@ -29,70 +29,62 @@ public class SampleSenderFactory {
     private static final Logger log = LoggerFactory.getLogger(SampleSenderFactory.class);
 
     private static final String MODE_STANDARD = "Standard"; // $NON-NLS-1$
-
     private static final String MODE_BATCH = "Batch"; // $NON-NLS-1$
-
     private static final String MODE_STATISTICAL = "Statistical"; // $NON-NLS-1$
-
     private static final String MODE_STRIPPED = "Stripped"; // $NON-NLS-1$
-
     private static final String MODE_STRIPPED_BATCH = "StrippedBatch"; // $NON-NLS-1$
-
     private static final String MODE_ASYNCH = "Asynch"; // $NON-NLS-1$
-
     private static final String MODE_STRIPPED_ASYNCH = "StrippedAsynch"; // $NON-NLS-1$
-
     private static final String MODE_DISKSTORE = "DiskStore"; // $NON-NLS-1$
-
     private static final String MODE_STRIPPED_DISKSTORE = "StrippedDiskStore"; // $NON-NLS-1$
 
     /**
      * Checks for the JMeter property mode and returns the required class.
      *
-     * @param listener
      * @return the appropriate class. Standard JMeter functionality,
-     *         hold_samples until end of test or batch samples.
+     * hold_samples until end of test or batch samples.
      */
     static SampleSender getInstance(RemoteSampleListener listener) {
         // Extended property name
         final String type = JMeterUtils.getPropDefault("mode", MODE_STRIPPED_BATCH); // $NON-NLS-1$
-        
+
+        SampleSender s;
         if (type.equalsIgnoreCase(MODE_BATCH)) {
-            return new BatchSampleSender(listener);
-        }  else if(type.equalsIgnoreCase(MODE_STRIPPED_BATCH)) {
-            return new DataStrippingSampleSender(new BatchSampleSender(listener));
+            s = new BatchSampleSender(listener);
+        } else if (type.equalsIgnoreCase(MODE_STRIPPED_BATCH)) {
+            s = new DataStrippingSampleSender(new BatchSampleSender(listener));
         } else if (type.equalsIgnoreCase(MODE_STATISTICAL)) {
-            return new StatisticalSampleSender(listener);
+            s = new StatisticalSampleSender(listener);
         } else if (type.equalsIgnoreCase(MODE_STANDARD)) {
-            return new StandardSampleSender(listener);
-        } else if(type.equalsIgnoreCase(MODE_STRIPPED)){
-            return new DataStrippingSampleSender(listener);
-        } else if(type.equalsIgnoreCase(MODE_ASYNCH)){
-            return new AsynchSampleSender(listener);
-        } else if(type.equalsIgnoreCase(MODE_STRIPPED_ASYNCH)) {
-            return new DataStrippingSampleSender(new AsynchSampleSender(listener));
-        } else if(type.equalsIgnoreCase(MODE_DISKSTORE)){
-            return new DiskStoreSampleSender(listener);
-        } else if(type.equalsIgnoreCase(MODE_STRIPPED_DISKSTORE)){
-            return new DataStrippingSampleSender(new DiskStoreSampleSender(listener));
+            s = new StandardSampleSender(listener);
+        } else if (type.equalsIgnoreCase(MODE_STRIPPED)) {
+            s = new DataStrippingSampleSender(listener);
+        } else if (type.equalsIgnoreCase(MODE_ASYNCH)) {
+            s = new AsynchSampleSender(listener);
+        } else if (type.equalsIgnoreCase(MODE_STRIPPED_ASYNCH)) {
+            s = new DataStrippingSampleSender(new AsynchSampleSender(listener));
+        } else if (type.equalsIgnoreCase(MODE_DISKSTORE)) {
+            s = new DiskStoreSampleSender(listener);
+        } else if (type.equalsIgnoreCase(MODE_STRIPPED_DISKSTORE)) {
+            s = new DataStrippingSampleSender(new DiskStoreSampleSender(listener));
         } else {
             // should be a user provided class name
-            SampleSender s = null;
             try {
                 Class<?> clazz = Class.forName(type);
-                Constructor<?> cons = clazz.getConstructor(new Class[] {RemoteSampleListener.class});
-                s = (SampleSender) cons.newInstance(new Object [] {listener});
+                Constructor<?> cons = clazz.getConstructor(RemoteSampleListener.class);
+                s = (SampleSender) cons.newInstance(new Object[]{listener});
             } catch (Exception e) {
                 // houston we have a problem !!
                 log.error(
-                        "Unable to create a sample sender from class:'{}', search for mode property in jmeter.properties for correct configuration options",
+                        "Unable to create a sample sender from class:'{}', search for "
+                                + "mode property in jmeter.properties for correct configuration options",
                         type);
                 throw new IllegalArgumentException("Unable to create a sample sender from mode or class:'"
-                        +type+"', search for mode property in jmeter.properties for correct configuration options, message:"+e.getMessage(), e);
+                        + type + "', search for mode property in jmeter.properties for correct configuration options, "
+                        + "message:" + e.getMessage(), e);
             }
 
-            return s;
         }
-
+        return s;
     }
 }

Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java Wed Dec  6 22:21:19 2017
@@ -215,7 +215,7 @@ public class StatisticalSampleSender ext
         if (log.isInfoEnabled()) {
             log.info(
                     "Using StatisticalSampleSender for this run. {} config: Thresholds: num={}, time={}. Key uses ThreadName: {}",
-                    (isClientConfigured() ? "Client" : "Server"), numSamplesThreshold, timeThresholdMs,
+                    isClientConfigured() ? "Client" : "Server", numSamplesThreshold, timeThresholdMs,
                     keyOnThreadName);
         }
         return this;

Modified: jmeter/trunk/src/core/org/apache/jmeter/save/CSVSaveService.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/save/CSVSaveService.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/save/CSVSaveService.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/save/CSVSaveService.java Wed Dec  6 22:21:19 2017
@@ -572,7 +572,7 @@ public final class CSVSaveService {
                 return null; // unknown column name
             }
             if (current <= previous) {
-                log.warn("Column header number {} name {} is out of order.", (i + 1), label);
+                log.warn("Column header number {} name {} is out of order.", i + 1, label);
                 return null; // out of order
             }
             previous = current;

Modified: jmeter/trunk/src/core/org/apache/jmeter/save/ScriptWrapperConverter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/save/ScriptWrapperConverter.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/save/ScriptWrapperConverter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/save/ScriptWrapperConverter.java Wed Dec  6 22:21:19 2017
@@ -22,17 +22,16 @@ import org.apache.jmeter.save.converters
 import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.collections.HashTree;
 
-import com.thoughtworks.xstream.mapper.Mapper;
 import com.thoughtworks.xstream.converters.ConversionException;
 import com.thoughtworks.xstream.converters.Converter;
 import com.thoughtworks.xstream.converters.MarshallingContext;
 import com.thoughtworks.xstream.converters.UnmarshallingContext;
 import com.thoughtworks.xstream.io.HierarchicalStreamReader;
 import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
+import com.thoughtworks.xstream.mapper.Mapper;
 
 /**
  * Handles XStream conversion of Test Scripts
- *
  */
 public class ScriptWrapperConverter implements Converter {
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/save/converters/HashTreeConverter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/save/converters/HashTreeConverter.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/save/converters/HashTreeConverter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/save/converters/HashTreeConverter.java Wed Dec  6 22:21:19 2017
@@ -20,12 +20,12 @@ package org.apache.jmeter.save.converter
 
 import org.apache.jorphan.collections.HashTree;
 
-import com.thoughtworks.xstream.mapper.Mapper;
 import com.thoughtworks.xstream.converters.MarshallingContext;
 import com.thoughtworks.xstream.converters.UnmarshallingContext;
 import com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter;
 import com.thoughtworks.xstream.io.HierarchicalStreamReader;
 import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
+import com.thoughtworks.xstream.mapper.Mapper;
 
 public class HashTreeConverter extends AbstractCollectionConverter {
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/save/converters/SampleSaveConfigurationConverter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/save/converters/SampleSaveConfigurationConverter.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/save/converters/SampleSaveConfigurationConverter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/save/converters/SampleSaveConfigurationConverter.java Wed Dec  6 22:21:19 2017
@@ -69,7 +69,7 @@ public class SampleSaveConfigurationConv
     private static final String NODE_PRINTMS = "printMilliseconds"; // $NON-NLS-1$
 
 
-    static class MyWrapper extends MapperWrapper{
+    static class MyWrapper extends MapperWrapper {
 
         public MyWrapper(Mapper wrapped) {
             super(wrapped);
@@ -79,25 +79,29 @@ public class SampleSaveConfigurationConv
         @Override
         public boolean shouldSerializeMember(
                 @SuppressWarnings("rawtypes") // superclass does not use types
-                Class definedIn, 
-                String fieldName) {
-            if (SampleSaveConfiguration.class != definedIn) { return true; }
+                Class definedIn, String fieldName) {
+            if (SampleSaveConfiguration.class != definedIn) {
+                return true;
+            }
             // These are new fields; not saved unless true
             // This list MUST agree with the list in the marshall() method below
-            if (fieldName.equals(NODE_BYTES)) { return false; }
-            if (fieldName.equals(NODE_SENT_BYTES)) { return false; }
-            if (fieldName.equals(NODE_URL)) { return false; }
-            if (fieldName.equals(NODE_FILENAME)) { return false; }
-            if (fieldName.equals(NODE_HOSTNAME)) { return false; }
-            if (fieldName.equals(NODE_THREAD_COUNT)) { return false; }
-            if (fieldName.equals(NODE_SAMPLE_COUNT)) { return false; }
-            if (fieldName.equals(NODE_IDLE_TIME)) { return false; }
-            if (fieldName.equals(NODE_CONNECT_TIME)) { return false; }
-
-            // These fields are not currently saved or restored
-            if (fieldName.equals(NODE_DELIMITER)) { return false; }
-            if (fieldName.equals(NODE_PRINTMS)) { return false; }
-            return true;
+            switch (fieldName) {
+                case NODE_BYTES:
+                case NODE_SENT_BYTES:
+                case NODE_URL:
+                case NODE_FILENAME:
+                case NODE_HOSTNAME:
+                case NODE_THREAD_COUNT:
+                case NODE_SAMPLE_COUNT:
+                case NODE_IDLE_TIME:
+                case NODE_CONNECT_TIME:
+                // The two fields below are not currently saved or restored
+                case NODE_DELIMITER:
+                case NODE_PRINTMS:
+                    return false;
+                default:
+                    return true;
+            }
         }
     }
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/GenericTestBeanCustomizer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/GenericTestBeanCustomizer.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/GenericTestBeanCustomizer.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/GenericTestBeanCustomizer.java Wed Dec  6 22:21:19 2017
@@ -685,7 +685,8 @@ public class GenericTestBeanCustomizer e
         public int compare(PropertyDescriptor d1, PropertyDescriptor d2) {
             String g1 = group(d1);
             String g2 = group(d2);
-            Integer go1 = groupOrder(g1), go2 = groupOrder(g2);
+            Integer go1 = groupOrder(g1);
+            Integer go2 = groupOrder(g2);
 
             int result = go1.compareTo(go2);
             if (result != 0) {

Modified: jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TableEditor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TableEditor.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TableEditor.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TableEditor.java Wed Dec  6 22:21:19 2017
@@ -28,10 +28,11 @@ import java.awt.event.FocusListener;
 import java.beans.PropertyDescriptor;
 import java.beans.PropertyEditorSupport;
 import java.lang.reflect.Method;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.LinkedList;
 import java.util.List;
-import java.util.Locale;
+import java.util.stream.Collectors;
 
 import javax.swing.CellEditor;
 import javax.swing.JButton;
@@ -43,6 +44,7 @@ import javax.swing.ListSelectionModel;
 import javax.swing.event.TableModelEvent;
 import javax.swing.event.TableModelListener;
 
+import org.apache.commons.lang3.StringUtils;
 import org.apache.jmeter.gui.ClearGui;
 import org.apache.jmeter.testelement.property.TestElementProperty;
 import org.apache.jmeter.util.JMeterUtils;
@@ -215,28 +217,22 @@ public class TableEditor extends Propert
     {
         Object hdrs = descriptor.getValue(HEADERS);
         if (!(hdrs instanceof String[])) {
-            throw new RuntimeException("attribute HEADERS must be a String array");            
+            throw new RuntimeException("attribute HEADERS must be a String array");
         }
-        if(clazz == String.class) {
-            model = new ObjectTableModel((String[])hdrs,new Functor[0],new Functor[0],new Class[]{String.class});
+        if (clazz == String.class) {
+            model = new ObjectTableModel((String[]) hdrs, new Functor[0], new Functor[0], new Class[]{String.class});
         } else {
             Object value = descriptor.getValue(OBJECT_PROPERTIES);
             if (!(value instanceof String[])) {
                 throw new RuntimeException("attribute OBJECT_PROPERTIES must be a String array");
             }
-            String[] props = (String[])value;
-            Functor[] writers = new Functor[props.length];
-            Functor[] readers = new Functor[props.length];
-            Class<?>[] editors = new Class[props.length];
-            int count = 0;
-            for(String propName : props) {
-                propName = propName.substring(0,1).toUpperCase(Locale.ENGLISH) + propName.substring(1);
-                writers[count] = createWriter(clazz,propName);
-                readers[count] = createReader(clazz,propName);
-                editors[count] = getArgForWriter(clazz,propName);
-                count++;
-            }
-            model = new ObjectTableModel((String[])hdrs,readers,writers,editors);
+            List<String> props = Arrays.stream((String[]) value)
+                    .map(StringUtils::capitalize)
+                    .collect(Collectors.toList());
+            Functor[] writers = createWriters(props);
+            Functor[] readers = createReaders(clazz, props);
+            Class<?>[] editors = getArgsForWriter(clazz, props);
+            model = new ObjectTableModel((String[]) hdrs, readers, writers, editors);
         }
         model.addTableModelListener(this);
         table = new JTable(model);
@@ -245,29 +241,31 @@ public class TableEditor extends Propert
         table.addFocusListener(this);
     }
 
-    Functor createWriter(Class<?> c,String propName) {
-        String setter = "set" + propName; // $NON-NLS-1$
-        return new Functor(setter);
-    }
-
-    Functor createReader(Class<?> c,String propName) {
-        String getter = "get" + propName; // $NON-NLS-1$
-        try {
-            c.getMethod(getter,new Class[0]);
-            return new Functor(getter);
-        } catch(Exception e) {
-            return new Functor("is" + propName);
-        }
-    }
-
-    Class<?> getArgForWriter(Class<?> c,String propName) {
-        String setter = "set" + propName; // $NON-NLS-1$
-        for(Method m : c.getMethods()) {
-            if(m.getName().equals(setter)) {
-                return m.getParameterTypes()[0];
-            }
-        }
-        return null;
+    private Functor[] createWriters(List<String> propNames) {
+        return propNames.stream()
+                .map(propName -> "set" + propName) // $NON-NLS-1$
+                .map(Functor::new)
+                .toArray(Functor[]::new);
+    }
+
+    private Functor[] createReaders(Class<?> c, List<String> propNames) {
+        List<String> methodNames = Arrays.stream(c.getMethods())
+                .map(Method::getName)
+                .collect(Collectors.toList());
+        return propNames.stream()
+                .map(name -> methodNames.contains("get" + name) ? "get" + name : "is" + name)
+                .map(Functor::new)
+                .toArray(Functor[]::new);
+    }
+
+    private Class<?>[] getArgsForWriter(Class<?> c, List<String> propNames) {
+        return propNames.stream()
+                .map(propName -> Arrays.stream(c.getMethods())
+                        .filter(m -> m.getName().equals("set" + propName)) // $NON-NLS-1$
+                        .map(m -> m.getParameterTypes()[0])
+                        .findFirst()
+                        .orElse(null))
+                .toArray(Class<?>[]::new);
     }
 
     @Override
@@ -277,7 +275,6 @@ public class TableEditor extends Propert
 
     @Override
     public void focusGained(FocusEvent e) {
-
     }
 
     @Override

Modified: jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TypeEditor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TypeEditor.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TypeEditor.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TypeEditor.java Wed Dec  6 22:21:19 2017
@@ -30,7 +30,8 @@ public enum TypeEditor {
     TableEditor    {@Override PropertyEditor getInstance(PropertyDescriptor descriptor) { return new TableEditor(); }}, // NOSONAR Keep naming for compatibility
     TextAreaEditor {@Override PropertyEditor getInstance(PropertyDescriptor descriptor) { return new TextAreaEditor(descriptor); }}, // NOSONAR Keep naming for compatibility
     ComboStringEditor {@Override PropertyEditor getInstance(PropertyDescriptor descriptor) { return new ComboStringEditor(descriptor); }}, // NOSONAR Keep naming for compatibility
-    ;
+    ; // CHECKSTYLE IGNORE OneStatementPerLine
+
     // Some editors may need the descriptor
     abstract PropertyEditor getInstance(PropertyDescriptor descriptor);
 }

Modified: jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/WrapperEditor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/WrapperEditor.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/WrapperEditor.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/WrapperEditor.java Wed Dec  6 22:21:19 2017
@@ -225,7 +225,7 @@ class WrapperEditor extends PropertyEdit
      * @throws Error
      *             always throws an error.
      */
-    private void shouldNeverHappen(String msg) throws Error {
+    private void shouldNeverHappen(String msg) {
         throw new Error(msg); // Programming error: bail out.
     }
 
@@ -237,7 +237,7 @@ class WrapperEditor extends PropertyEdit
      * @throws Error
      *             always throws one.
      */
-    private void shouldNeverHappen(Exception e) throws Error {
+    private void shouldNeverHappen(Exception e) {
         throw new Error(e.toString()); // Programming error: bail out.
     }
 
@@ -440,10 +440,11 @@ class WrapperEditor extends PropertyEdit
             if (GuiPackage.getInstance() == null){
                 log.warn("Invalid value: {} {}", text, typeEditor);
             } else {
-                JOptionPane.showMessageDialog(guiEditor.getCustomEditor().getParent(),
-                   JMeterUtils.getResString("property_editor.value_is_invalid_message"),//$NON-NLS-1$
-                    JMeterUtils.getResString("property_editor.value_is_invalid_title"),  //$NON-NLS-1$
-                    JOptionPane.WARNING_MESSAGE);
+                JOptionPane.showMessageDialog(
+                        guiEditor.getCustomEditor().getParent(),
+                        JMeterUtils.getResString("property_editor.value_is_invalid_message"),//$NON-NLS-1$
+                        JMeterUtils.getResString("property_editor.value_is_invalid_title"),  //$NON-NLS-1$
+                        JOptionPane.WARNING_MESSAGE);
             }
             // Revert to the previous value:
             guiEditor.setAsText(lastValidValue);

Modified: jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java Wed Dec  6 22:21:19 2017
@@ -47,11 +47,7 @@ public abstract class AbstractProperty i
     }
 
     protected boolean isEqualType(JMeterProperty prop) {
-        if (this.getClass().equals(prop.getClass())) {
-            return true;
-        } else {
-            return false;
-        }
+        return this.getClass().equals(prop.getClass());
     }
 
     /** {@inheritDoc} */

Modified: jmeter/trunk/src/core/org/apache/jmeter/testelement/property/NumberProperty.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/NumberProperty.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/testelement/property/NumberProperty.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/testelement/property/NumberProperty.java Wed Dec  6 22:21:19 2017
@@ -57,7 +57,7 @@ public abstract class NumberProperty ext
         } else {
             try {
                 setNumberValue(v.toString());
-            } catch (RuntimeException e) {
+            } catch (RuntimeException ignored) {
             }
         }
     }

Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterVariables.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterVariables.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterVariables.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterVariables.java Wed Dec  6 22:21:19 2017
@@ -22,8 +22,8 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
-import java.util.Set;
 import java.util.Map.Entry;
+import java.util.Set;
 
 import org.apache.jmeter.util.JMeterUtils;
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellBeanInfoSupport.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellBeanInfoSupport.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellBeanInfoSupport.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellBeanInfoSupport.java Wed Dec  6 22:21:19 2017
@@ -22,8 +22,8 @@ import java.beans.PropertyDescriptor;
 
 import org.apache.jmeter.testbeans.BeanInfoSupport;
 import org.apache.jmeter.testbeans.TestBean;
-import org.apache.jmeter.testbeans.gui.TextAreaEditor;
 import org.apache.jmeter.testbeans.gui.FileEditor;
+import org.apache.jmeter.testbeans.gui.TextAreaEditor;
 
 /**
  * Parent class to handle common GUI design

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/Calculator.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/Calculator.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/Calculator.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/Calculator.java Wed Dec  6 22:21:19 2017
@@ -96,7 +96,7 @@ public class Calculator {
             maximum=Math.max(newValue/sampleCount, maximum);
             // For n values in an aggregate sample the average value = (val/n)
             // So need to add n * (val/n) * (val/n) = val * val / n
-            sumOfSquares += (currentVal * currentVal) / (sampleCount);
+            sumOfSquares += (currentVal * currentVal) / sampleCount;
         } else { // no point dividing by 1
             minimum=Math.min(newValue, minimum);
             maximum=Math.max(newValue, maximum);

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/CustomX509TrustManager.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/CustomX509TrustManager.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/CustomX509TrustManager.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/CustomX509TrustManager.java Wed Dec  6 22:21:19 2017
@@ -52,7 +52,7 @@ public class CustomX509TrustManager impl
      * @see javax.net.ssl.X509TrustManager#checkClientTrusted(X509Certificate[],String)
      */
     @Override
-    public void checkClientTrusted(X509Certificate[] certificates, String authType) throws CertificateException {
+    public void checkClientTrusted(X509Certificate[] certificates, String authType) {
         if (log.isDebugEnabled() && certificates != null) {
             for (int i = 0; i < certificates.length; i++) {
                 X509Certificate cert = certificates[i];
@@ -63,7 +63,7 @@ public class CustomX509TrustManager impl
                         + "  Valid from: {}\n"
                         + "  Valid until: {}\n"
                         + "  Issuer: {}",
-                        (i + 1),
+                        i + 1,
                         cert.getSubjectDN(),
                         cert.getSigAlgName(),
                         cert.getNotBefore(),
@@ -88,7 +88,7 @@ public class CustomX509TrustManager impl
                         + "  Valid from: {}\n"
                         + "  Valid until: {}\n"
                         + "  Issuer: {}",
-                        (i + 1),
+                        i + 1,
                         cert.getSubjectDN(),
                         cert.getSigAlgName(),
                         cert.getNotBefore(),

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/HostNameSetter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/HostNameSetter.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/HostNameSetter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/HostNameSetter.java Wed Dec  6 22:21:19 2017
@@ -54,8 +54,6 @@ public class HostNameSetter {
         return s;
     }
     
-
-
     private static void initFail(Exception e) {
         // ignore
     }

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java Wed Dec  6 22:21:19 2017
@@ -200,13 +200,14 @@ public class JMeterUtils implements Unit
             p.load(is);
         } catch (IOException e) {
             try {
-                is =
-                    ClassLoader.getSystemResourceAsStream("org/apache/jmeter/jmeter.properties"); // $NON-NLS-1$
+                is = ClassLoader.getSystemResourceAsStream(
+                        "org/apache/jmeter/jmeter.properties"); // $NON-NLS-1$
                 if (is == null) {
-                    throw new RuntimeException("Could not read JMeter properties file:"+file);
+                    throw new RuntimeException("Could not read JMeter properties file:" + file);
                 }
                 p.load(is);
             } catch (IOException ex) {
+                throw new RuntimeException("Could not read JMeter properties file:" + file);
             }
         } finally {
             JOrphanUtils.closeQuietly(is);
@@ -388,12 +389,13 @@ public class JMeterUtils implements Unit
             resources = resBund;
             locale = loc;
             final Locale resBundLocale = resBund.getLocale();
-            if (isDefault || resBundLocale.equals(loc)) {// language change worked
-            // Check if we at least found the correct language:
-            } else if (resBundLocale.getLanguage().equals(loc.getLanguage())) {
-                log.info("Could not find resources for '"+loc.toString()+"', using '"+resBundLocale.toString()+"'");
-            } else {
-                log.error("Could not find resources for '"+loc.toString()+"'");
+            if (!isDefault && !resBundLocale.equals(loc)) {
+                // Check if we at least found the correct language:
+                if (resBundLocale.getLanguage().equals(loc.getLanguage())) {
+                    log.info("Could not find resources for '{}', using '{}'", loc.toString(), resBundLocale.toString());
+                } else {
+                    log.error("Could not find resources for '{}'", loc.toString());
+                }
             }
         }
         notifyLocaleChangeListeners();

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/JSR223BeanInfoSupport.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/JSR223BeanInfoSupport.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/JSR223BeanInfoSupport.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/JSR223BeanInfoSupport.java Wed Dec  6 22:21:19 2017
@@ -26,6 +26,7 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.ResourceBundle;
+
 import javax.script.ScriptEngineFactory;
 import javax.script.ScriptEngineManager;
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/JsseSSLManager.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/JsseSSLManager.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/JsseSSLManager.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/JsseSSLManager.java Wed Dec  6 22:21:19 2017
@@ -71,7 +71,7 @@ public class JsseSSLManager extends SSLM
     static {
         if (log.isInfoEnabled()) {
             log.info("Using default SSL protocol: {}", DEFAULT_SSL_PROTOCOL);
-            log.info("SSL session context: {}", (SHARED_SESSION_CONTEXT ? "shared" : "per-thread"));
+            log.info("SSL session context: {}", SHARED_SESSION_CONTEXT ? "shared" : "per-thread");
 
             if (CPS > 0) {
                 log.info("Setting up HTTPS SlowProtocol, cps={}", CPS);
@@ -128,11 +128,10 @@ public class JsseSSLManager extends SSLM
      */
     @Override
     public void setContext(HttpURLConnection conn) {
-        if (conn instanceof HttpsURLConnection) {
-             // No point doing this on a per-connection basis,
-             // as there is currently no way to configure it.
-             // So we leave it to the defaults set up in the SSL Context
-        } else {
+        // No point doing this on a per-connection basis,
+        // as there is currently no way to configure it.
+        // So we leave it to the defaults set up in the SSL Context
+        if (!(conn instanceof HttpsURLConnection)) {
             if (log.isWarnEnabled()) {
                 log.warn("Unexpected HttpURLConnection class: {}", conn.getClass().getName());
             }

Modified: jmeter/trunk/src/examples/org/apache/jmeter/examples/sampler/gui/ExampleSamplerGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/examples/org/apache/jmeter/examples/sampler/gui/ExampleSamplerGui.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/examples/org/apache/jmeter/examples/sampler/gui/ExampleSamplerGui.java (original)
+++ jmeter/trunk/src/examples/org/apache/jmeter/examples/sampler/gui/ExampleSamplerGui.java Wed Dec  6 22:21:19 2017
@@ -28,6 +28,7 @@ import java.awt.Component;
 import javax.swing.JLabel;
 import javax.swing.JPanel;
 import javax.swing.JTextArea;
+
 import org.apache.jmeter.examples.sampler.ExampleSampler;
 import org.apache.jmeter.samplers.gui.AbstractSamplerGui;
 import org.apache.jmeter.testelement.TestElement;
@@ -41,7 +42,6 @@ import org.apache.jmeter.util.JMeterUtil
  *
  * The GUI class is not invoked in non-GUI mode, so it should not perform any
  * additional setup that a test would need at run-time
- *
  */
 public class ExampleSamplerGui extends AbstractSamplerGui {
 

Modified: jmeter/trunk/src/examples/org/apache/jmeter/examples/testbeans/example3/Example3.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/examples/org/apache/jmeter/examples/testbeans/example3/Example3.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/examples/org/apache/jmeter/examples/testbeans/example3/Example3.java (original)
+++ jmeter/trunk/src/examples/org/apache/jmeter/examples/testbeans/example3/Example3.java Wed Dec  6 22:21:19 2017
@@ -34,12 +34,16 @@ public class Example3 extends AbstractSa
     private static final long serialVersionUID = 240L;
 
     private boolean mybool;
-    private Boolean myBoolean1, myBoolean2;
+    private Boolean myBoolean1;
+    private Boolean myBoolean2;
     private int myInt;
-    private Integer myInteger1, myInteger2;
+    private Integer myInteger1;
+    private Integer myInteger2;
     private long mylong;
-    private Long myLong1, myLong2;
-    private String myString1, myString2;
+    private Long myLong1;
+    private Long myLong2;
+    private String myString1;
+    private String myString2;
     private File myFile1;
     private String myFile2;
 
@@ -137,19 +141,15 @@ public class Example3 extends AbstractSa
     public void setMyString2(String myString2) {
         this.myString2 = myString2;
     }
-
     public File getMyFile1() {
         return myFile1;
     }
-
     public void setMyFile1(File myFile) {
         this.myFile1 = myFile;
     }
-
     public String getMyFile2() {
         return myFile2;
     }
-
     public void setMyFile2(String myFile) {
         this.myFile2 = myFile;
     }

Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/DigestEncodeFunction.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org/apache/jmeter/functions/DigestEncodeFunction.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/DigestEncodeFunction.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/DigestEncodeFunction.java Wed Dec  6 22:21:19 2017
@@ -18,25 +18,22 @@
 
 package org.apache.jmeter.functions;
 
+import java.io.UnsupportedEncodingException;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
 import org.apache.commons.codec.binary.Hex;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.jmeter.engine.util.CompoundVariable;
-import org.apache.jmeter.functions.AbstractFunction;
-import org.apache.jmeter.functions.InvalidVariableException;
 import org.apache.jmeter.samplers.SampleResult;
 import org.apache.jmeter.samplers.Sampler;
 import org.apache.jmeter.util.JMeterUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.UnsupportedEncodingException;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-
 /**
  * Digest Encode Function that provides computing of different SHA-XXX, can
  * uppercase the result and store it in a variable.

Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/JavaScript.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org/apache/jmeter/functions/JavaScript.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/JavaScript.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/JavaScript.java Wed Dec  6 22:21:19 2017
@@ -35,11 +35,11 @@ import org.apache.jmeter.threads.JMeterC
 import org.apache.jmeter.threads.JMeterContextService;
 import org.apache.jmeter.threads.JMeterVariables;
 import org.apache.jmeter.util.JMeterUtils;
-import org.slf4j.LoggerFactory;
-import org.slf4j.Logger;
 import org.mozilla.javascript.Context;
 import org.mozilla.javascript.RhinoException;
 import org.mozilla.javascript.Scriptable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * javaScript function implementation that executes a piece of JavaScript (not Java!) code and returns its value

Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/Jexl2Function.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org/apache/jmeter/functions/Jexl2Function.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/Jexl2Function.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/Jexl2Function.java Wed Dec  6 22:21:19 2017
@@ -32,8 +32,8 @@ import org.apache.jmeter.threads.JMeterC
 import org.apache.jmeter.threads.JMeterContextService;
 import org.apache.jmeter.threads.JMeterVariables;
 import org.apache.jmeter.util.JMeterUtils;
-import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * A function which understands Commons JEXL2

Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction.java Wed Dec  6 22:21:19 2017
@@ -161,21 +161,23 @@ public class LogFunction extends Abstrac
             final String separator = (comment.isEmpty()) ? DEFAULT_SEPARATOR : comment;
 
             switch (prioLevel) {
-            case ERROR:
-                logger.error("{} {} {}", threadName, separator, stringToLog, throwable);
-                break;
-            case WARN:
-                logger.warn("{} {} {}", threadName, separator, stringToLog, throwable);
-                break;
-            case INFO:
-                logger.info("{} {} {}", threadName, separator, stringToLog, throwable);
-                break;
-            case DEBUG:
-                logger.debug("{} {} {}", threadName, separator, stringToLog, throwable);
-                break;
-            case TRACE:
-                logger.trace("{} {} {}", threadName, separator, stringToLog, throwable);
-                break;
+                case ERROR:
+                    logger.error("{} {} {}", threadName, separator, stringToLog, throwable);
+                    break;
+                case WARN:
+                    logger.warn("{} {} {}", threadName, separator, stringToLog, throwable);
+                    break;
+                case INFO:
+                    logger.info("{} {} {}", threadName, separator, stringToLog, throwable);
+                    break;
+                case DEBUG:
+                    logger.debug("{} {} {}", threadName, separator, stringToLog, throwable);
+                    break;
+                case TRACE:
+                    logger.trace("{} {} {}", threadName, separator, stringToLog, throwable);
+                    break;
+                default:
+                    throw new IllegalStateException("Invalid log level");
             }
         }
     }

Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/SplitFunction.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org/apache/jmeter/functions/SplitFunction.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/SplitFunction.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/SplitFunction.java Wed Dec  6 22:21:19 2017
@@ -28,9 +28,9 @@ import org.apache.jmeter.samplers.Sample
 import org.apache.jmeter.samplers.Sampler;
 import org.apache.jmeter.threads.JMeterVariables;
 import org.apache.jmeter.util.JMeterUtils;
-import org.slf4j.LoggerFactory;
 import org.apache.jorphan.util.JOrphanUtils;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 // @see org.apache.jmeter.functions.PackageTest for unit tests
 

Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/StringFromFile.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org/apache/jmeter/functions/StringFromFile.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/StringFromFile.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/StringFromFile.java Wed Dec  6 22:21:19 2017
@@ -33,9 +33,9 @@ import org.apache.jmeter.samplers.Sample
 import org.apache.jmeter.testelement.TestStateListener;
 import org.apache.jmeter.threads.JMeterVariables;
 import org.apache.jmeter.util.JMeterUtils;
-import org.slf4j.LoggerFactory;
 import org.apache.jorphan.util.JMeterStopThreadException;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * <p>StringFromFile Function to read a String from a text file.</p>

Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/Uuid.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org/apache/jmeter/functions/Uuid.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/Uuid.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/Uuid.java Wed Dec  6 22:21:19 2017
@@ -18,15 +18,15 @@
 
 package org.apache.jmeter.functions;
 
-import org.apache.jmeter.engine.util.CompoundVariable;
-import org.apache.jmeter.samplers.SampleResult;
-import org.apache.jmeter.samplers.Sampler;
-
 import java.util.Collection;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.UUID;
 
+import org.apache.jmeter.engine.util.CompoundVariable;
+import org.apache.jmeter.samplers.SampleResult;
+import org.apache.jmeter.samplers.Sampler;
+
 /**
  * Function to create a UUID
  *

Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/XPath.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org/apache/jmeter/functions/XPath.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/XPath.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/XPath.java Wed Dec  6 22:21:19 2017
@@ -27,8 +27,8 @@ import org.apache.jmeter.engine.util.Com
 import org.apache.jmeter.samplers.SampleResult;
 import org.apache.jmeter.samplers.Sampler;
 import org.apache.jmeter.util.JMeterUtils;
-import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 // @see org.apache.jmeter.functions.PackageTest for unit tests
 

Modified: jmeter/trunk/src/jorphan/org/apache/jorphan/collections/Data.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/jorphan/org/apache/jorphan/collections/Data.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/jorphan/org/apache/jorphan/collections/Data.java (original)
+++ jmeter/trunk/src/jorphan/org/apache/jorphan/collections/Data.java Wed Dec  6 22:21:19 2017
@@ -25,9 +25,9 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
-import org.slf4j.LoggerFactory;
 import org.apache.jorphan.util.JOrphanUtils;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Use this class to store database-like data. This class uses rows and columns

Modified: jmeter/trunk/src/jorphan/org/apache/jorphan/gui/MenuScroller.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/MenuScroller.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/jorphan/org/apache/jorphan/gui/MenuScroller.java (original)
+++ jmeter/trunk/src/jorphan/org/apache/jorphan/gui/MenuScroller.java Wed Dec  6 22:21:19 2017
@@ -447,7 +447,7 @@ public class MenuScroller {
         if (firstIndex <= topFixedCount) {
             firstIndex = topFixedCount;
         } else {
-            firstIndex += (topFixedCount - this.topFixedCount);
+            firstIndex = firstIndex + topFixedCount - this.topFixedCount;
         }
         this.topFixedCount = topFixedCount;
     }
@@ -519,13 +519,12 @@ public class MenuScroller {
      * Ensures that the <code>dispose</code> method of this MenuScroller is
      * called when there are no more references to it.
      * 
-     * @exception Throwable
-     *                if an error occurs.
      * @see MenuScroller#dispose()
      */
     @Override
     public void finalize() throws Throwable {
         dispose();
+        super.finalize();
     }
 
     private void refreshMenu() {

Modified: jmeter/trunk/src/jorphan/org/apache/jorphan/gui/ObjectTableModel.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/ObjectTableModel.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/jorphan/org/apache/jorphan/gui/ObjectTableModel.java (original)
+++ jmeter/trunk/src/jorphan/org/apache/jorphan/gui/ObjectTableModel.java Wed Dec  6 22:21:19 2017
@@ -25,9 +25,9 @@ import java.util.List;
 
 import javax.swing.table.DefaultTableModel;
 
-import org.slf4j.LoggerFactory;
 import org.apache.jorphan.reflect.Functor;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The ObjectTableModel is a TableModel whose rows are objects;

Modified: jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java (original)
+++ jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java Wed Dec  6 22:21:19 2017
@@ -21,8 +21,8 @@ package org.apache.jorphan.math;
 import java.util.ConcurrentModificationException;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.TreeMap;
 import java.util.Map.Entry;
+import java.util.TreeMap;
 
 import org.apache.commons.lang3.mutable.MutableLong;
 

Modified: jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/Functor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/Functor.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/Functor.java (original)
+++ jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/Functor.java Wed Dec  6 22:21:19 2017
@@ -448,27 +448,29 @@ public class Functor {
     }
 
     private Class<?> getPrimitive(Class<?> t) {
-        if (t==null) {
+        if (t == null) {
             return null;
         }
-        if (t.equals(Integer.class)) {
-            return int.class;
+
+        Class<?> c = null;
+         if (t.equals(Integer.class)) {
+            c = int.class;
         } else if (t.equals(Long.class)) {
-            return long.class;
+            c = long.class;
         } else if (t.equals(Double.class)) {
-            return double.class;
+            c = double.class;
         } else if (t.equals(Float.class)) {
-            return float.class;
+            c = float.class;
         } else if (t.equals(Byte.class)) {
-            return byte.class;
+            c = byte.class;
         } else if (t.equals(Boolean.class)) {
-            return boolean.class;
+            c = boolean.class;
         } else if (t.equals(Short.class)) {
-            return short.class;
+            c = short.class;
         } else if (t.equals(Character.class)) {
-            return char.class;
+            c = char.class;
         }
-        return null;
+        return c;
     }
 
     private Class<?>[] getNewArray(int i, Class<?> replacement, Class<?>[] orig) {
@@ -484,8 +486,7 @@ public class Functor {
     }
 
     private Class<?>[] getTypes(Object[] _args) {
-        if (types == null)
-        {
+        if (types == null) {
             return _getTypes(_args);
         }
         return types;

Modified: jmeter/trunk/src/jorphan/org/apache/jorphan/util/Converter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/jorphan/org/apache/jorphan/util/Converter.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/jorphan/org/apache/jorphan/util/Converter.java (original)
+++ jmeter/trunk/src/jorphan/org/apache/jorphan/util/Converter.java Wed Dec  6 22:21:19 2017
@@ -24,7 +24,9 @@ import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.GregorianCalendar;
+import java.util.Optional;
 import java.util.StringTokenizer;
+import java.util.stream.Stream;
 
 /**
  * Converter utilities for TestBeans
@@ -34,46 +36,43 @@ public class Converter {
     /**
      * Convert the given value object to an object of the given type
      *
-     * @param value
-     *            object to convert
-     * @param toType
-     *            type to convert object to
-     * @return converted object or original value if no conversion could be
-     *         applied
+     * @param value  object to convert
+     * @param toType type to convert object to
+     * @return converted object or original value if no conversion could be applied
      */
     public static Object convert(Object value, Class<?> toType) {
-        if (value == null) {
-            value = ""; // TODO should we allow null for non-primitive types?
+        Object convertedValue = value;
+        if (value == null || toType == null) {
+            convertedValue = ""; // TODO should we allow null for non-primitive types?
         } else if (toType.isAssignableFrom(value.getClass())) {
-            return value;
+            convertedValue = value;
         } else if (toType.equals(float.class) || toType.equals(Float.class)) {
-            return Float.valueOf(getFloat(value));
+            convertedValue = Float.valueOf(getFloat(value));
         } else if (toType.equals(double.class) || toType.equals(Double.class)) {
-            return Double.valueOf(getDouble(value));
+            convertedValue = Double.valueOf(getDouble(value));
         } else if (toType.equals(String.class)) {
-            return getString(value);
+            convertedValue = getString(value);
         } else if (toType.equals(int.class) || toType.equals(Integer.class)) {
-            return Integer.valueOf(getInt(value));
+            convertedValue = Integer.valueOf(getInt(value));
         } else if (toType.equals(char.class) || toType.equals(Character.class)) {
-            return Character.valueOf(getChar(value));
+            convertedValue = Character.valueOf(getChar(value));
         } else if (toType.equals(long.class) || toType.equals(Long.class)) {
-            return Long.valueOf(getLong(value));
+            convertedValue = Long.valueOf(getLong(value));
         } else if (toType.equals(boolean.class) || toType.equals(Boolean.class)) {
-            return  Boolean.valueOf(getBoolean(value));
+            convertedValue = Boolean.valueOf(getBoolean(value));
         } else if (toType.equals(java.util.Date.class)) {
-            return getDate(value);
+            convertedValue = getDate(value);
         } else if (toType.equals(Calendar.class)) {
-            return getCalendar(value);
+            convertedValue = getCalendar(value);
         } else if (toType.equals(File.class)) {
-            return getFile(value);
+            convertedValue = getFile(value);
         } else if (toType.equals(Class.class)) {
             try {
-                return Class.forName(value.toString());
-            } catch (Exception e) {
-                // don't do anything
+                convertedValue = Class.forName(value.toString());
+            } catch (Exception ignored) {
             }
         }
-        return value;
+        return convertedValue;
     }
 
     /**
@@ -94,29 +93,11 @@ public class Converter {
             cal.setTime((java.util.Date) date);
             return cal;
         } else if (date != null) {
-            DateFormat formatter = DateFormat.getDateInstance(DateFormat.SHORT);
-            java.util.Date d = null;
-            try {
-                d = formatter.parse(date.toString());
-            } catch (ParseException e) {
-                formatter = DateFormat.getDateInstance(DateFormat.MEDIUM);
-                try {
-                    d = formatter.parse((String) date);
-                } catch (ParseException e1) {
-                    formatter = DateFormat.getDateInstance(DateFormat.LONG);
-                    try {
-                        d = formatter.parse((String) date);
-                    } catch (ParseException e2) {
-                        formatter = DateFormat.getDateInstance(DateFormat.FULL);
-                        try {
-                            d = formatter.parse((String) date);
-                        } catch (ParseException e3) {
-                            return defaultValue;
-                        }
-                    }
-                }
+            Optional<Date> d = tryToParseDate(date);
+            if (!d.isPresent()) {
+                return defaultValue;
             }
-            cal.setTime(d);
+            cal.setTime(d.get());
         } else {
             cal = defaultValue;
         }
@@ -163,56 +144,47 @@ public class Converter {
      *         <code>defaultValue</code> if conversion failed
      */
     public static Date getDate(Object date, Date defaultValue) {
-        Date val = null;
         if (date instanceof java.util.Date) {
             return (Date) date;
         } else if (date != null) {
-            DateFormat formatter = DateFormat.getDateInstance(DateFormat.SHORT);
-            try {
-                val = formatter.parse(date.toString());
-            } catch (ParseException e) {
-                formatter = DateFormat.getDateInstance(DateFormat.MEDIUM);
-                try {
-                    val = formatter.parse((String) date);
-                } catch (ParseException e1) {
-                    formatter = DateFormat.getDateInstance(DateFormat.LONG);
-                    try {
-                        val = formatter.parse((String) date);
-                    } catch (ParseException e2) {
-                        formatter = DateFormat.getDateInstance(DateFormat.FULL);
-                        try {
-                            val = formatter.parse((String) date);
-                        } catch (ParseException e3) {
-                            return defaultValue;
-                        }
-                    }
-                }
-            }
+            return tryToParseDate(date).orElse(defaultValue);
         } else {
             return defaultValue;
         }
-        return val;
+    }
+
+    private static Optional<Date> tryToParseDate(Object date) {
+        return Stream.of(DateFormat.SHORT, DateFormat.MEDIUM, DateFormat.LONG, DateFormat.FULL)
+                .map(DateFormat::getDateInstance)
+                .map(formatter -> tryToParseDate(formatter, date.toString()))
+                .filter(Optional::isPresent)
+                .map(Optional::get)
+                .findFirst();
+    }
+
+    private static Optional<Date> tryToParseDate(DateFormat formatter, String dateString) {
+        try {
+            return Optional.of(formatter.parse(dateString));
+        } catch (ParseException e) {
+            return Optional.empty();
+        }
     }
 
     /**
-     * Convert object to float, or <code>defaultValue</code> if conversion
-     * failed
-     * 
-     * @param o
-     *            object to convert
-     * @param defaultValue
-     *            default value to use, when conversion failed
-     * @return converted float or <code>defaultValue</code> if conversion
-     *         failed
+     * Convert object to float, or <code>defaultValue</code> if conversion failed
+     *
+     * @param o object to convert
+     * @param defaultValue default value to use, when conversion failed
+     * @return converted float or <code>defaultValue</code> if conversion failed
      */
     public static float getFloat(Object o, float defaultValue) {
+        if (o == null) {
+            return defaultValue;
+        }
+        if (o instanceof Number) {
+            return ((Number) o).floatValue();
+        }
         try {
-            if (o == null) {
-                return defaultValue;
-            }
-            if (o instanceof Number) {
-                return ((Number) o).floatValue();
-            }
             return Float.parseFloat(o.toString());
         } catch (NumberFormatException e) {
             return defaultValue;
@@ -222,7 +194,7 @@ public class Converter {
     /**
      * Convert object to float, or <code>0</code> if conversion
      * failed
-     * 
+     *
      * @param o
      *            object to convert
      * @return converted float or <code>0</code> if conversion
@@ -235,7 +207,7 @@ public class Converter {
     /**
      * Convert object to double, or <code>defaultValue</code> if conversion
      * failed
-     * 
+     *
      * @param o
      *            object to convert
      * @param defaultValue
@@ -260,7 +232,7 @@ public class Converter {
     /**
      * Convert object to double, or <code>0</code> if conversion
      * failed
-     * 
+     *
      * @param o
      *            object to convert
      * @return converted double or <code>0</code> if conversion
@@ -273,7 +245,7 @@ public class Converter {
     /**
      * Convert object to boolean, or <code>false</code> if conversion
      * failed
-     * 
+     *
      * @param o
      *            object to convert
      * @return converted boolean or <code>false</code> if conversion
@@ -286,7 +258,7 @@ public class Converter {
     /**
      * Convert object to boolean, or <code>defaultValue</code> if conversion
      * failed
-     * 
+     *
      * @param o
      *            object to convert
      * @param defaultValue
@@ -330,7 +302,7 @@ public class Converter {
     /**
      * Convert object to char, or ' ' if no conversion can
      * be applied
-     * 
+     *
      * @param o
      *            object to convert
      * @return converted char or ' ' if conversion failed
@@ -342,7 +314,7 @@ public class Converter {
     /**
      * Convert object to char, or <code>defaultValue</code> if no conversion can
      * be applied
-     * 
+     *
      * @param o
      *            object to convert
      * @param defaultValue
@@ -528,7 +500,7 @@ public class Converter {
 
     /**
      * Replace newlines "\n" with <code>insertion</code>
-     * 
+     *
      * @param v
      *            String in which the newlines should be replaced
      * @param insertion
@@ -562,10 +534,10 @@ public class Converter {
     public static String getString(Object o) {
         return getString(o, "");
     }
-    
+
     /**
      * Converts an object to a {@link File}
-     * 
+     *
      * @param o
      *            object to convert (must be a {@link String} or a {@link File})
      * @return converted file

Modified: jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java (original)
+++ jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java Wed Dec  6 22:21:19 2017
@@ -352,8 +352,7 @@ implements ChangeListener, ActionListene
     }
 
     private void setupMethods(){
-        String className =
-            ((String) classnameCombo.getSelectedItem());
+        String className = (String) classnameCombo.getSelectedItem();
         methodName.removeAllItems();
         if (className != null) {
             try {
@@ -365,6 +364,7 @@ implements ChangeListener, ActionListene
                 }
                 methodName.repaint();
             } catch (ClassNotFoundException e) {
+                throw new RuntimeException(e);
             }
         }
     }

Modified: jmeter/trunk/src/junit/test/AfterAnnotatedTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/junit/test/AfterAnnotatedTest.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/junit/test/AfterAnnotatedTest.java (original)
+++ jmeter/trunk/src/junit/test/AfterAnnotatedTest.java Wed Dec  6 22:21:19 2017
@@ -19,6 +19,7 @@
 package test;
 
 import static org.junit.Assert.fail;
+
 import org.junit.After;
 import org.junit.Test;
 

Modified: jmeter/trunk/src/junit/test/BeforeAnnotatedTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/junit/test/BeforeAnnotatedTest.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/junit/test/BeforeAnnotatedTest.java (original)
+++ jmeter/trunk/src/junit/test/BeforeAnnotatedTest.java Wed Dec  6 22:21:19 2017
@@ -19,6 +19,7 @@
 package test;
 
 import static org.junit.Assert.fail;
+
 import org.junit.Before;
 import org.junit.Test;
 

Modified: jmeter/trunk/src/junit/test/DummyAnnotatedTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/junit/test/DummyAnnotatedTest.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/junit/test/DummyAnnotatedTest.java (original)
+++ jmeter/trunk/src/junit/test/DummyAnnotatedTest.java Wed Dec  6 22:21:19 2017
@@ -63,8 +63,8 @@ public class DummyAnnotatedTest
     @Test
     // Succeeds only if Before method - verifyTwo() - is run.
     public void add() {
-        int four = two+2;
-        if(4!=four) {
+        int four = two + 2;
+        if (4 != four) {
             throw new RuntimeException("4 did not equal four.");
         }
         //or if you have assertions enabled
@@ -72,19 +72,21 @@ public class DummyAnnotatedTest
     }
 
     //should always fail
-    @Test(timeout=1000)
+    @Test(timeout = 1000)
     public void timeOutFail() {
-        try{
+        try {
             TimeUnit.SECONDS.sleep(2);
-        }catch (InterruptedException e) { }
+        } catch (InterruptedException ignored) {
+        }
     }
 
     //should not fail
-    @Test(timeout=1000)
+    @Test(timeout = 1000)
     public void timeOutPass() {
-        try{
+        try {
             TimeUnit.MILLISECONDS.sleep(500);
-        }catch (InterruptedException e) { }
+        } catch (InterruptedException ignored) {
+        }
     }
 
     @Test

Modified: jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java (original)
+++ jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java Wed Dec  6 22:21:19 2017
@@ -196,8 +196,7 @@ public class FTPSampler extends Abstract
             }
             res.latencyEnd();
             int reply = ftp.getReplyCode();
-            if (FTPReply.isPositiveCompletion(reply))
-            {
+            if (FTPReply.isPositiveCompletion(reply)) {
                 if (ftp.login( getUsername(), getPassword())){
                     if (binaryTransfer) {
                         ftp.setFileType(FTP.BINARY_FILE_TYPE);
@@ -245,11 +244,8 @@ public class FTPSampler extends Abstract
                             } else {
                                 long bytes = IOUtils.copy(input,target);
                                 ftpOK = bytes > 0;
-                                if (saveResponse && baos != null){
-                                    res.setResponseData(baos.toByteArray());
-                                    if (!binaryTransfer) {
-                                        res.setDataType(SampleResult.TEXT);
-                                    }
+                                if (saveResponse) {
+                                    saveResponse(res, binaryTransfer, baos);
                                 } else {
                                     res.setBytes(bytes);
                                 }
@@ -300,6 +296,13 @@ public class FTPSampler extends Abstract
         return res;
     }
 
+    private void saveResponse(SampleResult res, boolean binaryTransfer, ByteArrayOutputStream baos) {
+        res.setResponseData(baos.toByteArray());
+        if (!binaryTransfer) {
+            res.setDataType(SampleResult.TEXT);
+        }
+    }
+
     /** {@inheritDoc} */
     @Override
     public boolean interrupt() {

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/DNSCacheManager.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/DNSCacheManager.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/DNSCacheManager.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/DNSCacheManager.java Wed Dec  6 22:21:19 2017
@@ -38,8 +38,8 @@ import org.apache.jmeter.testelement.pro
 import org.apache.jmeter.testelement.property.PropertyIterator;
 import org.apache.jmeter.testelement.property.TestElementProperty;
 import org.apache.jmeter.threads.JMeterContextService;
-import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.xbill.DNS.ARecord;
 import org.xbill.DNS.Cache;
 import org.xbill.DNS.ExtendedResolver;
@@ -59,7 +59,6 @@ import org.xbill.DNS.Type;
  *
  * @since 2.12
  */
-
 public class DNSCacheManager extends ConfigTestElement implements TestIterationListener, Serializable, DnsResolver {
 
     private static final long serialVersionUID = 2122L;
@@ -128,7 +127,7 @@ public class DNSCacheManager extends Con
             }
             ExtendedResolver result = new ExtendedResolver(serverNames);
             if (log.isDebugEnabled()) {
-                log.debug("Using DNS Resolvers: {}", Arrays.asList((result).getResolvers()));
+                log.debug("Using DNS Resolvers: {}", Arrays.asList(result.getResolvers()));
             }
             // resolvers will be chosen via round-robin
             result.setLoadBalance(true);

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java Wed Dec  6 22:21:19 2017
@@ -32,14 +32,14 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.jmeter.protocol.http.util.HTTPConstants;
 import org.apache.jmeter.util.JMeterUtils;
-import org.slf4j.LoggerFactory;
 import org.apache.jorphan.util.JOrphanUtils;
-import org.slf4j.Logger;
 import org.apache.oro.text.regex.MatchResult;
 import org.apache.oro.text.regex.Pattern;
 import org.apache.oro.text.regex.PatternMatcherInput;
 import org.apache.oro.text.regex.Perl5Compiler;
 import org.apache.oro.text.regex.Perl5Matcher;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Thread to handle one client request. Gets the request from the client and

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/KerberosManager.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/KerberosManager.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/KerberosManager.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/KerberosManager.java Wed Dec  6 22:21:19 2017
@@ -36,8 +36,8 @@ import javax.security.auth.login.LoginCo
 import javax.security.auth.login.LoginException;
 
 import org.apache.jmeter.util.JMeterUtils;
-import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Takes in charge Kerberos auth mechanism

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/RecordController.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/RecordController.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/RecordController.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/RecordController.java Wed Dec  6 22:21:19 2017
@@ -33,8 +33,8 @@ import org.apache.jmeter.gui.tree.JMeter
 import org.apache.jmeter.protocol.http.control.RecordingController;
 import org.apache.jmeter.testelement.TestElement;
 import org.apache.jmeter.util.JMeterUtils;
-import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class RecordController extends LogicControllerGui implements ActionListener {
     private static final long serialVersionUID = 241L;

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/AuthPanel.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/AuthPanel.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/AuthPanel.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/AuthPanel.java Wed Dec  6 22:21:19 2017
@@ -52,8 +52,8 @@ import org.apache.jmeter.testelement.Tes
 import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.gui.GuiUtils;
 import org.apache.jorphan.gui.layout.VerticalLayout;
-import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Handles input for determining if authentication services are required for a

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/CookiePanel.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/CookiePanel.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/CookiePanel.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/CookiePanel.java Wed Dec  6 22:21:19 2017
@@ -278,7 +278,7 @@ public class CookiePanel extends Abstrac
 
         CookieManager cookieManager = (CookieManager) el;
         populateTable(cookieManager);
-        clearEachIteration.setSelected((cookieManager).getClearEachIteration());
+        clearEachIteration.setSelected(cookieManager.getClearEachIteration());
         // must set policy after setting handler (which may change the policy)
         policy.setText(cookieManager.getPolicy());
     }

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java Wed Dec  6 22:21:19 2017
@@ -44,16 +44,14 @@ import org.apache.jmeter.protocol.http.c
 import org.apache.jmeter.testelement.TestElement;
 import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.gui.GuiUtils;
-import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Allows the user to specify if she needs HTTP header services, and give
  * parameters for this service.
- *
  */
-public class HeaderPanel extends AbstractConfigGui implements ActionListener
-{
+public class HeaderPanel extends AbstractConfigGui implements ActionListener {
     /** When pasting from the clipboard, split lines on linebreak */
     private static final String CLIPBOARD_LINE_DELIMITER = "\n"; //$NON-NLS-1$
 

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java Wed Dec  6 22:21:19 2017
@@ -40,15 +40,13 @@ import org.apache.jmeter.testelement.Abs
 import org.apache.jmeter.testelement.property.JMeterProperty;
 import org.apache.jmeter.testelement.property.PropertyIterator;
 import org.apache.jmeter.threads.JMeterContext;
-import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
-// For Unit tests, @see TestAnchorModifier
-
 public class AnchorModifier extends AbstractTestElement implements PreProcessor, Serializable {
     private static final Logger log = LoggerFactory.getLogger(AnchorModifier.class);
 

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/RegExUserParameters.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/RegExUserParameters.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/RegExUserParameters.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/RegExUserParameters.java Wed Dec  6 22:21:19 2017
@@ -29,8 +29,8 @@ import org.apache.jmeter.samplers.Sample
 import org.apache.jmeter.testelement.AbstractTestElement;
 import org.apache.jmeter.testelement.property.JMeterProperty;
 import org.apache.jmeter.threads.JMeterVariables;
-import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * This component allows you to specify reference name of a regular expression that extracts names and values of HTTP request parameters. 

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/BaseParser.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/BaseParser.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/BaseParser.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/BaseParser.java Wed Dec  6 22:21:19 2017
@@ -21,8 +21,8 @@ package org.apache.jmeter.protocol.http.
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
-import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * BaseParser is the base class for {@link LinkExtractorParser}

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/CssParser.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/CssParser.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/CssParser.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/CssParser.java Wed Dec  6 22:21:19 2017
@@ -28,8 +28,8 @@ import org.apache.commons.lang3.Validate
 import org.apache.commons.lang3.tuple.ImmutableTriple;
 import org.apache.commons.lang3.tuple.Triple;
 import org.apache.jmeter.util.JMeterUtils;
-import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.github.benmanes.caffeine.cache.Caffeine;
 import com.github.benmanes.caffeine.cache.LoadingCache;
@@ -43,9 +43,6 @@ public class CssParser implements LinkEx
     private static final URLCollection EMPTY_URL_COLLECTION = new URLCollection(Collections.emptyList());
     private static final Logger LOG = LoggerFactory.getLogger(CssParser.class);
 
-    /**
-     *
-     */
     private static final LoadingCache<Triple<String, URL, Charset>, URLCollection> CSS_URL_CACHE;
     static {
         final int cacheSize = JMeterUtils.getPropDefault(
@@ -55,7 +52,6 @@ public class CssParser implements LinkEx
     }
 
     /**
-     *
      * @see org.apache.jmeter.protocol.http.parser.LinkExtractorParser#getEmbeddedResourceURLs
      *      (java.lang.String, byte[], java.net.URL, java.lang.String)
      */

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/CssParserCacheLoader.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/CssParserCacheLoader.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/CssParserCacheLoader.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/CssParserCacheLoader.java Wed Dec  6 22:21:19 2017
@@ -25,8 +25,8 @@ import java.util.ArrayList;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.tuple.Triple;
 import org.apache.jmeter.util.JMeterUtils;
-import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.github.benmanes.caffeine.cache.CacheLoader;
 import com.helger.css.ECSSVersion;

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParser.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParser.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParser.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParser.java Wed Dec  6 22:21:19 2017
@@ -27,12 +27,11 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import org.apache.commons.lang3.StringUtils;
-import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * {@link HTMLParser} subclasses can parse HTML content to obtain URLs.
- *
  */
 public abstract class HTMLParser extends BaseParser {
 

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParsingUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParsingUtils.java?rev=1817321&r1=1817320&r2=1817321&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParsingUtils.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParsingUtils.java Wed Dec  6 22:21:19 2017
@@ -34,22 +34,20 @@ import org.apache.jmeter.protocol.http.s
 import org.apache.jmeter.protocol.http.util.ConversionUtils;
 import org.apache.jmeter.testelement.property.JMeterProperty;
 import org.apache.jmeter.util.JMeterUtils;
-import org.slf4j.LoggerFactory;
-import org.slf4j.Logger;
 import org.apache.oro.text.PatternCacheLRU;
 import org.apache.oro.text.regex.MatchResult;
 import org.apache.oro.text.regex.Pattern;
 import org.apache.oro.text.regex.PatternMatcherInput;
 import org.apache.oro.text.regex.Perl5Compiler;
 import org.apache.oro.text.regex.Perl5Matcher;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.w3c.tidy.Tidy;
 
-// For Junit tests @see TestHtmlParsingUtils
-
 public final class HtmlParsingUtils {
     private static final Logger log = LoggerFactory.getLogger(HtmlParsingUtils.class);
 
@@ -73,7 +71,7 @@ public final class HtmlParsingUtils {
      */
     public static boolean isAnchorMatched(HTTPSamplerBase newLink, HTTPSamplerBase config)
     {
-        String query = null;
+        String query;
         try {
             query = URLDecoder.decode(newLink.getQueryString(), StandardCharsets.UTF_8.name());
         } catch (UnsupportedEncodingException e) {



Mime
View raw message