Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [rest-dev] Drop Minimum Java Requirement to Java 17



On Mon, Dec 18, 2023 at 11:23 PM Arjan Tijms <arjan.tijms@xxxxxxxxxxx> wrote:
Hi,

On Mon, 18 Dec 2023 at 18:16, Alessio Soldano <asoldano@xxxxxxxxxx> wrote:
 again I think the specification should be inclusive.

I'm not so sure about that. I think specifications should be strict (tightly specified, rigid) and definitely not being inclusive. Being inclusive has always led to problems. Yes, it sounds nice, but it really is not so nice.

Imagine an API that takes an Object as parameter, since we want the API to be inclusive to all kinds of objects. Maybe an HTTPRequest, maybe an EJBInvocation, maybe a RestRequest. Say that the method returns roles. Since we want to be inclusive again, they may actually be groups (and not roles at all), or mapped roles, or application roles, or local servlet roles. We don't specify any of it, since we want to be inclusive to all kinds of roles.

Eventually we end up with something that has so many gaps, we can't reasonably use it in practice.

Specifically here, "which might happen to require Java 21", means nothing to a library vendor. I can't create a component for Jakarta REST 4.0 using Java 21, if all the specification says that there may be implementations that happen to require Java 21.

I don't think the Jakarta REST specification should be saying anything like that explicitly; it would simply be stated that the minimum requirement is Java 17.

 
I want the guarantee that my component for Jakarta REST 4.0 works on all compatible implementations of Jakarta REST 4.0. Therefore I have to resort to the lowest common denominator, and therefore I can't use Java 21, even if my code would greatly benefit from it.

I'm possibly not following you here, sorry (I'm not trying to convince anyone, really just following your reasoning). Is requiring Java 17 or greater (for something that does not need more than that) equal to saying there will be implementations which do not support Java 21? To me, it's more like Jakarta REST 4.0 spec is not going to be the element enforcing Java 21 requirement on final user applications (other specs might, instead), even if I would personally expect all implementations will actually work fine with 21 as well. Actually, I think I've read above that JDK21 is going to be the JDK to use for running the TCK, so support for 21 will be implied.

Regards

 

Kind regards,
Arjan Tijms





 

Regards


 

Kind regards,
Arjan Tijms



--

Alessio Soldano

Manager, Software Engineering 

Red Hat




--

Alessio Soldano

Manager, Software Engineering 

Red Hat



Back to the top