Am 2. September 2016 21:52:11 MESZ, schrieb pmoua...@apache.org: >Author: pmouawad >Date: Fri Sep 2 19:52:11 2016 >New Revision: 1759026 > >URL: http://svn.apache.org/viewvc?rev=1759026&view=rev >Log: >Improve interface for furthe enhancements > >Modified: >jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/HtmlTemplateExporter.java > >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=1759026&r1=1759025&r2=1759026&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 >Fri Sep 2 19:52:11 2016 >@@ -159,7 +159,7 @@ public class HtmlTemplateExporter extend > * > */ > private interface ResultChecker { >- void checkResult(ResultData result); >+ boolean checkResult(DataContext dataContext, ResultData >result); > } > > /** >@@ -202,23 +202,23 @@ public class HtmlTemplateExporter extend > * > * @see >* org.apache.jmeter.report.dashboard.HtmlTemplateExporter.ResultChecker >- * #checkResult(org.apache.jmeter.report.processor.ResultData) >+ * #checkResult( org.apache.jmeter.report.core.DataContext >dataContext, org.apache.jmeter.report.processor.ResultData) > */ > @Override >- public void checkResult(ResultData result) { >+ public boolean checkResult(DataContext dataContext, ResultData >result) { > Boolean supportsControllerDiscrimination = findValue(Boolean.class, > AbstractGraphConsumer.RESULT_SUPPORTS_CONTROLLERS_DISCRIMINATION, > result); > >- String message = null; >if (supportsControllerDiscrimination.booleanValue() && >showControllerSeriesOnly > && excludesControllers) { > // Exporter shows controller series only > // whereas the current graph support controller > // discrimination and excludes > // controllers >- message = >ReportGeneratorConfiguration.EXPORTER_KEY_SHOW_CONTROLLERS_ONLY >- + " is set while the graph excludes >controllers."; >+ >LOG.warn(ReportGeneratorConfiguration.EXPORTER_KEY_SHOW_CONTROLLERS_ONLY >+ + " is set while the graph excludes >controllers."); >+ return false; > } else { > if (filterPattern != null) { > // Detect whether none series matches >@@ -264,17 +264,14 @@ public class HtmlTemplateExporter extend > } > if (!matches) { > // None series matches the pattern >- message = "None series matches the " >- + >ReportGeneratorConfiguration.EXPORTER_KEY_SERIES_FILTER; >+ LOG.warn("No serie matches the " >+ + >ReportGeneratorConfiguration.EXPORTER_KEY_SERIES_FILTER); >+ return false; > } > } > } > } >- >- // Log empty graph when needed. >- if (message != null) { >- LOG.warn(String.format(EMPTY_GRAPH_FMT, graphId, >message)); >- } >+ return true; > } > } > >@@ -293,7 +290,7 @@ public class HtmlTemplateExporter extend > if (data instanceof ResultData) { > ResultData result = (ResultData) data; > if (checker != null) { >- checker.checkResult(result); >+ checker.checkResult(dataContext, result);
Why change the interface to return a boolean and not use it? Felix > } > if (customizer != null) { > result = customizer.customizeResult(result);