Uploaded image for project: 'ProtoStream'
  1. ProtoStream
  2. IPROTO-183

Annotation based marshalling adapter fails for array classes (in runtime mode)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.4.0.Alpha5
    • 4.4.0.Alpha1
    • None
    • False
    • False
    • DataGrid Sprint #57

    Description

      When trying to write a custom marshaller for an array or primitives, boxed primitives, array of messages, the marshaller generation fails in runtime mode annotation processing but succeeds at compile time annotation processing (code paths are a bit different between the two):

       

      Caused by: javassist.CannotCompileException: [source error] syntax error near "\{ return [I.class; }"
       at javassist.CtNewMethod.make(CtNewMethod.java:84)
       at javassist.CtNewMethod.make(CtNewMethod.java:50)
       at org.infinispan.protostream.annotations.impl.MarshallerByteCodeGenerator.generateMessageMarshaller(MarshallerByteCodeGenerator.java:173)
       at org.infinispan.protostream.annotations.impl.MarshallerByteCodeGenerator.generateMarshaller(MarshallerByteCodeGenerator.java:100)
       at org.infinispan.protostream.annotations.impl.BaseProtoSchemaGenerator.generateMarshallers(BaseProtoSchemaGenerator.java:203)
       at org.infinispan.protostream.annotations.impl.BaseProtoSchemaGenerator.generateAndRegister(BaseProtoSchemaGenerator.java:174)
       ... 28 more
      Caused by: compile error: syntax error near "\{ return [I.class; }"
       at javassist.compiler.Parser.parsePrimaryExpr(Parser.java:1268)
       at javassist.compiler.Parser.parsePostfix(Parser.java:1045)
       at javassist.compiler.Parser.parseUnaryExpr(Parser.java:900)
       at javassist.compiler.Parser.parseBinaryExpr(Parser.java:790)
       at javassist.compiler.Parser.parseConditionalExpr(Parser.java:735)
       at javassist.compiler.Parser.parseExpression(Parser.java:715)
       at javassist.compiler.Parser.parseReturn(Parser.java:524)
       at javassist.compiler.Parser.parseStatement(Parser.java:287)
       at javassist.compiler.Parser.parseBlock(Parser.java:307)
       at javassist.compiler.Parser.parseMethod2(Parser.java:172)
       at javassist.compiler.Javac.compileMethod(Javac.java:156)
       at javassist.compiler.Javac.compile(Javac.java:102)
       at javassist.CtNewMethod.make(CtNewMethod.java:79)
       ... 33 more
      
      

      Attachments

        Activity

          People

            anistor Adrian Nistor (Inactive)
            anistor Adrian Nistor (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: