SONARJAVA-824 RSPEC-2178 Short-circuit logic should be used in boolean contexts