Reduce PMD warnings on example code