Class RawType

  • All Implemented Interfaces:
    JaxbVisitable, PrismContextSensitive, Revivable, ShortDumpable, Serializable, Cloneable, org.jvnet.jaxb2_commons.lang.Equals

    public class RawType
    extends Object
    implements Serializable, Cloneable, org.jvnet.jaxb2_commons.lang.Equals, Revivable, ShortDumpable, JaxbVisitable, PrismContextSensitive
    A class used to hold raw XNodes until the definition for such an object is known. This class should be thread-safe because it is used in shared objects, like cached resources or roles. (See MID-6506.) But by default it is not, as it contains internal state (xnode/parsed) that can lead to race conditions when parsing. In midPoint 4.2 it was made roughly thread-safe by including explicit synchronization at appropriate places. See MID-6542. In midPoint 4.3 following changes were made to address following issues: 1. We need to support freezing the content (embedded xnode/prism value) XNodes are freezable, and RawType requires frozen XNode. 2. We should consider avoiding explicit synchronization for performance reasons Internal structure is State class - State `Parsed` (noop for subsequent parsing calls) - State `Raw` (parsing results in transition to state Parsed) - TODO what about `Transient`? Implementation has stable Equals, but hashcode is unstable since it would require significant effort to unify XNode and parsed items hashcode computation.
    See Also:
    Serialized Form