Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-10609

Extend Marshaller interface to expose configured ClassWhiteList to implementation

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 10.0.0.Final
    • 10.0.0.CR2
    • Core
    • None

    Description

      ClassWhiteList is a generic white list that can be configured via our XML, it doesn't have anything specifc to Serialization. We should allow a user's marshaller implementation, set via SerializationConfiguration#marshaller, to utilise the configured values to limit what can/can't be marshalled.

      For our internal code this is nice because it will prevent us from requiring hacky code like the following in the PersistenceMarshallerImpl if the user wants to utilise our provided JavaSerializationMarshaller:

      if (userMarshaller instanceof JavaSerializationMarshaller) {
         ((JavaSerialzationMarshaller) userMarshaller).setWhiteList(whiteListImpl);
      } else if (userMarshaller instanceof ...) {
         ...
      }
      

      Proposed change to the Marshaller interface:

      default void initialize(ClassWhiteList whiteList) {
         // no-op
      }
      

      Attachments

        Activity

          People

            remerson@redhat.com Ryan Emerson
            remerson@redhat.com Ryan Emerson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: