jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1718750 - in /jmeter/trunk/src: core/org/apache/jmeter/gui/util/ core/org/apache/jmeter/report/config/ core/org/apache/jmeter/report/core/ core/org/apache/jmeter/report/dashboard/ core/org/apache/jmeter/report/processor/ core/org/apache/jm...
Date Wed, 09 Dec 2015 00:48:13 GMT
Author: sebb
Date: Wed Dec  9 00:48:12 2015
New Revision: 1718750

URL: http://svn.apache.org/viewvc?rev=1718750&view=rev
Log:
Always use braces

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/TristateCheckBox.java
    jmeter/trunk/src/core/org/apache/jmeter/report/config/ConfigurationUtils.java
    jmeter/trunk/src/core/org/apache/jmeter/report/core/AbstractSampleWriter.java
    jmeter/trunk/src/core/org/apache/jmeter/report/core/ControllerSamplePredicate.java
    jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvSampleReader.java
    jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java
    jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetadata.java
    jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/HtmlTemplateExporter.java
    jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/JsonizerVisitor.java
    jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/ReportGenerator.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSampleConsumer.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSummaryConsumer.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/AggregateConsumer.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/CsvFileSampleSource.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/ErrorsSummaryConsumer.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/FieldSampleComparator.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/ListResultData.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/MapResultData.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/SampleWriterConsumer.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/ValueResultData.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GroupData.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/SeriesData.java
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java
    jmeter/trunk/src/core/org/apache/jmeter/samplers/DataStrippingSampleSender.java
    jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java
    jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TableEditor.java
    jmeter/trunk/src/core/org/apache/jmeter/util/BSFJavaScriptEngine.java
    jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java
    jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/ClassFilter.java
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSSamplerGui.java
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java
    jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
    jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/gui/SmtpSamplerGui.java

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=1718750&r1=1718749&r2=1718750&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 Wed Dec  9 00:48:12
2015
@@ -155,8 +155,9 @@ public final class TristateCheckBox exte
     public void setModel(ButtonModel newModel) {
         super.setModel(newModel);
         //Listen for enable changes
-        if (model instanceof TristateButtonModel)
+        if (model instanceof TristateButtonModel) {
             model.addChangeListener(enableListener);
+        }
     }
 
     //Empty override of superclass method
