Uploaded image for project: 'Java Mission Control'
  1. Java Mission Control
  2. JMC-7405

Refine DiscouragedVMOptions rule

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • 8.3.1
    • None
    • Mission Control Core
    • 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.

      1. 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.
      2. 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.

            hirt Marcus Hirt
            hdafgard Henrik Dafgård
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: