Reports conditions, like if(Optional.isPresent()), that can be rewritten in the functional style, as it is shorter and easier to read.

Example:


  if (str.isPresent()) str.get().trim();

After the quick-fix is applied:


  str.ifPresent(String::trim);

This inspection only reports if the language level of the project or module is 8 or higher.