Skip to main content

Java Parallel Streams: When They’re Slower (JMH Benchmarks and the Common Pool)

Java parallel streams measured on JDK 25 with JMH: a 100-element stream was 9.4x slower in parallel, an unsplittable source lost, ordered limit() cost several times more, and one blocked common pool slowed an unrelated stream 4x. Plus the parallel bugs that return wrong answers with no exception. Every number comes from committed output.

Matrix Programs in Java: Addition, Multiplication, Transpose, Spiral and Rotation

The five classic Java matrix programs on a plain int[][]: addition, multiplication, transpose, spiral order and 90-degree rotation, each with a diagram, a dry run and real JDK 25 output, plus six mistakes that lose marks (an unchanged transpose, a spiral that repeats numbers, a silent int overflow) and operation counts for the complexity question.

JWT Refresh Token Rotation in Spring Security 7 (With Reuse Detection)

Build refresh token rotation with token families and reuse detection on Spring Boot 4.1 and Spring Security 7.1. Opaque hashed tokens, a race-proof conditional UPDATE, a grace window, logout everywhere, and the access token that outlives logout, all run and captured.