3 ms·
> The slow rate of change is arguably the biggest selling point for Java. Unfortunately, since Java 9 the rate of change seems to have increased a lot. > You
by cesarb 3y ago
> The slow rate of change is arguably the biggest selling point for Java.
Unfortunately, since Java 9 the rate of change seems to have increased a lot.
> You don't need to waste time on language churn, can spend the entire time building stuff instead.
In my experience, every time you upgrade to a new Java LTS, either something breaks or a library you depend on is incompatible with that Java LTS, and you have to waste some time fixing the breakage (the most recent one I saw: latest Mockito is incompatible with Java 21, unless you set a magic system property).
- lbalazscs 3y agoThe latest Mockito works with Java 21; you'll just see a warning about the usage of the bytebuddy agent. In the future, you'll need to explicitly approve the loading of agents (you can call it "magic"), which will improve the security of your programs.
- cesarb 3y ago> The latest Mockito works with Java 21 That was not the case a couple of days ago when I last looked; I see now that they released Mockito 5.7.0 two days ago, which probably fixes this issue. But that still shows my point: for every new Java LTS, you have to either fix some breakage, or update some library you depend on to a new version (which might then require further changes to your code, or even dropping compatibility with some older Java LTS). Edit: I just tried with the latest Mockito (5.7.0), and it still gave me the same "Java 21 (65) is not supported by the current version" error, when run without the magic system property. It seems something else earlier in the dependencies had a dependency on an older release of byte-buddy, so I will have to manually upgrade byte-buddy, and hope that it doesn't break that earlier dependency.
- marginalia_nu 3y agoI haven't really experienced this. I'm on Java 21 and haven't had any problems with Mockito what so ever. I needed to bump the version of guice, but beyond that it was a very smooth transition.
- krzyk 3y agoYou have to update dependencies that depend on bytecode, like ASM, bytebuddy or aspectj. Those deps upgrades in 99% cases don't break the library that uses them. I upgraded to JDK 21 on the day of release and haven't had issues with mockito (or spring, hibernate, junit, etc.)
- krzyk 3y ago> Unfortunately, since Java 9 the rate of change seems to have increased a lot. Since Java 9, they don't introduce changes, they introduce new features which is a bit different. IT is a field that (should) attract people that are for fast paced environments, not old school slow-to-innovate industries.
- samus 3y agoSince Java 9, new features are finally coming again. However, the ecosystem had gotten reliant on certain JDK internals being accessible and stable, while in fact they were neither. That will require some more years to properly transition over. The only feature that really got obsoleted is the Security Manager and the underscore variable name. Primitive wrapper class constructors are on the chopping block next. Most other things are merely being restricted to harden the platform, with ample time to prepare. Edit: LTS hopping is probably an unwise strategy as one will harvest only disadvantages: few updates, no performance improvements, no new features, and complicated migrations when it is time to upgrade. One best upgrades as soon as the new version becomes available (as people did before Java 8) or stays on LTS until the software is retired.