Tag
Java
7 articles
2026
Running Java in Codex Web
Fixing a build failure when running a Java (Gradle) repository in Codex Web, via a setup script configuration.
2024
A Gentle Tour of Java Optional for People Who Want to Understand It Better
Explaining what map/flatMap on Optional and Stream really mean, building toward the concept of a Functor from scratch.
Trying ForkJoinPool
Exploring how ForkJoinPool, the engine behind CompletableFuture and Stream's parallel processing, works by writing code with it.
About Optional
Framing Java's Optional as part of the lineage of Haskell's Maybe, and clarifying how to use it in line with its design intent.
Pitfalls of Collectors#toMap
Explaining why Collectors#toMap throws on duplicate keys when converting a Stream to a Map, and how to avoid it with a merge function.
Bean Validation @Pattern Specification
Explaining why ^ and $ are unnecessary in the regexp of Bean Validation's @Pattern annotation, debunking a commonly copied wrong example.
The Trap of Stream#toList()
A detailed look at the difference between Stream#toList() and Collectors.toList() in Java 16, and the trap of its immutable result.