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

JFR: Default constructor may not be first in setting control

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 26
    • 11, 26
    • hotspot
    • None
    • jfr
    • b10

      If a user-defined setting is created where the default constructor is not the first constructor declared, it will fail to initialize, resulting in an InternalError being thrown.

      public class TestSetting extends SettingControl {
         public TestSetting(String text) {

         )
         public TestSetting() {
         )
         ...
      )

      java.lang.InternalError: Could not instantiate setting for class TestSetting
      at jdk.jfr/jdk.jfr.internal.EventControl.instantiateSettingControl(EventControl.java:298)
      at jdk.jfr/jdk.jfr.internal.EventControl.defineSetting(EventControl.java:259)
      at jdk.jfr/jdk.jfr.internal.EventControl.defineSettings(EventControl.java:244)
      at jdk.jfr/jdk.jfr.internal.EventControl.<init>(EventControl.java:221)
      at jdk.jfr/jdk.jfr.internal.MetadataRepository.makeConfiguration(MetadataRepository.java:220)
      at jdk.jfr/jdk.jfr.internal.MetadataRepository.register(MetadataRepository.java:150)
      at jdk.jfr/jdk.jfr.internal.MetadataRepository.register(MetadataRepository.java:135)
      at jdk.jfr/jdk.jfr.FlightRecorder.register(FlightRecorder.java:124)

            egahlin Erik Gahlin
            egahlin Erik Gahlin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: