Fixed the pmd warnings