jakartaee / rest

Jakarta RESTful Web Services
Other
353 stars 114 forks source link

Spec Clarification: Application constructor must be public #1101

Open mkarg opened 2 years ago

mkarg commented 2 years ago

Apparently some compliant implementations allow non-public Application constructors, while others do not. To ensure that any custom Application implementation ist at-most portable, the JAX-RS specification should unambiguously say that Applications must have a public constructor.

jansupol commented 2 years ago

I feel more comfortable letting the impl choose to support non-public constructors. We may say it is non-portable between impls.

mkarg commented 2 years ago

So we could say: A portable application MUST have a public constructor. A compliant implementation MAY support non-public constructors in addition.

spericas commented 2 years ago

We should adopt the CDI rules assuming we turn Application subclasses into proper beans.