Skip to content

issue-673 fix#674

Closed
redmitry wants to merge 0 commit intoeclipse-ee4j:masterfrom
redmitry:master
Closed

issue-673 fix#674
redmitry wants to merge 0 commit intoeclipse-ee4j:masterfrom
redmitry:master

Conversation

@redmitry
Copy link

@redmitry redmitry commented Jul 2, 2025

Fix for the #673

@redmitry
Copy link
Author

Hello,

Could anyone check the issue (and fix) coz the bug breaks custom deserializations.

Tnx

@KyleAure
Copy link
Member

Thanks for your contribution. Would you be able to write a functional test replicating the failure you were getting before and showing that your fix works.

@redmitry
Copy link
Author

I added a simple test that should crash without a patch.

Note that the problem is in a way jakarta specifications done (e.g. json-b or jsonp).
Providing default methods in interfaces that rise "not implemented" exception is awkward - implementers just "forget" to implement methods as no compile errors is thrown.

In this particular case I test getValue() method (which is not implemented), but patch also adds missed getArray() and currentEvent()

Should it be two separate tests?

Cheers,

Dmitry

P.S. Probably it would be more correct to catch the exception and explicitly fail in the test...

Copy link
Member

@KyleAure KyleAure left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the problem is in a way jakarta specifications done (e.g. json-b or jsonp).
Providing default methods in interfaces that rise "not implemented" exception is awkward - implementers just "forget" to implement methods as no compile errors is thrown.

I agree, I think more recently the Jakarta Specification group has been more strict about "optional" features in the API and SPECs. Thanks again for filling in these gaps, just a few missing parts that I made suggestions for below.

default:
//no other changes needed
}
return next;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo: update copyright header with a new line below the previous Oracle line:

Copyright (c) 2026 Contributors to the Eclipse Foundation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants