Fixed pmd violations in core.util package.