(Mis)using Java 16

Piotr Przybył
Software Gardener

Piotr Przybył is a notorious engineer at work and after hours, tracing meanders of the art of software engineering. Software Gardener, mostly working in web-oriented Java gardens. Programming usually in Java (since 1.3) and Scala. Fan of agility, seen mostly as choosing the right tools and approaches after asking the right questions. Lead developer, trainer, and conference speaker. In his talks, Piotr covers not only hardcore Java but also software architecture, computer security, and soft skills.

Java 16 is really awesome when it comes to "Hello, World!" programs.

It's also cool for sophisticated systems and algorithms, provided their authors write code that obeys a few fairly simple contracts and avoids obvious traps.

There are a few mantras regarding recent features of modern Java, such as:

* records can replace JavaBeans everywhere

* you never need to write `hashCode()` for records

* pattern matching with `instanceof` is the best tool for `equals()`

* just ignore`--illegal-access` and set it to `permit`

* `synchronize (new Long(42))` is the best for monitoring

and so on.

Please join this session to learn how harmful following such mantras can be and how to avoid some obvious misunderstandings about modern Java.