remove if-statement and return immediately the instanceof result

Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>
This commit is contained in:
Michael Hirsch
2016-05-17 10:57:08 +02:00
parent dcbf27e3ed
commit 56487ad1b7

View File

@@ -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() {