On Wed, Jul 20, 2022 at 1:39 PM Karl Heinz Marbaise <khmarba...@gmx.de> wrote: > > Hi, > > On 20.07.22 13:04, Romain Manni-Bucau wrote:
> > So you run tests with java 17? This is not what you want if your prod is > > in java 8, you can still get surprises so you need toolchain in your > > build (same happen for compilation since bytecode is not 1-1, only > > signatures). > > First what kind of surprises? > > Second can you show an example of different bytes codes? > I'm not sure if this is what was being talked about or not, but I absolutely have seen multiple extremely obscure breakages from Java 8 to Java 9+. Three areas in particular have bitten me: 1. There's a particularly nasty problem I've hit a few times involving the change in return types somewhere in java.nio. The details escape me at the moment. I only recall that when I see a certain error message I should google it to recall what it is. I think this is an example: https://jira.mongodb.org/browse/JAVA-2559 2. sun.misc.Unsafe and some other widely used parts of the undocumented APIs 3. The Java Module system, particularly split packages. E.g. https://github.com/grpc/grpc-java/issues/3522 The Java 8 to Java 9+ transition is painful, and a lot of products have not made that shift. For instance, Google Cloud's externally facing libraries, the majority of which are built with Maven, all have to support Java 8. Last I checked many still supported Java 7. Maybe that will finally change this year. It was only with a huge amount of painstaking customer by customer effort that GCP dropped support for Java 6 a couple of years ago. Enterprise customers are extremely hesitant to upgrade. They often prefer to deploy a system once and never redeploy or change it ever after. Many insist on the bare minimum of absolutely necessary changes once they've got something working. I'm sure there are projects out there building on Java 17, but I personally have encountered zero of them. The projects I see on a daily basis are a mix of 8, 10, and 11 with an occasional Java 7 project hiding out somewhere in the depths of the enterprise or in a mobile app. -- Elliotte Rusty Harold elh...@ibiblio.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org