News Grab Bag: Loom Virtual Threads, Lilliput, Pattern Matching, ... - Inside Java Newscast #25

Project Loom's virtual threads are merged and ship with JDK 19 - here's to prepare for them. Also, news on Project Lilliput, proposal for record patterns in pattern matching, some astonishing numbers from Sonatype on Maven Central, and the move of OpenJDK to openjdk.org. | Continue reading


@nipafx.dev | 2 years ago

when And null In Pattern Matching - Inside Java Newscast #24

JEP 427 proposes two changes to pattern matching in switch: 1. Guarded patterns, which belonged to patterns, are replaced with when clauses, which belong to the case. 2. null needs to be handled by a specific case null. | Continue reading


@nipafx.dev | 2 years ago

How To Use switch In Modern Java

Since Java 14 introduced switch expressions, using switch isn't as straight-forward as it used to be: colons or arrows, statement or expression, labels or patterns? Here's how to best use switch in modern Java. | Continue reading


@nipafx.dev | 2 years ago

Virtual Thread Deep Dive - Inside Java Newscast #23

Now that Project Loom's JEP 425 officially proposes virtual threads, it's time to take a close look at them: scheduling and memory management; mounting, unmounting, capturing, and pinning; observability; and and what you can do for optimal scalability - this episode has (almost) … | Continue reading


@nipafx.dev | 2 years ago

All About JDK 18 - Inside Java Newscast #21

Refinements in pattern matching and Panama's foreign and vector APIs; a new command jwebserver and a new IP address resolution SPI; preparing code for UTF-8 becoming the default character set and for the eventual removal of finalization; and a few more bits and pieces. | Continue reading


@nipafx.dev | 2 years ago

Modern Java - Ask Me Anything

New language features, API additions, and JVM improvements; projects Amber, Loom, Panama, and Valhalla; shorter release cadence and free Oracle JDK - there's a lot going on in modern Java. I'll do my best to answer all your questions about it. | Continue reading


@nipafx.dev | 2 years ago

State of Pattern Matching with Brian Goetz

Conversation with Project Amber lead Brian Goetz about pattern matching in Java: Why Map::get should be a pattern, the linear thinking trap and how it impacts null handling in pattern matched, exhaustiveness in switch statements and the rehabilitation of switch. | Continue reading


@nipafx.dev | 2 years ago

Compiled And Tested Code In Javadoc - Inside Java Newscast #20

Short code snippets in Javadoc are a great way to document an API, but they're brittle. JDK 18 / JEP 413 solves that problem by allowing us to reference snippets from external files that are compiled and tested. | Continue reading


@nipafx.dev | 2 years ago

Configuring Maven For Compiled And Tested Code In Javadoc

For JDK 18's / JEP 413's embedded snippets to be compiled and tested by your Maven build, they need to be added to a source set, Surefire needs to pick them up, and Javadoc needs to know their location - here's how to do that. | Continue reading


@nipafx.dev | 2 years ago

More Opinions On Optional

How much work is it to wrap Optional? Do you need to null-check Optional arguments? What about serializability and framework support? And why consider the type in the first place? Answers in here! | Continue reading


@nipafx.dev | 2 years ago

Where to use Optional - Inside Java Newscast #19

Is it ok to use Optional as parameter type? Overloading is an alternative, but how well does it stack up? Thoughts on this question (and other Optional-related ones) can usually be put into one of three (and a half) categories. | Continue reading


@nipafx.dev | 2 years ago

Java's Plans for 2022

An update on Java's four key projects: Valhalla, Panama, Loom, and Amber - what they're about, where they are right now, and what their plans are for 2022 and beyond. | Continue reading


@nipafx.dev | 2 years ago

Java's Plans for 2022 - Inside Java Newscast #18

An update on Java's four key projects: Valhalla, Panama, Loom, and Amber - what they're about, where they are right now, and what their plans are for 2022 and beyond. | Continue reading


