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

Favour Externalizer method implementations over @Marshalls annotation values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.0.0.ALPHA2
    • 5.0.0.ALPHA1
    • Marshalling
    • None

      Enhance Externalizer interface with methods for getTypeClasses(), getTypeClassNames() and getId() in favour of annotations.

      The reason for doing this is twofold:

      • The use of annotations makes it difficult for other apps to abstract the externalizer framework.
      • Runtime errors not caught at compilation time could arise from code like this where X and Y have no relationship:

      @Marshalls(typeClasses = Y.class, id = ExternalizerIds.XExternalizer)
      public class XExternalizer implements
      Externalizer<X> {

      In particular, code like this would maintain guarantees between classes externalized and return of readObject():

      List<Class<? extends T>> getTypeClasses();

            rh-ee-galder Galder ZamarreƱo
            rh-ee-galder Galder ZamarreƱo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: