style: Remove unnecessary blank lines and improve type safety
All checks were successful
Quality Check / Tests (pull_request) Successful in 59s
Quality Check / Checkstyle Main (pull_request) Successful in 46s
gitea-sonarqube-bot OK
Build PR / Build and analyze (pull_request) Successful in 1m55s

This commit is contained in:
Jan Gleytenhoover 2024-10-02 09:45:08 +02:00
parent e5d0bcb84e
commit 54a76de08c
Signed by: jank
GPG Key ID: B267751B8AE29EFE

@ -1,7 +1,5 @@
package de.szut.lf8_starter.welcome;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
@ -19,8 +17,8 @@ public class WelcomeController {
}
@GetMapping("/roles")
public ResponseEntity getRoles(Authentication authentication) {
return ResponseEntity.ok(authentication.getAuthorities());
public ResponseEntity<Collection<GrantedAuthority>> getRoles(Authentication authentication) {
return ResponseEntity.ok((Collection<GrantedAuthority>) authentication.getAuthorities());
}