Skip to content

Commit

Permalink
Avoid double profile injection
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Oct 17, 2024
1 parent 4da2eb9 commit 107f81d
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1132,12 +1132,13 @@ private Model readEffectiveModel() throws ModelBuilderException {
throw newModelBuilderException();
}

inputModel = activateFileModel(inputModel);

setRootModel(inputModel);

Model activatedFileModel = activateFileModel(inputModel);

// profile activation
DefaultProfileActivationContext profileActivationContext = getProfileActivationContext(request, inputModel);
DefaultProfileActivationContext profileActivationContext =
getProfileActivationContext(request, activatedFileModel);

List<Profile> activeExternalProfiles = result.getActiveExternalProfiles();

Expand All @@ -1150,7 +1151,7 @@ private Model readEffectiveModel() throws ModelBuilderException {
profileActivationContext.setUserProperties(profileProps);
}

Model parentModel = readParent(inputModel);
Model parentModel = readParent(activatedFileModel);
// Now that we have read the parent, we can set the relative
// path correctly if it was not set in the input model
if (inputModel.getParent() != null && inputModel.getParent().getRelativePath() == null) {
Expand Down

0 comments on commit 107f81d

Please sign in to comment.