-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
None
The Discouraged VM options rule has a tendency to be a bit noisy, since it only checks for the presence of the flags and does not give actionable information if the user does need to use those flags.
I propose that the rule should continue to look for the same flags (unrecognized & experimental vm options) but it should only return a high severity result if further conditions are met.
- If the Ignore Unrecognized VM Options flag is set, the rule should look for the flags, and by using the flag events show which (if any) unrecognized flags are used. This should likely only give a severity of INFO at most.
- If the Unlock Experimental VM Options flag is set the rule should look for which flags are set, and, as with the OptionsCheckRule, look in a defined list for when those flags were no longer set as experimental. If found, it should give a severity of INFO and tell the user which flag was experimental in the JDK version they used and which JDK version they should upgrade to and whether or not they can then remove the Unlock Experimental VM Options flag. If no known JDK version supports the specified flags, then the rule can return an OK result, since users using these kinds of flags are likely knowledgeable enough to continue doing so.
These changes should be enough to provide users with actionable knowledge, instead of just simply pointing out the obvious.