Make sure the component resolves to a UPConfig before cloning it
Closes #26308
This commit is contained in:
parent
70b4c6bf52
commit
62020ffc68
1 changed files with 7 additions and 2 deletions
|
@ -201,8 +201,13 @@ public class DeclarativeUserProfileProvider implements UserProfileProvider {
|
|||
Optional<ComponentModel> component = getComponentModel();
|
||||
|
||||
if (component.isPresent()) {
|
||||
UPConfig cfg = getConfigFromComponentModel(component.get()).clone();
|
||||
return cfg == null ? parsedDefaultRawConfig.clone() : cfg;
|
||||
UPConfig cfg = getConfigFromComponentModel(component.get());
|
||||
|
||||
if (cfg == null) {
|
||||
cfg = parsedDefaultRawConfig;
|
||||
}
|
||||
|
||||
return cfg.clone();
|
||||
}
|
||||
|
||||
return parsedDefaultRawConfig.clone();
|
||||
|
|
Loading…
Reference in a new issue