jdaugherty commented on code in PR #15480:
URL: https://github.com/apache/grails-core/pull/15480#discussion_r2882578412
##########
grails-test-examples/scaffolding/grails-app/domain/com/example/User.groovy:
##########
@@ -56,7 +56,14 @@ class User implements UserDetails {
@Override
Collection<? extends GrantedAuthority> getAuthorities() {
- roles.split('').collect { new SimpleGrantedAuthority(it) }
+ if (!roles) {
+ return Collections.emptyList()
Review Comment:
Why not just '[]' since this is groovy?
##########
grails-test-examples/scaffolding/src/integrationTest/groovy/com/example/UserCommunityControllerSpec.groovy:
##########
@@ -28,7 +28,7 @@ import grails.testing.mixin.integration.Integration
@Integration
class UserCommunityControllerSpec extends ContainerGebSpec {
- void setup() {
+ private void loginAsTestUser() {
to(LoginPage).login()
Review Comment:
Why would the http session be different between setup and the one test?
@matrei any idea?
##########
grails-test-examples/scaffolding/grails-app/domain/com/example/User.groovy:
##########
@@ -56,7 +56,14 @@ class User implements UserDetails {
@Override
Collection<? extends GrantedAuthority> getAuthorities() {
- roles.split('').collect { new SimpleGrantedAuthority(it) }
+ if (!roles) {
+ return Collections.emptyList()
Review Comment:
Why not just '[]' since this is groovy?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]