Skip to content

arrays do not work as constructor parameters #3

Open
@advorkovyy

Description

@advorkovyy

This example gives IllegalArgumentException:

case class FixtureWithArray(key:UUID, content:Array[Byte]) 

val descriptor = descriptorOf[FixtureWithArray]
val builder = descriptor.newBuilder()
builder.set(descriptor("key"),UUID.randomUUID())
builder.set(descriptor("content"),Array.empty[Byte])
val instance = builder.result().asInstanceOf[FixtureWithArray] 

The problem is that constructor signature has Scala Array[Byte] type, while compile code has Java type byte[] and paranamer cannot find it. Only workaround at the moment is to get rid of all arrays in the constructor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions