Simplify isSameLenght implementations by reusing getLength. This also fixes a lot of the useless paranthesis warnings generated by PMD.