changeset 886:ea6918227f40

refs ST-119
author Devel 1
date Fri, 23 Mar 2018 14:42:49 +0100
parents 64dbae6be412
children 8975b49f535f
files stress-tester/src/main/java/com/passus/st/CliHelper.java
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/CliHelper.java	Fri Mar 23 12:17:49 2018 +0100
+++ b/stress-tester/src/main/java/com/passus/st/CliHelper.java	Fri Mar 23 14:42:49 2018 +0100
@@ -163,10 +163,9 @@
         if (cl.hasOption("ff")) {
             File file = new File(cl.getOptionValue("ff"));
             Configuration cfg = YamlConfigurationReader.readFromFile(file);
-            HttpFiltersConfigurator configurator = new HttpFiltersConfigurator();
             Errors errors = new Errors();
             ConfigurationContext context = new ConfigurationContextImpl();
-            configurator.configure(cfg, errors, context);
+            List<HttpFilter> filters = HttpFiltersConfigurator.getFilters(cfg, errors, context);
             if (errors.getErrorCount() != 0) {
                 printError("Error in file '" + file.getAbsolutePath() + "'.", false);
                 for (ObjectError error : errors.getAllErrors()) {
@@ -174,8 +173,7 @@
                 }
                 System.exit(1);
             }
-
-            return (List<HttpFilter>) context.get(HTTP_FILTERS);
+            return filters;
         }
 
         return null;