Currently, for validation of nested ParameterGroup classes, a new
GroupValidationResult is directly created instead of calling the
validate method of nested classes. Thus any overridden validate methods
won't work. This is fixed.
Change-Id: I8ee9265b295cb68d67926128b5b68c217f341034
Issue-ID: POLICY-1744
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
// Nested parameter groups are allowed
if (ParameterGroup.class.isAssignableFrom(fieldType)) {
- return new GroupValidationResult((ParameterGroup) fieldObject);
+ if (null != fieldObject) {
+ return ((ParameterGroup) fieldObject).validate();
+ }
+ else {
+ return new GroupValidationResult((ParameterGroup) fieldObject);
+ }
}
// Nested maps of parameter groups are allowed