remove if-statement and return immediately the instanceof result
Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>
This commit is contained in:
@@ -88,10 +88,7 @@ public class SystemSecurityContext {
|
||||
* code block.
|
||||
*/
|
||||
public boolean isCurrentThreadSystemCode() {
|
||||
if (SecurityContextHolder.getContext().getAuthentication() instanceof SystemCodeAuthentication) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return SecurityContextHolder.getContext().getAuthentication() instanceof SystemCodeAuthentication;
|
||||
}
|
||||
|
||||
private static void setSystemContext() {
|
||||
|
||||
Reference in New Issue
Block a user