Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8352739

Hotspot-8 missing parameter check in javax.management.MBeanOperationInfo

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 8u441
    • core-svc

      ADDITIONAL SYSTEM INFORMATION :
      openjdk version "1.8.0_432"
      OpenJDK Runtime Environment (Temurin)(build 1.8.0_432-b06)
      OpenJDK 64-Bit Server VM (Temurin)(build 25.432-b06, mixed mode)

      openjdk version "11.0.25" 2024-10-15
      OpenJDK Runtime Environment Temurin-11.0.25+9 (build 11.0.25+9)
      OpenJDK 64-Bit Server VM Temurin-11.0.25+9 (build 11.0.25+9, mixed mode)


      A DESCRIPTION OF THE PROBLEM :
      Hotspot-8 lacks parameter checking when creating object javax.management.MBeanOperationInfo, resulting in the wrong parameter being used.

      Comparatively, Hotspot-11 checks the parameters to report :
      Exception (java.lang.IllegalArgumentException) in the “main” thread: the parameter impact can only be ACTION, ACTION_INFO, INFO, or UNKNOWN, and the given value is :100
              at java.management/javax.management.MBeanOperationInfo.<init>(MBeanOperationInfo.java:164)
              at test.main(test.java:10)

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      java.lang.IllegalArgumentException

      ---------- BEGIN SOURCE ----------
      import javax.management.MBeanOperationInfo;

      public class test {
          public static void main(String[] var0) {
              new MBeanOperationInfo("", "", null, "", 100, null);
          }
      }
      ---------- END SOURCE ----------

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: