The attached patch brings the test coverage to 100% for GroovyIfTag#doStartTag. The additional tests in the patch address the two cases
not covered
in the current tests.
The patch also offers refactorings for the #doStartTag implementation. These refactorings use method extraction to reduce repetition. They also cut the amount of conditional logic in half.
–
Note: The test improvements (in CoreTagsTests.groovy) are independent of the refactorings (in GroovyIfTag.java). In case the team disagrees with the refactorings, the additional test cases can still be applied to offer increased test coverage for the existing code base.