[infinispan-issues] [JBoss JIRA] (ISPN-10609) Extend Marshaller interface to expose configured ClassWhiteList to implementation

Ryan Emerson (Jira) issues at jboss.org
Mon Sep 16 12:15:00 EDT 2019


Ryan Emerson created ISPN-10609:
-----------------------------------

             Summary: Extend Marshaller interface to expose configured ClassWhiteList to implementation
                 Key: ISPN-10609
                 URL: https://issues.jboss.org/browse/ISPN-10609
             Project: Infinispan
          Issue Type: Enhancement
          Components: Core
    Affects Versions: 10.0.0.CR2
            Reporter: Ryan Emerson
            Assignee: Ryan Emerson
             Fix For: 10.0.0.CR3


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:

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

Proposed change to the Marshaller interface:

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




--
This message was sent by Atlassian Jira
(v7.13.5#713005)


More information about the infinispan-issues mailing list