You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by se...@apache.org on 2016/01/05 23:01:26 UTC

svn commit: r1723182 - in /jmeter/trunk/src/core/org/apache/jmeter/report: config/ReportGeneratorConfiguration.java dashboard/HtmlTemplateExporter.java dashboard/ReportGenerator.java

Author: sebb
Date: Tue Jan  5 22:01:25 2016
New Revision: 1723182

URL: http://svn.apache.org/viewvc?rev=1723182&view=rev
Log:
Constant static field names should be uppercase

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/report/config/ReportGeneratorConfiguration.java
    jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/HtmlTemplateExporter.java
    jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/ReportGenerator.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/config/ReportGeneratorConfiguration.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/config/ReportGeneratorConfiguration.java?rev=1723182&r1=1723181&r2=1723182&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/config/ReportGeneratorConfiguration.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/config/ReportGeneratorConfiguration.java Tue Jan  5 22:01:25 2016
@@ -38,7 +38,7 @@ import jodd.props.Props;
  */
 public class ReportGeneratorConfiguration {
 
-    private static final Logger log = LoggingManager.getLoggerForClass();
+    private static final Logger LOG = LoggingManager.getLoggerForClass();
 
     public static final char KEY_DELIMITER = '.';
     public static final String REPORT_GENERATOR_KEY_PREFIX = "jmeter.reportgenerator";
@@ -123,7 +123,7 @@ public class ReportGeneratorConfiguratio
         public void initialize(String exportId,
                 ExporterConfiguration exportConfiguration)
                 throws ConfigurationException {
-            log.debug(String.format(LOAD_EXPORTER_FMT, exportId));
+            LOG.debug(String.format(LOAD_EXPORTER_FMT, exportId));
 
             // Get the property defining the class name
             String className = getRequiredProperty(
@@ -208,7 +208,7 @@ public class ReportGeneratorConfiguratio
         public void initialize(String graphId,
                 GraphConfiguration graphConfiguration)
                 throws ConfigurationException {
-            log.debug(String.format(LOAD_GRAPH_FMT, graphId));
+            LOG.debug(String.format(LOAD_GRAPH_FMT, graphId));
 
             // Get the property defining whether the graph have to
             // filter controller samples
@@ -460,7 +460,7 @@ public class ReportGeneratorConfiguratio
             throws ConfigurationException {
         String value = props.getValue(key);
         if (value == null) {
-            log.info(String.format(NOT_FOUND_PROPERTY_FMT, key,
+            LOG.info(String.format(NOT_FOUND_PROPERTY_FMT, key,
                     defaultValue));
             return defaultValue;
         }
@@ -471,7 +471,7 @@ public class ReportGeneratorConfiguratio
             String key, Class<TProperty> clazz) throws ConfigurationException {
         TProperty property = getProperty(props, key, null, clazz);
         if (property != null) {
-            log.debug(String.format(OPTIONAL_PROPERTY_FMT, property, key));
+            LOG.debug(String.format(OPTIONAL_PROPERTY_FMT, property, key));
         }
         return property;
     }
@@ -480,7 +480,7 @@ public class ReportGeneratorConfiguratio
             String key, TProperty defaultValue, Class<TProperty> clazz)
             throws ConfigurationException {
         TProperty property = getProperty(props, key, defaultValue, clazz);
-        log.debug(String.format(REQUIRED_PROPERTY_FMT, property, key));
+        LOG.debug(String.format(REQUIRED_PROPERTY_FMT, property, key));
         return property;
     }
 
@@ -542,7 +542,7 @@ public class ReportGeneratorConfiguratio
                     subConfigurations.put(name, subConfiguration);
                 }
             } else {
-                log.warn(String.format(INVALID_KEY_FMT, key));
+                LOG.warn(String.format(INVALID_KEY_FMT, key));
             }
         }
 
@@ -581,7 +581,7 @@ public class ReportGeneratorConfiguratio
     public static ReportGeneratorConfiguration loadFromProperties(
             Properties properties) throws ConfigurationException {
 
-        log.debug(START_LOADING_MSG);
+        LOG.debug(START_LOADING_MSG);
 
         ReportGeneratorConfiguration configuration = new ReportGeneratorConfiguration();
 
@@ -622,7 +622,7 @@ public class ReportGeneratorConfiguratio
                 new GraphConfigurationFactory(props));
 
         if (graphConfigurations.isEmpty()) {
-            log.info("No graph configuration found.");
+            LOG.info("No graph configuration found.");
         }
 
         // Find exporter identifiers and load a configuration for each
@@ -633,10 +633,10 @@ public class ReportGeneratorConfiguratio
                 new ExporterConfigurationFactory(props));
 
         if (exportConfigurations.isEmpty()) {
-            log.warn("No export configuration found. None report will be generated.");
+            LOG.warn("No export configuration found. None report will be generated.");
         }
 
-        log.debug(END_LOADING_MSG);
+        LOG.debug(END_LOADING_MSG);
 
         return configuration;
     }

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=1723182&r1=1723181&r2=1723182&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 Tue Jan  5 22:01:25 2016
@@ -52,7 +52,7 @@ public class HtmlTemplateExporter extend
     /** Format used for non null check of parameters. */
     private static final String MUST_NOT_BE_NULL = "%s must not be null";
 
-    private static final Logger log = LoggingManager.getLoggerForClass();
+    private static final Logger LOG = LoggingManager.getLoggerForClass();
 
     public static final String DATA_CTX_TESTFILE = "testFile";
     public static final String DATA_CTX_BEGINDATE = "beginDate";
@@ -143,7 +143,7 @@ public class HtmlTemplateExporter extend
         Validate.notNull(file, MUST_NOT_BE_NULL, "file");
         Validate.notNull(configuration, MUST_NOT_BE_NULL, "configuration");
 
-        log.debug("Start template processing");
+        LOG.debug("Start template processing");
 
         // Create data context and populate it
         DataContext dataContext = new DataContext();
@@ -158,14 +158,14 @@ public class HtmlTemplateExporter extend
         if (!templateDirectory.isDirectory()) {
             String message = String.format(INVALID_TEMPLATE_DIRECTORY_FMT,
                     templateDirectory);
-            log.error(message);
+            LOG.error(message);
             throw new ExportException(message);
         }
 
         // Get output directory property value
         File outputDir = getPropertyFromConfig(exportCfg, OUTPUT_DIR,
                 OUTPUT_DIR_DEFAULT, File.class);
-        log.info("Will generate dashboard in folder:" + outputDir);
+        LOG.info("Will generate dashboard in folder:" + outputDir);
 
         // Add the flag defining whether only sample series are filtered to the
         // context
@@ -271,7 +271,7 @@ public class HtmlTemplateExporter extend
             throw new ExportException("Unable to process template files.", ex);
         }
 