@nipafx.dev | 2 years ago

Project Loom Brings Structured Concurrency - Inside Java Newscast #17

Project Loom aims to bring structured concurrency to Java, a concept that compares to "regular" concurrency like structured programming compares to GOTO-programming - let's dip our toes into this new concept. Also: JDK 18 feature freeze, JDK migration guide, and nifty things to d … | Continue reading


@nipafx.dev | 2 years ago

What Happens to Finalization in JDK 18? - Inside Java Newscast #15

Finalization was part of Java from day one to help developers manage resources but it turns out that it's really not good at that. Here's why and what's gonna happen next. Also, reflection and method handles. | Continue reading


@nipafx.dev | 2 years ago

Java Next

From Amber to Loom, from Panama to Valhalla - the four big projects are entering the home stretch. Time to take a closer look at how they will improve Java. | Continue reading


@nipafx.dev | 2 years ago

11 Tricks From dev.java - Inside Java Newscast #14

From compact record constructors to boolean expressions in pattern matching, from generic wildcards to chaining predicates and comparators, from jpackage to jlink - here are 11 Java tricks handpicked from dev.java. | Continue reading


@nipafx.dev | 2 years ago

Better Random Number Generation in Java 17

Java 17 expands the API for random number generation to make it more usable, extensible, and robust with RandomGenerator and RandomGeneratorFactory at its core. | Continue reading


@nipafx.dev | 2 years ago

Faster LTS and free JDK with Java 17 - Inside Java Newscast #12

Java 17 comes with more than just new features. A faster LTS cadence and free Oracle JDK make this the best-supported modern release ever. | Continue reading


@nipafx.dev | 2 years ago

Better Random Number Generation in Java 17

Java 17 expands the API for random number generation to make it more usable, extensible, and robust with RandomGenerator and RandomGeneratorFactory at its core. | Continue reading


@nipafx.dev | 2 years ago

The State of Project Valhalla with Brian Goetz

Conversation with Project Valhalla lead Brian Goetz about Java's original sin, unifying the type system, expanding generics, current work, the project timeline, and more. | Continue reading


@nipafx.dev | 2 years ago

Fast and Secure Inter-process Communication on JDK 16 - Inside Java Newscast #11

JDK 16's socket channel / server-socket channel API can use Unix domain sockets for faster and more secure inter-process communication on the same host - also: JDK 17 final release candidate and Oracle Developer Live | Continue reading


@nipafx.dev | 2 years ago

Random Numbers and JDK Flight Recorder - Inside Java Newscast #9

The new API for random number generation in Java 17 - why it needed to change and how the new API is more usable, extensible, and robust - and how to get started with JDK Flight Recorder, particularly on Java 16. | Continue reading


@nipafx.dev | 2 years ago

Incremental Evolution, Pattern Switches vs Visitor Pattern, and Wayland Support - Inside Java Newscast #8

How the six-month release cadence enabled a more incremental evolution of the Java platform and how pattern switches and sealed classes are an alternative to the visitor pattern. Also, maybe Wayland support for Java. | Continue reading


@nipafx.dev | 2 years ago

Visitor Pattern Considered Pointless - Use Pattern Switches Instead

In modern Java, the visitor pattern is no longer needed. Using sealed types and switches with pattern matching achieves the same goals with less code and less complexity. | Continue reading


@nipafx.dev | 2 years ago

Handling null and Upgrading Past Java 8 - Inside Java Newscast #7

Dealing with null is never fun, so in this newscast, I explain how to best handle it, what tools can do, and how recent and upcoming language changes help dealing with it. I'll also look at a recent blog post about how Netflix upgraded from Java 8 to 16. | Continue reading


@nipafx.dev | 2 years ago

The State of Project Panama with Maurizio Cimadamore

Conversation with Project Panama lead Maurizio Cimadamore about the project's core mission, the split into foreign-memory access and foreign linker APIs, jextract, performance, interaction with Project Valhalla, the timeline, and more. | Continue reading


