eclipse-ee4j / jersey

Eclipse Jersey Project - Read our Wiki:
https://github.com/eclipse-ee4j/jersey/wiki
Other
692 stars 355 forks source link

Jersey 2: Relax ParamConverters constructor visibility to public #5791

Closed Spikhalskiy closed 1 day ago

Spikhalskiy commented 6 days ago

PR https://github.com/eclipse-ee4j/jersey/pull/5349 changed the visibility of default ParamConverter constructors in Jersey 2.40+ to private. For example: https://github.com/eclipse-ee4j/jersey/pull/5349/files#diff-739aa86c923eab6eead201b6b5da407758e6786b49473e9fd8507e0a172427c2R269

Our project extends default ParamConverters to handle custom encryption and correspondent annotations and 2.40 breaks this ability for us. The only workaround I see would be to copy-paste all the default implementations to our project, which I would love to avoid, or to use reflection to open up the constructors.

Looking at the PR, closing up the constructors doesn't seem to be the objective and this compatibility break is more of an unintended side effect. Constructors of OptionalCustomProvider and OptionalProvider are also left open, as the added fuature didn't touch them.

Could these constructors be opened up back and made public?

senivam commented 6 days ago

notice - it is not a good practice to rely on classes located in the **.internal.** or **.innate.** packages because they are subject to change without any prior notice or keeping of the backward compatibility.

Spikhalskiy commented 6 days ago

Completely fair and we are ready to deal with changes in the internal packages. I’m not saying that the change in the PR is breaking a public API.

We still want to just slightly “decorate” the standard Jersey implantation instead of copy-pasting / reimplementing it.

So it would be nice to hear a take on making the constructors of these internal classes back open.