Skip to content

"Expression is empty" error when using arrays #21

Closed
@timmattison

Description

@timmattison

I have a parent class:

import com.igormaznitsa.jbbp.mapper.Bin;

public class BreakJBBPDslBuilderParent {
    @Bin(outOrder = 1)
    public BreakJBBPDslBuilderChild[] breakJBBPDslBuilderChildArray;
}

And a child class:

import com.igormaznitsa.jbbp.mapper.Bin;
import com.igormaznitsa.jbbp.mapper.BinType;

public class BreakJBBPDslBuilderChild {
    @Bin(outOrder = 1, comment = "Reserved", type = BinType.BYTE)
    public byte reserved;
}

If I try to use the JBBPDslBuilder on the parent class like this:

JBBPDslBuilder.Begin().AnnotatedClass(BreakJBBPDslBuilderParent.class).End();

I get an IllegalArgumentException with the message "Expression is empty" that is thrown by this line:

throw new IllegalArgumentException("Expression is empty");

Is this the correct way I'd use the JBBPDslBuilder to work with a structure that has arrays in it?

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions