Nowadays, new Java versions get released so fast that small things often get unnoticed and it turns out that Java 16 brought a new interesting…
Encapsulation and separation of internal components from public ones is probably one of the most underrated programming techniques when it comes to achieving long-lasting maintainability.
Luckily, Java features an underrated package-private visibility modifier which helps a lot in hiding unwanted implementation details. Unfortunately, if the number of internal classes is significant, it doesn’t scale well… luckily, ArchUnit is there for us.
In this article, we’ll revisit the CompletableFuture.applyToEither method and try to figure out a workaround for one of its issues.