Minor fixes for PMD

| Q                   | A
| ------------------- | ---
| Bug fix?            | No
| New feature?        | No
| BC breaks?          | No
| Tests pass?         | Yes
| Scenarios pass?     | Yes
| Checkstyle issues?  | No
| Changelog updated?  | -
| Fixed tickets       | -
| Doc PR              | -