IntelliJ actually warns me when code like this can be simplified.