Intellij IDEA provides lots of code inspections, that can significantly simplify writing code.
Inspections parameters can be found in Preferences | Editor | Inspections section. By default, IDEA has lots of them enabled. And lots of inspections support auto-fixing options, that can be seen on press...