checkstyle
simplify some boolean logic