You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We had a recent bug report where the generated Java DTOs were not
correctly handling null values for optional fields.
It turns out the property-based tests were not encoding these values.
Now, they do, and they fail with messages like this one:
```
java.lang.IllegalArgumentException: member1: value is out of allowed range: 255
at uk.co.real_logic.sbe.properties.TestMessageDto.validateMember1(TestMessageDto.java:33)
at uk.co.real_logic.sbe.properties.TestMessageDto.member1(TestMessageDto.java:55)
at uk.co.real_logic.sbe.properties.TestMessageDto.decodeWith(TestMessageDto.java:112)
at uk.co.real_logic.sbe.properties.TestMessageDto.decodeFrom(TestMessageDto.java:135)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at uk.co.real_logic.sbe.properties.DtosPropertyTest.javaDtoEncodeShouldBeTheInverseOfDtoDecode(DtosPropertyTest.java:114)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
```
0 commit comments