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

SpringCache unwrapping NullValue singleton fails with Java Serialization

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Our spring integration makes use of the NullValue.NULL singleton when wrapping null values, however the singleton semantics are not respected when Java Serialization is used as this was previously enforced by a Externalizer implementation.

      Therefore, the NullValue wrapper is never unwrapped.

      .SpringCache
      private ValueWrapper wrap(Object value) {
      if (value == null)

      { return null; }
      if (value == NullValue.NULL) { return NullValue.NULL; }
      return new SimpleValueWrapper(value);
      }

      private <T> T unwrapNull(Object value) {
      if (value == NullValue.NULL) { return null; }

      return (T) value;
      }

      
      

              remerson@redhat.com Ryan Emerson
              remerson@redhat.com Ryan Emerson
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: