Fix warnings reported by PMD.