Twelve things I learned about Java during my last code review

This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).

A developer with a .NET background shares 12 practical lessons learned from a community code review of a Java Event Sourcing sample built with Spring Boot and Java 17. Key takeaways include: Optional should only be used as a return type, not a parameter; sealed interfaces enable union-type-style modelling; Spring Boot's built-in ApplicationEventPublisher eliminates the need for custom in-memory event buses; checked vs. unchecked exceptions and when to use each; using @ControllerAdvice for global exception handling; Spring Retry for subscription restarts and long-polling; and running real integration tests with Docker in CI. The review resulted in 143 comments, 47 commits, and changes across 80 files.

8m read timeFrom event-driven.io
Post cover image