Reports any if statements with then and else branches which are both assignment expressions or both return statements. The same semantics can be expressed more compactly, and arguably more clearly, with a conditional expression. Example:
  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.