if (foo == null) { bar = null; } else { bar = foo.get(); }may be expressed as:
bar = foo == null ? null : foo.get();
Use the checkbox below to let this inspection report if statements containing method calls which can be replaced with a single method call with a conditional expression argument.