[STORM-3850] Remove PMD exceptions #3467
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
mvn build creates a large number of repeated WARNING messages
Static Code Analyzer (using PMD plugin) reports a large number of errors.
Many of them are parsing errors by PMD plugin itself. This appears to be because the parse is assuming that the target source is below JDK 1.6.
(1) Fix this to assume JDK 1.8 source so that method references are properly parsed.
(2) Fix the java code to remove PMD warnings
Changing the code to 1.8 may reveal new PMC exceptions that were hidden because of PMD plugin parser errors.
(3) Fix new java code PMD errors uncovered when target jdk is switched to jdk8 and even jdk11
How was the change tested
Build and unit test