Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-1956

Portable object requires to have a class to get Enum field value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5.0.final
    • general, platforms
    • None

    Description

      PortableObject.field() method implementation attempts to resolve the class if the field type is Enum. This is wrong, because this method should work on server side without classes on classpath. Also this breaks the toString() method in this case.

      In addition, .NET always writes -1 as a type ID for any enum, so on Java side it is resolved into java.lang.Object. As a result, field() and toString() method fail with this exception:

      Caused by: org.apache.ignite.internal.portable.api.PortableException: Class does not represent enum type: java.lang.Object
      

      Attachments

        Issue Links

          There are no Sub-Tasks for this issue.

          Activity

            People

              vozerov Vladimir Ozerov
              vkulichenko Valentin Kulichenko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: