Fixed pmd rule violation and removed an unnessesery rule form pmd in build.gradle