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.
|
* code block.
|
||||||
*/
|
*/
|
||||||
public boolean isCurrentThreadSystemCode() {
|
public boolean isCurrentThreadSystemCode() {
|
||||||
if (SecurityContextHolder.getContext().getAuthentication() instanceof SystemCodeAuthentication) {
|
return SecurityContextHolder.getContext().getAuthentication() instanceof SystemCodeAuthentication;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void setSystemContext() {
|
private static void setSystemContext() {
|
||||||
|
|||||||
Reference in New Issue
Block a user