@nipafx.dev | 2 years ago

Java Modules in Real Life

Advice on why, when, when not, and how to use Java modules in real life for your projects | Continue reading


@nipafx.dev | 2 years ago

The State of Project Loom with Ron Pressler

Conversation with Project Loom lead Ron Pressler about the project's core mission, challenges like interaction with debuggers and garbage collectors, the timeline for the next steps, compatibility and more. | Continue reading


@nipafx.dev | 2 years ago

Java 17: Features and Development - Inside Java Newscast #6

Java 17, the next long-term support release, enters feature freeze and the release preparations begin today (June 10th). A good time to take a closer look at the list of JEPs as well as the development process. | Continue reading


@nipafx.dev | 2 years ago

Pattern Matching in Switches and Security Manager Deprecation - Inside Java Newscast #5

JEP 406, which is a candidate for Java 17, introduced pattern matching in switch statements and expressions, introduces guarded patterns, and improves null handling. Then we need to talk about JEP 411's deprecation of the security manager. | Continue reading


@nipafx.dev | 2 years ago

26 Hours of Java

On May 29th we'll throw a late birthday party for Java, which turned 26 a few days before. With a 26-hour live stream relay race! 🥳 | Continue reading


@nipafx.dev | 3 years ago

5 Secret Java API Tricks and Record Semantics - Inside Java Newscast #4

Five nifty Java API features that you need to know (and many more in the linked thread) and a quick explanation why Java records are not about reducing boilerplate. | Continue reading


@nipafx.dev | 3 years ago

Why Java's Records Are Better* Than Lombok's Data and Kotlin's Data Classes

While all three remove boilerplate, the similarities don't go much further. Records have stronger semantics with important downstream benefits, which makes them better*. (* not always; depends on circumstances; excuse the clickbait) | Continue reading


@nipafx.dev | 3 years ago

Why Java's Records Are Better* Than Lombok's @Data and Kotlin's Data Classes

While all three remove boilerplate, the similarities don't go much further. Records have stronger semantics with important downstream benefits, which makes them better*. (* not always; depends on circumstances; excuse the clickbait) | Continue reading


@nipafx.dev | 3 years ago

Why Don't They Just... ?! The Deliberations Behind Evolving Java

There are many nifty features that Java could have but doesn't. Somewhat surprisingly, there are reasons for that and in this talk I'll discuss those for a few concrete cases as well as the deliberations behind such decisions. | Continue reading


@nipafx.dev | 3 years ago

JUnit Pioneer - An Exploratory Mission to Jupiter And Beyond

From growing a community on Twitch to strong documentation, from squashing commits to one-click releases - this presentation covers JUnit Pioneer in all detail | Continue reading


@nipafx.dev | 3 years ago

Quicker Java and JDK 16 compatibility - Inside Java Newscast #3

A walk through language features, APIs, and JDK capabilities that make Java quicker to use with less ceremony and more immediate results. Also, a rundown of some of the projects with all tests green on JDK 16. | Continue reading


@nipafx.dev | 3 years ago

Java Generics III - Wildcards

Second part of a short series on Java Generics - this one explains generics. ? extends Number - that kinda thing. | Continue reading


@nipafx.dev | 3 years ago

Java Generics II - Bounded Type Parameters

Second part of a short series on Java generics - this one explains bounded type parameters. T extends Number - that kinda thing. | Continue reading


@nipafx.dev | 3 years ago

Vector API, Record Serialization, And Java 17 Release Schedule - Inside Java Newscast #2

Short introduction to the Vector API (incubating in JDK 16) and an update on serializing records. Also, a quick mention of JEP 356 in JDK 17 and the proposed release schedule. | Continue reading


@nipafx.dev | 3 years ago

Java Modules Cheat Sheet

A cheat sheet for building and running Java modules from the command line with `javac`, `jar`, and `java` | Continue reading


@nipafx.dev | 3 years ago