The Good, the Bad and the Ugly of Java API Design
summary
Live-coding shows concrete Java API replacements and how to use them: creating immutable collections with List.of / Set.of / Map.of and copyOf plus collectors to unmodifiable to avoid wrappers; inspecting stacks lazily with StackWalker with retain class references instead of Throwable.getStackTrace; managing OS processes with ProcessHandle.onExit returns CompletableFuture and startPipeline for piped processes; and an HTTP/2 client (HttpClient/HttpRequest/HttpResponse) versus HttpURLConnection. Examples include a local server on port 8000, jps/jps+grep pipelines, and measurable reductions in boilerplate and runtime overhead.
AI-written summary · about
chapters (5)
- 0:00Introduction to Java API design
- 15:57StackWalker API improvements
- 22:13Process API enhancements
- 34:05HTTP/2 client in Java 11
- 49:00Q&A and summary
related talks
49mThe Good, the Bad and the Ugly of Java API design
01h 05mJava 8: The Good, the Bad and the Ugly
01h 01mAPI Design with Java 8 Lambdas and Streams
43mLearning modern Java the playful way
27mModern Java API Design
46mStreams in JDK 8: The Good, the Bad, and the Ugly
01h 00mLatest Java Best Practices
49mJava 8: the good, the bad and the ugly