@@ -167,7 +168,9 @@ public final class TristateCheckBox exte
     // Mostly delegates to model
     private void iterateState() {
         //Maybe do nothing at all?
-        if (!getModel().isEnabled()) return;
+        if (!getModel().isEnabled()) {
+            return;
+        }
 
         grabFocus();
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/config/ConfigurationUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/config/ConfigurationUtils.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/config/ConfigurationUtils.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/config/ConfigurationUtils.java Wed Dec
 9 00:48:12 2015
@@ -50,8 +50,9 @@ public class ConfigurationUtils {
      */
     public static <TProperty> TProperty convert(String value,
         Class<TProperty> clazz) throws ConfigurationException {
-    if (clazz == null)
+    if (clazz == null) {
         throw new ArgumentNullException("clazz");
+    }
 
     TProperty result;
     if (clazz.isAssignableFrom(String.class)) {
@@ -59,9 +60,10 @@ public class ConfigurationUtils {
     } else {
         StringConverter<TProperty> converter = Converters
             .getConverter(clazz);
-        if (converter == null)
+        if (converter == null) {
         throw new ConfigurationException(String.format(
                 NOT_SUPPORTED_CONVERTION_FMT, value, clazz.getName()));
+        }
 
         try {
         result = converter.convert(value);

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/AbstractSampleWriter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/AbstractSampleWriter.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/AbstractSampleWriter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/AbstractSampleWriter.java Wed Dec
 9 00:48:12 2015
@@ -62,8 +62,9 @@ abstract public class AbstractSampleWrit
      *            sample writer
      */
     public void setWriter(Writer writer) {
-        if (writer == null)
+        if (writer == null) {
             throw new ArgumentNullException("writer");
+        }
 
         if (this.writer != null) {
             // flush and close previous writer
@@ -80,8 +81,9 @@ abstract public class AbstractSampleWrit
      *            The output stream on which sample should be written
      */
     public void setOutputStream(OutputStream out) {
-        if (out == null)
+        if (out == null) {
             throw new ArgumentNullException("out");
+        }
 
         try {
             setWriter(new OutputStreamWriter(out, CHARSET));

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/ControllerSamplePredicate.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/ControllerSamplePredicate.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/ControllerSamplePredicate.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/ControllerSamplePredicate.java Wed
Dec  9 00:48:12 2015
@@ -33,8 +33,9 @@ public class ControllerSamplePredicate i
      */
     @Override
     public boolean matches(Sample sample) {
-	if (sample == null)
+	if (sample == null) {
 	    throw new ArgumentNullException("sample");
+	}
 
 	return sample.isController();
     }

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvSampleReader.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvSampleReader.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvSampleReader.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvSampleReader.java Wed Dec  9 00:48:12
2015
@@ -92,12 +92,14 @@ public class CsvSampleReader {
 
     private CsvSampleReader(File inputFile, SampleMetadata metadata,
             Character separator, boolean useSaveSampleCfg) {
-        if (inputFile == null)
+        if (inputFile == null) {
             throw new ArgumentNullException("inputFile");
+        }
 
-        if (inputFile.isFile() == false || inputFile.canRead() == false)
+        if (inputFile.isFile() == false || inputFile.canRead() == false) {
             throw new IllegalArgumentException(file.getAbsolutePath()
                     + "does not exist or is not readable");
+        }
         this.file = inputFile;
         try {
             this.reader = new BufferedReader(new InputStreamReader(
@@ -105,8 +107,9 @@ public class CsvSampleReader {
         } catch (FileNotFoundException | UnsupportedEncodingException ex) {
             throw new SampleException("Could not create file reader !", ex);
         }
-        if (metadata == null)
+        if (metadata == null) {
             metadata = readMetadata(separator, useSaveSampleCfg);
+        }
         this.metadata = metadata;
         this.columnCount = metadata.getColumnCount();
         this.separator = metadata.getSeparator();
@@ -158,8 +161,9 @@ public class CsvSampleReader {
                 if (data.length < columnCount) {
                     String[] filler = new String[columnCount];
                     System.arraycopy(data, 0, filler, 0, data.length);
-                    for (int i = data.length; i < columnCount; i++)
+                    for (int i = data.length; i < columnCount; i++) {
                         filler[i] = "";
+                    }
                     data = filler;
                 }
                 sample = new Sample(row, metadata, data);

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java Wed Dec  9 00:48:12
2015
@@ -62,11 +62,13 @@ public class SampleBuilder {
     private long row = 0;
 
     public SampleBuilder(SampleMetadata metadata, NumberFormat floatFormater) {
-	if (metadata == null)
-	    throw new ArgumentNullException("metadata");
+	if (metadata == null) {
+        throw new ArgumentNullException("metadata");
+    }
 
-	if (floatFormater == null)
-	    throw new ArgumentNullException("floatFormater");
+	if (floatFormater == null) {
+        throw new ArgumentNullException("floatFormater");
+    }
 
 	this.floatFormater = floatFormater;
 	this.metadata = metadata;

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetadata.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetadata.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetadata.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetadata.java Wed Dec  9 00:48:12
2015
@@ -61,8 +61,9 @@ public class SampleMetadata {
     }
 
     public SampleMetadata(SampleSaveConfiguration saveConfig) {
-	if (saveConfig == null)
-	    throw new ArgumentNullException("saveConfig");
+	if (saveConfig == null) {
+        throw new ArgumentNullException("saveConfig");
+    }
 	ArrayList<String> columns = new ArrayList<>();
 	if (saveConfig.saveTimestamp()) {
 	    columns.add(CSVSaveService.TIME_STAMP);

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/HtmlTemplateExporter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/HtmlTemplateExporter.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/HtmlTemplateExporter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/HtmlTemplateExporter.java Wed
Dec  9 00:48:12 2015
@@ -98,8 +98,9 @@ public class HtmlTemplateExporter extend
 	Object data = storage.get(resultKey);
 	if (data instanceof ResultData) {
 	    ResultData result = (ResultData) data;
-	    if (customizer != null)
+	    if (customizer != null) {
 		result = customizer.customizeResult(result);
+	    }
 	    dataContext.put(resultKey, result.accept(visitor));
 	}
     }
@@ -134,12 +135,15 @@ public class HtmlTemplateExporter extend
     @Override
     public void export(SampleContext context, File file,
 	    ReportGeneratorConfiguration configuration) throws ExportException {
-	if (context == null)
+	if (context == null) {
 	    throw new ArgumentNullException("context");
-	if (file == null)
+	}
+	if (file == null) {
 	    throw new ArgumentNullException("file");
-	if (configuration == null)
+	}
+	if (configuration == null) {
 	    throw new ArgumentNullException("configuration");
+	}
 
 	log.debug("Start template processing");
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/JsonizerVisitor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/JsonizerVisitor.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/JsonizerVisitor.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/JsonizerVisitor.java Wed Dec
 9 00:48:12 2015
@@ -96,8 +96,9 @@ public class JsonizerVisitor implements
 	if (valueResult != null) {
 	    Object value = valueResult.getValue();
 	    result = String.valueOf(value);
-	    if (value instanceof String)
-		result = '"' + result + '"';
+	    if (value instanceof String) {
+	        result = '"' + result + '"';
+	    }
 	}
 	return result;
     }

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/ReportGenerator.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/ReportGenerator.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/ReportGenerator.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/ReportGenerator.java Wed Dec
 9 00:48:12 2015
@@ -329,12 +329,13 @@ public class ReportGenerator {
 				    } else {
 					StringConverter<?> converter = Converters
 					        .getConverter(parameterType);
-					if (converter == null)
-					    throw new GenerationException(
+					if (converter == null) {
+                        throw new GenerationException(
 						    String.format(
 						            NOT_SUPPORTED_CONVERTION_FMT,
 						            parameterType
 						                    .getName()));
+                    }
 					method.invoke(obj, converter
 					        .convert(propertyValue));
 				    }

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSampleConsumer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSampleConsumer.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSampleConsumer.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSampleConsumer.java Wed
Dec  9 00:48:12 2015
@@ -127,8 +127,9 @@ abstract public class AbstractSampleCons
     }
 
     public void setSampleConsumers(List<SampleConsumer> consumers) {
-	if (consumers == null)
+	if (consumers == null) {
 	    throw new ArgumentNullException("consumers");
+	}
 
 	this.sampleConsumers = consumers;
     }

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSummaryConsumer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSummaryConsumer.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSummaryConsumer.java
(original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSummaryConsumer.java
Wed Dec  9 00:48:12 2015
@@ -258,8 +258,9 @@ public abstract class AbstractSummaryCon
 	// Add overall row if needed
 	if (hasOverallResult) {
 	    MapResultData overallResult = createResultFromKey(null);
-	    if (overallResult != null)
+	    if (overallResult != null) {
 		result.setResult(RESULT_VALUE_OVERALL, overallResult);
+	    }
 	}
 
 	// Build rows from samples
@@ -267,8 +268,9 @@ public abstract class AbstractSummaryCon
 	for (String key : infos.keySet()) {
 	    // Add result only if data exist
 	    MapResultData keyResult = createResultFromKey(key);
-	    if (keyResult != null)
+	    if (keyResult != null) {
 		itemsResult.addResult(keyResult);
+	    }
 	}
 	result.setResult(RESULT_VALUE_ITEMS, itemsResult);
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/AggregateConsumer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/AggregateConsumer.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/AggregateConsumer.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/AggregateConsumer.java Wed Dec
 9 00:48:12 2015
@@ -63,10 +63,12 @@ public class AggregateConsumer extends A
      */
     public AggregateConsumer(Aggregator aggregator,
 	    SampleSelector<Double> selector) {
-	if (aggregator == null)
+	if (aggregator == null) {
 	    throw new ArgumentNullException("aggregator");
-	if (selector == null)
+	}
+	if (selector == null) {
 	    throw new ArgumentNullException("selector");
+	}
 
 	this.aggregator = aggregator;
 	this.selector = selector;

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/CsvFileSampleSource.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/CsvFileSampleSource.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/CsvFileSampleSource.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/CsvFileSampleSource.java Wed
Dec  9 00:48:12 2015
@@ -89,8 +89,9 @@ public class CsvFileSampleSource extends
      *            columns
      */
     public CsvFileSampleSource(final File inputFile, final char separator) {
-	if (inputFile == null)
+	if (inputFile == null) {
 	    throw new ArgumentNullException("inputFile");
+	}
 
 	final String inputRootName = getFileRootName(inputFile.getName());
 	final String inputExtension = getFileExtension(inputFile.getName());
@@ -173,9 +174,10 @@ public class CsvFileSampleSource extends
      */
     private void produce() {
 	SampleContext context = getSampleContext();
-	if (context == null)
+	if (context == null) {
 	    throw new IllegalStateException(
 		    "Set a sample context before produce samples.");
+	}
 
 	for (int i = 0; i < csvReaders.length; i++) {
 	    long sampleCount = 0;
@@ -256,8 +258,9 @@ public class CsvFileSampleSource extends
 	private List<SampleConsumer> sampleConsumers = new ArrayList<>();
 
 	public void setSampleConsumers(List<SampleConsumer> consumers) {
-	    if (consumers == null)
+	    if (consumers == null) {
 		throw new ArgumentNullException("consumers");
+	    }
 
 	    this.sampleConsumers = consumers;
 	}

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/ErrorsSummaryConsumer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/ErrorsSummaryConsumer.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/ErrorsSummaryConsumer.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/ErrorsSummaryConsumer.java Wed
Dec  9 00:48:12 2015
@@ -110,8 +110,9 @@ public class ErrorsSummaryConsumer exten
 	    errorCount++;
 
 	    Long data = info.getData();
-	    if (data == null)
-		data = Long.valueOf(1);
+	    if (data == null) {
+	        data = Long.valueOf(1);
+	    }
 	    info.setData(data + 1);
 	}
     }

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java Wed
Dec  9 00:48:12 2015
@@ -177,11 +177,13 @@ public class ExternalSampleSorter extend
      *            Wether the CSV header should be written in the output CSV file
      */
     public void sort(CsvFile inputFile, File outputFile, boolean writeHeader) {
-	if (inputFile == null)
+	if (inputFile == null) {
 	    throw new ArgumentNullException("inputFile");
+	}
 
-	if (outputFile == null)
+	if (outputFile == null) {
 	    throw new ArgumentNullException("outputFile");
+	}
 
 	if (!inputFile.isFile()) {
 	    throw new SampleException(
@@ -219,14 +221,17 @@ public class ExternalSampleSorter extend
      */
     public void sort(SampleMetadata sampleMetadata, File inputFile,
 	    File outputFile, boolean writeHeader) {
-	if (sampleMetadata == null)
+	if (sampleMetadata == null) {
 	    throw new ArgumentNullException("sampleMetadata");
+	}
 
-	if (inputFile == null)
+	if (inputFile == null) {
 	    throw new ArgumentNullException("inputFile");
+	}
 
-	if (outputFile == null)
+	if (outputFile == null) {
 	    throw new ArgumentNullException("outputFile");
+	}
 
 	if (!inputFile.isFile()) {
 	    throw new SampleException(
@@ -260,11 +265,13 @@ public class ExternalSampleSorter extend
      */
     private void sort(CsvSampleReader csvReader, File output,
 	    boolean writeHeader) {
-	if (csvReader == null)
+	if (csvReader == null) {
 	    throw new ArgumentNullException("csvReader");
+	}
 
-	if (output == null)
+	if (output == null) {
 	    throw new ArgumentNullException("output");
+	}
 
 	SampleMetadata sampleMetadata = csvReader.getMetadata();
 	SampleWriterConsumer writerConsumer = new SampleWriterConsumer();
@@ -286,9 +293,10 @@ public class ExternalSampleSorter extend
 
     @Override
     public void startConsuming() {
-	if (sampleComparator == null)
+	if (sampleComparator == null) {
 	    throw new IllegalStateException(
 		    "sampleComparator is not set, call setSampleComparator() first.");
+	}
 
 	File workDir = getWorkingDirectory();
 	workDir.mkdir();

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/FieldSampleComparator.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/FieldSampleComparator.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/FieldSampleComparator.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/FieldSampleComparator.java Wed
Dec  9 00:48:12 2015
@@ -39,9 +39,10 @@ public class FieldSampleComparator imple
     @Override
     public final void initialize(SampleMetadata metadata) {
 	index = metadata.indexOf(fieldName);
-	if (index < 0)
+	if (index < 0) {
 	    throw new SampleException(String.format(METADATA_EXCEPTION_MSG_FMT,
 		    fieldName, metadata));
+	}
     }
 
     /*

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/ListResultData.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/ListResultData.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/ListResultData.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/ListResultData.java Wed Dec 
9 00:48:12 2015
@@ -41,8 +41,9 @@ public class ListResultData implements R
      */
     @Override
     public <TVisit> TVisit accept(ResultDataVisitor<TVisit> visitor) {
-	if (visitor == null)
-	    throw new ArgumentNullException("visitor");
+	if (visitor == null) {
+        throw new ArgumentNullException("visitor");
+    }
 	return visitor.visitListResult(this);
     }
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/MapResultData.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/MapResultData.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/MapResultData.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/MapResultData.java Wed Dec  9
00:48:12 2015
@@ -42,8 +42,9 @@ public class MapResultData implements Re
      */
     @Override
     public <TVisit> TVisit accept(ResultDataVisitor<TVisit> visitor) {
-	if (visitor == null)
-	    throw new ArgumentNullException("visitor");
+	if (visitor == null) {
+        throw new ArgumentNullException("visitor");
+    }
 	return visitor.visitMapResult(this);
     }
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/SampleWriterConsumer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/SampleWriterConsumer.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/SampleWriterConsumer.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/SampleWriterConsumer.java Wed
Dec  9 00:48:12 2015
@@ -49,8 +49,9 @@ public class SampleWriterConsumer extend
     }
 
     public void setOutputFile(File outputFile) {
-	if (outputFile == null)
-	    throw new ArgumentNullException("outputFile");
+	if (outputFile == null) {
+        throw new ArgumentNullException("outputFile");
+    }
 
 	this.outputFile = outputFile;
     }

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/ValueResultData.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/ValueResultData.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/ValueResultData.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/ValueResultData.java Wed Dec
 9 00:48:12 2015
@@ -72,8 +72,9 @@ public class ValueResultData implements
      */
     @Override
     public <TVisit> TVisit accept(ResultDataVisitor<TVisit> visitor) {
-	if (visitor == null)
-	    throw new ArgumentNullException("visitor");
+	if (visitor == null) {
+        throw new ArgumentNullException("visitor");
+    }
 	return visitor.visitValueResult(this);
     }
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GroupData.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GroupData.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GroupData.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GroupData.java Wed Dec
 9 00:48:12 2015
@@ -64,7 +64,8 @@ public class GroupData {
 
     public void clear() {
 	seriesData.clear();
-	if (overallSeries != null)
+	if (overallSeries != null) {
 	    overallSeries.clear();
+	}
     }
 }

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/SeriesData.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/SeriesData.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/SeriesData.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/SeriesData.java Wed Dec
 9 00:48:12 2015
@@ -141,9 +141,11 @@ public class SeriesData {
     public void clear() {
 	aggregators.clear();
 	count = 0L;
-	if (keysAggregator != null)
-	    keysAggregator.reset();
-	if (valuesAggregator != null)
-	    valuesAggregator.reset();
+	if (keysAggregator != null) {
+        keysAggregator.reset();
+    }
+	if (valuesAggregator != null) {
+        valuesAggregator.reset();
+    }
     }
 }
\ No newline at end of file

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java
(original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java
Wed Dec  9 00:48:12 2015
@@ -68,8 +68,9 @@ public class ActiveThreadsGraphConsumer
 		    public Iterable<String> select(Sample sample) {
 		        String threadName = sample.getThreadName();
 		        int index = threadName.lastIndexOf(" ");
-		        if (index >= 0)
+		        if (index >= 0) {
 			    threadName = threadName.substring(0, index);
+		        }
 		        return Arrays.asList(new String[] { threadName });
 		    }
 	        }, new GraphValueSelector() {

Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/DataStrippingSampleSender.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/DataStrippingSampleSender.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/samplers/DataStrippingSampleSender.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/samplers/DataStrippingSampleSender.java Wed Dec
 9 00:48:12 2015
@@ -67,7 +67,9 @@ public class DataStrippingSampleSender e
     @Override
     public void testEnded(String host) {
         log.info("Test Ended on " + host);
-        if(decoratedSender != null) decoratedSender.testEnded(host);
+        if(decoratedSender != null) { 
+            decoratedSender.testEnded(host);
+        }
     }
 
     @Override

Modified: jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java Wed Dec  9 00:48:12 2015
@@ -145,8 +145,12 @@ public class SaveService {
         , JMeterUtils.getPropDefault(FILE_FORMAT, VERSION_2_2));
 
     private static boolean validateFormat(String format){
-        if ("2.2".equals(format)) return true;
-        if ("2.1".equals(format)) return true;
+        if ("2.2".equals(format)) {
+            return true;
+        }
+        if ("2.1".equals(format)) {
+            return true;
+        }
         return false;
     }
 

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=1718750&r1=1718749&r2=1718750&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  9 00:48:12
2015
@@ -132,7 +132,9 @@ public class TableEditor extends Propert
         {
             model.setRows(convertCollection((Collection<?>)value));
         }
-        else model.clearData();
+        else {
+            model.clearData();
+        }
         this.firePropertyChange();
     }
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/BSFJavaScriptEngine.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/BSFJavaScriptEngine.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/BSFJavaScriptEngine.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/BSFJavaScriptEngine.java Wed Dec  9 00:48:12
2015
@@ -75,9 +75,10 @@ public class BSFJavaScriptEngine extends
             Object fun = global.get(method, global);
             // NOTE: Source and line arguments are nonsense in a call().
             //       Any way to make these arguments *sensible?
-            if (fun == Scriptable.NOT_FOUND)
+            if (fun == Scriptable.NOT_FOUND) {
                 throw new EvaluatorException("function " + method +
                                              " not found.", "none", 0);
+            }
 
             cx.setOptimizationLevel(-1);
             cx.setGeneratingDebug(false);
@@ -90,8 +91,9 @@ public class BSFJavaScriptEngine extends
 
 //                ScriptRuntime.call(cx, fun, global, args, global);
 
-            if (retval instanceof Wrapper)
+            if (retval instanceof Wrapper) {
                 retval = ((Wrapper) retval).unwrap();
+            }
         }
         catch (Throwable t) {
             handleError(t);
@@ -142,8 +144,9 @@ public class BSFJavaScriptEngine extends
                                        source, lineNo,
                                        null);
 
-            if (retval instanceof NativeJavaObject)
+            if (retval instanceof NativeJavaObject) {
                 retval = ((NativeJavaObject) retval).unwrap();
+            }
 
         }
         catch (Throwable t) { // includes JavaScriptException, rethrows Errors
@@ -156,8 +159,9 @@ public class BSFJavaScriptEngine extends
     }
 
     private void handleError(Throwable t) throws BSFException {
-        if (t instanceof WrappedException)
+        if (t instanceof WrappedException) {
             t = ((WrappedException) t).getWrappedException();
+        }
 
         String message = null;
         Throwable target = t;
@@ -184,8 +188,9 @@ public class BSFJavaScriptEngine extends
             message = "Stack Overflow";
         }
 
-        if (message == null)
+        if (message == null) {
             message = t.toString();
+        }
 
         if (t instanceof Error && !(t instanceof StackOverflowError)) {
             // Re-throw Errors because we're supposed to let the JVM see it

Modified: jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java (original)
+++ jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java Wed Dec  9 00:48:12
2015
@@ -180,9 +180,13 @@ public class KeyToolUtils {
         boolean redact = false; // whether to redact next parameter
         for (String string : arguments) {
             final boolean quote = string.contains(" ");
-            if (quote) builder.append("\"");
+            if (quote) {
+                builder.append("\"");
+            }
             builder.append(redact? "{redacted}" : string);
-            if (quote) builder.append("\"");
+            if (quote) {
+                builder.append("\"");
+            }
             builder.append(" ");
             redact = string.equals("-storepass") || string.equals("-keypass");
         }

Modified: jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/ClassFilter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/ClassFilter.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/ClassFilter.java (original)
+++ jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/ClassFilter.java Wed
Dec  9 00:48:12 2015
@@ -35,7 +35,7 @@ class ClassFilter {
     }
 
     private boolean include(String text) {
-        if (pkgs.length == 0) return true; // i.e. no filter
+        if (pkgs.length == 0) { return true; } // i.e. no filter
         for (String pkg : pkgs) {
             if (text.startsWith(pkg)) {
                 return true;

Modified: jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSSamplerGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSSamplerGui.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSSamplerGui.java
(original)
+++ jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSSamplerGui.java
Wed Dec  9 00:48:12 2015
@@ -153,7 +153,7 @@ public class JMSSamplerGui extends Abstr
     @Override
     public void modifyTestElement(TestElement element) {
         this.configureTestElement(element);
-        if (!(element instanceof JMSSampler)) return;
+        if (!(element instanceof JMSSampler)) { return; }
         JMSSampler sampler = (JMSSampler) element;
         transfer(sampler);
     }
@@ -161,7 +161,7 @@ public class JMSSamplerGui extends Abstr
     @Override
     public void configure(TestElement el) {
         super.configure(el);
-        if (!(el instanceof JMSSampler)) return;
+        if (!(el instanceof JMSSampler)) { return; }
         JMSSampler sampler = (JMSSampler) el;
         queueConnectionFactory.setText(sampler.getQueueConnectionFactory());
         sendQueue.setText(sampler.getSendQueue());

Modified: jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java
(original)
+++ jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java
Wed Dec  9 00:48:12 2015
@@ -227,7 +227,9 @@ public class SubscriberSampler extends B
      * @return wait time
      */
     private long calculateWait(long until, long now) {
-        if (until == 0) return DEFAULT_WAIT; // Timeouts not active
+        if (until == 0) {
+            return DEFAULT_WAIT; // Timeouts not active
+        }
         long wait = until - now; // How much left
         return wait > DEFAULT_WAIT ? DEFAULT_WAIT : wait;
     }

Modified: jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
(original)
+++ jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
Wed Dec  9 00:48:12 2015
@@ -129,8 +129,12 @@ public class MailFileFolder extends Fold
 
     @Override
     public int getMessageCount() throws MessagingException {
-        if (!isOpen) return -1;
-        if (isFile) return 1;
+        if (!isOpen) {
+            return -1;
+        }
+        if (isFile) {
+            return 1;
+        }
         File[] listFiles = folderPath.listFiles(FILENAME_FILTER);
         return listFiles != null ? listFiles.length : 0;
     }

Modified: jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/gui/SmtpSamplerGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/gui/SmtpSamplerGui.java?rev=1718750&r1=1718749&r2=1718750&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/gui/SmtpSamplerGui.java
(original)
+++ jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/gui/SmtpSamplerGui.java
Wed Dec  9 00:48:12 2015
@@ -186,8 +186,9 @@ public class SmtpSamplerGui extends Abst
      * @return Panel for entering the data
      */
     private Component makeDataPanel() {
-        if (smtpPanel == null)
+        if (smtpPanel == null) {
             smtpPanel = new SmtpPanel();
+        }
         return smtpPanel;
     }
 }




Mime
View raw message