Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8275338 Add JFR events for notable serialization situations
  3. JDK-8331419

Release Note: Add `jdk.SerializationMisdeclaration` JFR Event

XMLWordPrintable

      A new `jdk.SerializationMisdeclaration` JFR event type is added to the platform. Such an event is triggered at runtime when some aspect of serialization related fields and methods are improperly declared. By enabling `jdk.SerializationMisdeclaration`, JFR will trigger an event for each incorrectly declared aspect of a serializable class when it is loaded in the JVM.

      For example, if the `writeObject()` method on a `Serializable` class has the correct signature but is unintentionally declared `public`, it is not selected by the serialization machinery. This might come as a surprise to the developer of the class. To help diagnose such problems, `jdk.SerializationMisdeclaration` events should be enabled.

      The standard `default.jfc` profile does _not_ enable these events, while the standard `profile.jfc` profile does.

            rgiulietti Raffaello Giulietti
            rgiulietti Raffaello Giulietti
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: