Browsed by
Tag: java

Java 25: what’s new?

Java 25: what’s new?

Now that Java 25 is features complete (Rampdown Phase One at the day of writing), it’s time to walk through all the functionalities that bring to us, developers, this new version. This article is part of a series on what’s new on the last versions of Java, for those who wants to read the others, here are the links: Java 24, Java 23, Java 22, Java 21, Java 20, Java 19, Java 18, Java 17, Java 16, Java 15, Java…

Read More Read More

Creating a chatbot with Google Gemini Vertex AI and Quarkus

Creating a chatbot with Google Gemini Vertex AI and Quarkus

I recently created a Quarkus extension that provides access to Google Vertex AI. In this article, I’m going to use this extension to create a chatbot. The first step is to create a Quarkus project containing the REST and Google Cloud Vertex AI extensions. Here are the extensions to add to your dependency file: io.quarkiverse.googlecloudservices quarkus-google-cloud-vertex-ai io.quarkus quarkus-resteasy-reactive Or more simply, here is a link that will allow you to create a project from code.quarkus.io. The extension allows you to…

Read More Read More

Benchmark: concatenate lists

Benchmark: concatenate lists

Recently, I came across this piece of code that concatenates two lists using Guava’s Lists utility class and the Stream API: Lists.newArrayList(collectionOriginal,collectionValue) .stream() .flatMap(Collection::stream) .toList(); As this piece of code is in the hot path of the application and therefore called very frequently, I wondered if this was the best way to concatenate two lists. Two lists can be concatenated in many different ways: With the above code With Stream.concat() With Stream.of() With ListUtils from Apache Commons Collection With ArrayList.addAll()…

Read More Read More

Java: towards JVM integrity by default

Java: towards JVM integrity by default

This article first appeared in Programmez! Hors série #16 (in french only). The Java Virtual Machine (JVM) is an execution environment that enables programs written in Java (or other languages compiled into Java bytecode) to run on different operating systems and hardware architectures. From the begining, the JVM was designed to be dynamic: it can execute code not present at compile time by code hot-loading. It can also call native libraries, and supports numerous monitoring features. Java code can also…

Read More Read More

Java 24 : what’s new?

Java 24 : what’s new?

Now that Java 24 is features complete (Rampdown Phase One at the day of writing), it’s time to walk through all the functionalities that bring to us, developers, this new version. This article is part of a series on what’s new on the last versions of Java, for those who wants to read the others, here are the links: Java 23, Java 22, Java 21, Java 20, Java 19, Java 18, Java 17, Java 16, Java 15, Java 14, Java…

Read More Read More

jOOQ tip: don’t convert JSONB to a String

jOOQ tip: don’t convert JSONB to a String

A few weeks ago, while investigating possible performance improvements for Kestra‘s JDBC backend, I noticed that a method we were using to map an entity to be persisted in the database into its JSONB representation was taking up a lot of time in our CPU profiles. In the following flame graph, we can see that the JdbcQueue.map() method accounts for more than 21% of the samples and the Repository.map() method for 3.2% of the samples of a CPU profile obtained…

Read More Read More

Java 23 : what’s new?

Java 23 : what’s new?

Now that Java 23 is features complete (Rampdown Phase Two at the day of writing), it’s time to walk through all the functionalities that bring to us, developers, this new version. This article is part of a series on what’s new on the last versions of Java, for those who wants to read the others, here are the links: Java 22, Java 21, Java 20, Java 19, Java 18, Java 17, Java 16, Java 15, Java 14, Java 13, Java…

Read More Read More

Java 22: what’s new?

Java 22: what’s new?

Now that Java 22 is features complete (Rampdown Phase One at the day of writing), it’s time to walk through all the functionalities that bring to us, developers, this new version. This article is part of a series on what’s new on the last versions of Java, for those who wants to read the others, here are the links: Java 21, Java 20, Java 19, Java 18, Java 17, Java 16, Java 15, Java 14, Java 13, Java 12, Java…

Read More Read More

Java 21: what’s new ?

Java 21: what’s new ?

Now that Java 21 is features complete (Rampdown Phase Two at the day of writing), it’s time to walk through all the functionalities that bring to us, developers, this new version. This article is part of a series on what’s new on the last versions of Java, for those who wants to read the others, here are the links: Java 20, Java 19, Java 18, Java 17, Java 16, Java 15, Java 14, Java 13, Java 12, Java 11, Java 10, and Java…

Read More Read More