Skip to content

Commit

Permalink
Make sure the component resolves to a UPConfig before cloning it
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroigor authored and mposolda committed Jan 18, 2024
1 parent 70b4c6b commit 62020ff
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,13 @@ public UPConfig getConfiguration() {
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();
Expand Down

0 comments on commit 62020ff

Please sign in to comment.