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
public class AtNotificationReasonAdapter implements JsonbAdapter<AtNotificationReason, String> {
@Override
public String adaptToJson(final AtNotificationReason obj) throws Exception {
return obj.getReasonString();
}
@Override
public AtNotificationReason adaptFromJson(final String obj) throws Exception {
return AtNotificationReason.fromString(obj);
}
}
Expected behavior
Field "reason" is set.
** Actual behaviour**
[ERROR] Failures:
[ERROR] AtNotificationResponseWrapperTest.can_deserialize:93 [List element at index 0]
Expecting
AtMentionNotification[uri=at://did:plc:n5o2wksggcs653t3seg5eu6b/app.bsky.feed.post/3kaqpcklzqg2x, cid=bafyreiejmowzo54ffnk4o5ebz3l2jixso6qnezx4h3ctygugp5sjv5z3hu, author=AtNotificationAuthor[did=did:plc:n5o2wksggcs653t3seg5eu6b, handle=bmarwell.de, displayName="", description=""., avatarUri=""], indexedAt=2023-10-02T08:10:24.445Z], reason=null, record=AtPostNotificationRecord[text="", type=POST, lang=null, createdAt=2023-10-02T05:47:58.002Z], indexedAt=2023-10-02T05:47:58.002Z, isRead=false]
to have a property or a field named "reason" with value
"mention"
but value was:
null
(static and synthetic fields are ignored)
Describe the bug
A field used in an interface with
@JsonbTypeInfo
and Subtypes as well as a type adapter becomesnull
in implementing records.To Reproduce
Then the implementing record:
Adapter for Reason enum:
Expected behavior
Field "reason" is set.
** Actual behaviour**
System information:
Additional context
Run
./mvnw test
here:https://github.com/bmarwell/social-metricbot/tree/yasson_bug
The text was updated successfully, but these errors were encountered: