changeset 909:57bec9c38e0d

bugfix
author Devel 1
date Thu, 19 Apr 2018 09:43:06 +0200
parents 5eb7806d3416
children 82931aa4de74
files stress-tester/src/main/java/com/passus/st/project/ProjectConfigurator.java
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/project/ProjectConfigurator.java	Wed Apr 18 16:12:13 2018 +0200
+++ b/stress-tester/src/main/java/com/passus/st/project/ProjectConfigurator.java	Thu Apr 19 09:43:06 2018 +0200
@@ -7,17 +7,21 @@
 import com.passus.st.config.TestJobConfigurator;
 import com.passus.st.utils.ConfigurationContextConsts;
 
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
 import java.util.function.BiPredicate;
 
 import static com.passus.config.schema.validation.NodeValidationMessages.TUPLE_NOT_DEFINED_MSG;
 
 public class ProjectConfigurator extends TestJobConfigurator {
 
+    private static final Set<String> PROJECT_KEYS = new HashSet<>(
+            Arrays.asList("name", "active", "description")
+    );
+
     private static final BiPredicate<String, DomainConfigurator> PROJECT_KEYS_PREDICATE = (keyName, configurator) -> {
-        return keyName != null &&
-                keyName.equals("name") ||
-                keyName.equals("active") ||
-                keyName.equals("description");
+        return PROJECT_KEYS.contains(keyName);
     };
 
     public ProjectConfigurator() {