-        log.debug("End of template processing");
+        LOG.debug("End of template processing");
 
     }
 }

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=1723182&r1=1723181&r2=1723182&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 Tue Jan  5 22:01:25 2016
@@ -67,7 +67,7 @@ import org.apache.log.Logger;
  * @since 2.14
  */
 public class ReportGenerator {
-    private static final Logger log = LoggingManager.getLoggerForClass();
+    private static final Logger LOG = LoggingManager.getLoggerForClass();
 
     private static final boolean CSV_OUTPUT_FORMAT = "csv"
             .equalsIgnoreCase(JMeterUtils.getPropDefault(
@@ -119,14 +119,14 @@ public class ReportGenerator {
                 throw new IllegalArgumentException(String.format(
                         "Invalid test results file : %s", file));
             }
-            log.info("Will only generate report from results file:"
+            LOG.info("Will only generate report from results file:"
                     + resultsFile);
         } else {
             if (file.exists() && file.length() > 0) {
                 throw new IllegalArgumentException("Results file:"
                         + resultsFile + " is not empty");
             }
-            log.info("Will generate report at end of test from  results file:"
+            LOG.info("Will generate report at end of test from  results file:"
                     + resultsFile);
         }
         this.resultCollector = resultCollector;
@@ -166,10 +166,10 @@ public class ReportGenerator {
     public void generate() throws GenerationException {
 
         if (resultCollector != null) {
-            log.info("Flushing result collector before report Generation");
+            LOG.info("Flushing result collector before report Generation");
             resultCollector.flushFile();
         }
-        log.debug("Start report generation");
+        LOG.debug("Start report generation");
 
         File tmpDir = configuration.getTempDirectory();
         boolean tmpDirCreated = createTempDir(tmpDir);
@@ -210,17 +210,17 @@ public class ReportGenerator {
         }
 
         // Generate data
-        log.debug("Start samples processing");
+        LOG.debug("Start samples processing");
         try {
             source.run();
         } catch (SampleException ex) {
             String message = "Error while processing samples";
-            log.error(message, ex);
+            LOG.error(message, ex);
             throw new GenerationException(message, ex);
         }
-        log.debug("End of samples processing");
+        LOG.debug("End of samples processing");
 
-        log.debug("Start data exporting");
+        LOG.debug("Start data exporting");
 
         // Process configuration to build data exporters
         for (Map.Entry<String, ExporterConfiguration> entry : configuration
@@ -228,11 +228,11 @@ public class ReportGenerator {
             exportData(sampleContext, entry.getKey(), entry.getValue());
         }
 
-        log.debug("End of data exporting");
+        LOG.debug("End of data exporting");
 
         removeTempDir(tmpDir, tmpDirCreated);
 
-        log.debug("End of report generation");
+        LOG.debug("End of report generation");
 
     }
 
@@ -241,7 +241,7 @@ public class ReportGenerator {
             try {
                 FileUtils.deleteDirectory(tmpDir);
             } catch (IOException ex) {
-                log.warn(String.format(
+                LOG.warn(String.format(
                         "Cannot delete created temporary directory \"%s\".",
                         tmpDir), ex);
             }
@@ -255,7 +255,7 @@ public class ReportGenerator {
             if (!tmpDirCreated) {
                 String message = String.format(
                         "Cannot create temporary directory \"%s\".", tmpDir);
-                log.error(message);
+                LOG.error(message);
                 throw new GenerationException(message);
             }
         }
@@ -297,7 +297,7 @@ public class ReportGenerator {
         } catch (ClassNotFoundException | IllegalAccessException
                 | InstantiationException | ClassCastException ex) {
             String error = String.format(INVALID_CLASS_FMT, className);
-            log.error(error, ex);
+            LOG.error(error, ex);
             throw new GenerationException(error, ex);
         }
     }
@@ -318,11 +318,11 @@ public class ReportGenerator {
         } catch (ClassNotFoundException | IllegalAccessException
                 | InstantiationException | ClassCastException ex) {
             String error = String.format(INVALID_CLASS_FMT, className);
-            log.error(error, ex);
+            LOG.error(error, ex);
             throw new GenerationException(error, ex);
         } catch (ExportException ex) {
             String error = String.format(INVALID_EXPORT_FMT, exporterName);
-            log.error(error, ex);
+            LOG.error(error, ex);
             throw new GenerationException(error, ex);
         }
     }
@@ -480,14 +480,14 @@ public class ReportGenerator {
                 }
                 i++;
             }
-            log.warn(String
+            LOG.warn(String
                         .format("\"%s\" is not a valid property for class \"%s\", skip it",
                                 propertyName, className));
         } catch (InvocationTargetException | ConvertException ex) {
             String message = String
                     .format("Cannot assign \"%s\" to property \"%s\" (mapped as \"%s\"), skip it",
                             propertyValue, propertyName, setterName);
-            log.error(message, ex);
+            LOG.error(message, ex);
             throw new GenerationException(message, ex);
         }
     }