Use consistent ternary expression style
Update all ternary expressions so that the condition is always in parentheses and "not equals" is used in the test. This helps to bring consistency across the codebase which makes ternary expression easier to scan. For example: `a = (a != null) ? a : b` Issue gh-8945
This commit is contained in:
+1
-1
@@ -65,7 +65,7 @@ public class ContextPropagatingRemoteInvocation extends RemoteInvocation {
|
||||
if (currentUser != null) {
|
||||
this.principal = currentUser.getName();
|
||||
Object userCredentials = currentUser.getCredentials();
|
||||
this.credentials = userCredentials == null ? null : userCredentials.toString();
|
||||
this.credentials = (userCredentials != null) ? userCredentials.toString() : null;
|
||||
}
|
||||
else {
|
||||
this.credentials = null;
|
||||
|
||||
Reference in New Issue
Block a user