Home » Java » Page 20


Implementing equals(Object) with instanceof Pattern Matching

Pattern matching for the instanceof operator was introduced as a preview feature with JDK 14 and was finalized with JDK 16. Because instanceof pattern matching is finalized for JDK 16, it is not surprising to now see changes being made to the JDK to take advantage of pattern matching for the instanceof operator. These changes to the JDK to leverage ...

Read More »

New Java/JavaFX Library FXSkins Released

Hi, This time to announce a new Java / JavaFX library I’ve just released. It’s called FXSkins. FXSkins is a collection of new Skins for existing JavaFX controls. These Skins will add more functionality to the controls used in your applications with almost no need to make changes to your application’s code. This library is targeted for the most recent ...

Read More »

Coroutine based Spring boot webflux application

I have worked with Spring Framework for ages and it still manages to surprise me with how cutting edge it continues to be but at the same time enabling a developer to put together a fairly sane app. The most recent surprise was with how it enables programming a web application with Kotlin coroutines. Coroutines is a fairly complicated concept ...

Read More »

Testing the File Upload API in Spring Boot


In one of my previous post, I had created an API to upload file. In this post I will write a JUnit test to test the API. We will test the complete flow right from uploading till it is copied to the file system and then we will also see how to mock the FileService class so that the uploaded ...

Read More »

Open-source collaboration, or how we finally added merge-on-refresh to Apache Lucene

The open-source software movement is a clearly a powerful phenomenon. A diverse (in time, geography, interests, gender (hmm not really, not yet, hrmph), race, skills, use-cases, age, corporate employer, motivation, IDEs (or,Emacs (with all of its recursive parens)), operating system, …) group of passionate developers work together, using surprisingly primitive digital tooling and asynchronous communication channels, devoid of emotion and ...

Read More »

Always Name Your Thread Pools

Our software tends to use a lot of thread pools – mostly through java.util.concurrent.ExecutorService implementations (Created via Executors.new.... We create these for various async use-cases, and they can be seen all over the place. All of these executors have a thread factory. It’s hidden in the default factory method, but you can supply a thread factory. If not supplied, a ...

Read More »