Fixed the PMD errors for bug #7680.