@@ -63,12 +63,34 @@ protected Path createChildPath() {
6363
6464 public ValidatorGroup <T , V > build () {
6565
66- List <ValidatorGroup <V , ?>> groups = initAndBuildList (this .validatorGroupBuilders );
66+ List <ValidatorGroup <V , ?>> groups = initAndBuildGroupList (this .validatorGroupBuilders );
6767 List <Validator <V >> validators = initAndBuildList (this .validatorBuilders );
6868
6969 return new ValidatorGroup <>(validators , groups , valueGetter , conditionGetter );
7070 }
7171
72+ // Note: exact same functionality as initAndBuildList, just needed a different call signature.
73+ // This method was added to enable development using Eclipse
74+ private List <ValidatorGroup <V , ?>> initAndBuildGroupList (List <ValidatorGroupBuilder <V , ?>> builders ) {
75+
76+ builders .forEach (builder -> {
77+ if (Objects .nonNull (this .errorMessage )) {
78+ builder .errorMessage (this .errorMessage );
79+ }
80+ if (Objects .isNull (builder .getBasePath ())) {
81+ builder .basePath (createChildPath ());
82+ }
83+ if (Objects .isNull (builder .severity )) {
84+ builder .severity (this .severity );
85+ }
86+ });
87+ return builders .stream ()
88+ .map (ValidatorBaseBuilder ::build )
89+ .collect (Collectors .toList ());
90+
91+
92+ }
93+
7294 private <U > List <U > initAndBuildList (List <? extends ValidatorBaseBuilder <V , U , ?>> builders ) {
7395
7496 builders .forEach (builder -> {
@@ -89,4 +111,4 @@ private <U> List<U> initAndBuildList(List<? extends ValidatorBaseBuilder<V, U, ?
89111
90112 }
91113
92- }
114+ }
0 commit comments