Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-822

Deserialising classes that do not implement Serializable fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.2
    • 2.0.3
    • Core
    • None

    Description

      AbstractIoBuffer uses ObjectStreamClass.lookup(Class) which returns null for classes that do not implement Serializable. This in turn leads to a NullPointerException a few lines below in resolveClass(ObjectStreamClass) where the ObjectStreamClass-parameter is null.
      Deserialising a non-serialisable class is completely legal, instances of such a class will already fail to serialise so they will never get to deserialisation.

      Using ObjectStreamClass.lookupAny(Class) will solve this issue, but it is not available before Java 6.

      Attachments

        1. AbstractIoBuffer.patch
          3 kB
          Ulrich Kreher

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rudenz Ulrich Kreher
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: