Skip to content

Commit f017e96

Browse files
committed
Change closure parameter name to parentName so it is distinct from class field name
Exception now communicates the correct relationship between child and parent profiles It was displaying the parent profile name twice
1 parent 7cbbdf6 commit f017e96

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

grails-shell/src/main/groovy/org/grails/cli/profile/AbstractProfile.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,10 @@ abstract class AbstractProfile implements Profile {
349349

350350
@Override
351351
public Iterable<Profile> getExtends() {
352-
return parentNames.collect() { String name ->
353-
def parent = profileRepository.getProfile(name, true)
352+
return parentNames.collect() { String parentName ->
353+
def parent = profileRepository.getProfile(parentName, true)
354354
if(parent == null) {
355-
throw new IllegalStateException("Profile [$name] declares an invalid dependency on parent profile [$name]")
355+
throw new IllegalStateException("Profile [$name] declares an invalid dependency on parent profile [$parentName]")
356356
}
357357
return parent
358358
}

0 commit comments

Comments
 (0)