presto-main/src/main/java/io/prestosql/util/PowerOfTwoValidator.java/PowerOfTwoValidator/isValid
class PowerOfTwoValidator:    @Override
    public boolean isValid(Integer value, ConstraintValidatorContext context)
    {
        return value == null || Integer.bitCount(value) == 1;
    }