From 54a76de08cdbc8fa5f50f9fa8c6d1590777b16cf Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 2 Oct 2024 09:45:08 +0200 Subject: [PATCH] style: Remove unnecessary blank lines and improve type safety --- .../java/de/szut/lf8_starter/welcome/WelcomeController.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/szut/lf8_starter/welcome/WelcomeController.java b/src/main/java/de/szut/lf8_starter/welcome/WelcomeController.java index 0cfb9e5..4effa6b 100644 --- a/src/main/java/de/szut/lf8_starter/welcome/WelcomeController.java +++ b/src/main/java/de/szut/lf8_starter/welcome/WelcomeController.java @@ -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> getRoles(Authentication authentication) { + return ResponseEntity.ok((Collection) authentication.getAuthorities()); }