Skip to content

Commit

Permalink
Merge pull request #14043 from grails/fix-parent-profile-error-message
Browse files Browse the repository at this point in the history
Change closure parameter name to parentName so it is distinct from class field name
  • Loading branch information
jamesfredley authored Feb 28, 2025
2 parents 7cbbdf6 + f017e96 commit 18ed685
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,10 @@ abstract class AbstractProfile implements Profile {

@Override
public Iterable<Profile> getExtends() {
return parentNames.collect() { String name ->
def parent = profileRepository.getProfile(name, true)
return parentNames.collect() { String parentName ->
def parent = profileRepository.getProfile(parentName, true)
if(parent == null) {
throw new IllegalStateException("Profile [$name] declares an invalid dependency on parent profile [$name]")
throw new IllegalStateException("Profile [$name] declares an invalid dependency on parent profile [$parentName]")
}
return parent
}
Expand Down

0 comments on commit 18ed685

Please sign in to comment.