Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@JsonbCreator-annotated inaccessible constructors shouldn't overrule no-arg constructor #326

Closed
JohT opened this issue Sep 4, 2019 · 2 comments
Labels
spec issue An issue that should be addressed at the JSON-B spec level

Comments

@JohT
Copy link
Contributor

JohT commented Sep 4, 2019

As mentioned in yasson/pull/280
and shown by the currently ignored unit test method
"AnnotationIntrospectorTest.testNoArgConstructorShouldBePreferredOverUnusableJsonbAnnotatedProtectedConstructor",
inaccessible constructors lead to an error, even if there is also an valid standard no-arg constructor.

This is a cause of using "creators" (e.g. constructors) if they exist,
even if they can't be used at the end.

I guess, this is something to discuss, since the specification seems not to be that clear IMO, how it "should" be.

@JohT JohT changed the title @JsonbCreator-annotated inaccessible constructors with an additional valid no-arg constructor @JsonbCreator-annotated inaccessible constructors shouldn't overrule no-arg constructor Sep 4, 2019
@m0mus
Copy link
Member

m0mus commented Sep 5, 2019

Yes, I agree that the spec is bit loose in this area. We are currently collecting suggestions for JSONB.next in JSONB API issues tracker. Feel free to make your suggestions there.

@aguibert
Copy link
Member

Dmitry is right that this should be considered at the spec level. I've adjusted this spec-level issue to also include what is being asked for here:
jakartaee/jsonb-api#61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec issue An issue that should be addressed at the JSON-B spec level
Projects
None yet
Development

No branches or pull requests

3 participants