Java Annotated Monthly – April 2023
Welcome to Java Annotated Monthly, your guide to the latest news, updates, and insights on exciting topics developers discuss in the community. This month’s issue is special as it introduces 2 crucial releases – Java 20 and IntelliJ IDEA 2023.1!
In the Java News section, you’ll find numerous articles devoted to the new features that JDK20 comes with. The authors try them out and share their thoughts on their potential usage.
As for IntelliJ IDEA 2023.1, the detailed blog post about the enhancements and newly added features is at the end in the And Finally… section.
Apart from these important announcements, we have scoured the web to bring you the most interesting and informative articles, tutorials, and videos on Java and other technologies.
So, sit back, relax, and enjoy this month’s edition.
JDK 20 and JDK 21: What We Know So Far – Java 20, the third non-LTS release, is available starting from March 21 and contains 7 major features: Scoped Values (Incubator), Foreign Function & Memory API (Second Preview), Virtual Threads (Second Preview), Structured Concurrency (Second Incubator), Vector API (Fifth Incubator), Record Patterns (Second Preview), and Pattern Matching for Switch (Fourth Preview). Java 21 is scheduled for a GA and next LTS release in September 2023 with 2 JEPs: String Templates (Preview) and Sequenced Collections.
Java 20 – Nicolai Parlog writes about the finalized improvements in security, performance, observability, and tools in JDK 20, and also takes a look at the fun part of the release – updated previews of foreign APIs, pattern matching, virtual threads, and structured concurrency plus new scoped values API. Finally, he explains the obstacles you can face when updating to Java 20.
Foojay Podcast #16: Welcome to Java 20! – This is your link if you prefer to learn about the new Java 20 features in a podcast. Frank Delporte is the host, and the guests are Simon Ritter and Miro Wengner.
JEP 430: String Templates (Preview) – Learn more about this JEP planned for JDK 21. String templates complement Java’s existing string literals and text blocks by coupling literal text with embedded expressions and processors to produce specialized results.
Java’s Collections Framework Gets a Makeover with New Sequenced Collection Types – The Sequenced Collections feature designed for JDK 21 is promoted from Candidate to Proposed to Target status. It introduces new interfaces to represent collections with a defined encounter order.
The Holy Grail of Java Performance – Inside Java Newscast #43 – In this video, you’ll look at the whitepaper by Mark Reinhold, the lead of Project Leyden, which aims to improve the startup time, time to peak performance, and footprint of Java programs.
JDK 20 Security Enhancements – Highlights of the Java 20 release include further improvements that strengthen the default security of the Java platform, improved crypto performance, and new JFR events for security monitoring. This article presents and explains the most crucial enhancements.
Java Tutorials and Tips
Finding Java Thread Leaks With JDK Flight Recorder and a Bit Of SQL – Gunnar Morling explains how JDK Flight Recorder, JDK Mission Control, and JFR Analytics help identify and fix thread leaks in your Java application.
Introduction to Java Encryption/Decryption – First, you’ll find out what cryptography and its standards in the JDK are. Then, you’ll find out how encryption and decryption work in Java and also get a list of useful links on this topic.
Tail Call Recursion in Java with ASM – Check out how to learn a neat way to implement tail call optimization in Java using bytecode manipulation with ASM.
How to Structure Modern Enterprise Java Projects – In this video, Sebastian Daschner shares his thoughts about avoiding over-engineered complex structures and finding a perfect approach to well-structured, modern, cloud-native Java projects.
Quiz yourself: Deserialization of Java enum types and records – Try this and other Java quizzes via a link in the article. What’s nice about these quizzes is that they include a detailed explanation of the correct answer.
Netflix on Java: How to build a 1TB Non-Heap, ultra-efficient application for video streaming – an example – Klaudiusz Wojtkowiak shares his source code of a simple POC application, which allows for the uploading and streaming of video files for many online users.
A Complete Guide on How to Convert InputStream to String In Java – Eden Allen gives step-by-step instructions on understanding Inputstream and converting it to String using Buffered Reader.
Event Driven Hello World Program – Peter Lawrey, a Java Champion and Oracle Code One alumnus, presents an outline for creating and testing straightforward, easily deployable, and maintainable microservices.
Pitfalls To Avoid When Switching To Virtual Threads – Java virtual thread is a new feature from JDK 19. It can potentially improve the application’s availability, throughput, and code quality while reducing memory consumption. But are there any possible pitfalls when switching from Java platform threads to virtual threads?
Optional in Java: A Swiss Army Knife for Handling Nulls and Improving Code Quality – Dealing with Nulls can be a nightmare as they may cause various problems in your code, from NullPointerExceptions to convoluted if statements and error-prone logic. Fortunately, the Optional class offers a simple and powerful way to handle nulls and improve code quality. Find out how in this article.
Web applications and Project Loom – From this blog post, we’ll discover what virtual threads mean for web applications using some simple web applications deployed on Apache Tomcat.
Java Serialization Filtering: Prevent 0-day Security Vulnerabilities – Shai Almog explains why serialization filtering when running a JVM deployment is an absolute must.
7 IntelliJ IDEA tricks that made my life easier – IntelliJ IDEA has numerous tricks to offer to increase your productivity. This article focuses on multiple selections, Regex, select and surround actions, and others. Read this article to learn more about them.
Comparing Map.of() and New HashMap() in Java – Between Map.of() and HashMap(), which should you use, and when? Find out in this article.
Getting Started with Eclipse Collections 1, 2, 3 – Donal Raab presents a comprehensive series of articles for those who use Eclipse Collection. The series covers downloading the library from Maven Central, creating new collections, adding and removing items from different collection types, and using converter methods to convert any RichIterable type to another Collection or Map type, and more.
Languages, Frameworks, Libraries, and Technologies
How to Best Use Java Records as DTOs in Spring Boot 3 – If you are ready to use Java Records as Data Transfer Objects (DTOs) for various database and API calls, see some examples in this article.
Getting started with Spring Security and Spring Boot – This article explores the
principles of Spring security, shows some common use cases, and ways to customize the configurations. A working code example accompanies the post.
Spring Tips: Vaadin Flow and Spring Boot 3 – Vaadin Flow library is updated for Spring Boot 3! Watch this talk to learn what it means.
Testing Spring Boot With Testcontainers – Looking for a better way to test your Spring Boot repositories? If yes, then this article is for you.
Spring Cloud – This article examines various Spring Cloud modules and ways to use them when building cloud-native applications.
A Bootiful Podcast: Spring Cloud Stream and Spring Cloud Function lead Oleg Zhurakousky – Oleg Zhurakousky, the lead of Spring Cloud Stream and Spring Cloud Function, talks about the latest and greatest in stream processing.
A Bootiful Podcast: Google Cloud Java Advocate Aaron Wanjala – The Google Cloud Java advocate Aaron Wanjala talks about the Spring Framework for Google Cloud.
Introduction to Spring Cloud Kubernetes – This article explores the various features of Spring Cloud Kubernetes. It also explains how this technology works and highlights its benefits.
The best way to use Spring Data query methods – In this article, you’ll see how to build Spring Data query methods and learn when you should use or avoid them.
gRPC on the client side – Follow the steps in this blog to build and test a simple gRPC service and find out how it benefits inter-service communication.
Writing a Profiler in 240 Lines of Pure Java – This blog post shows how to develop a profiler containing 240 lines of Java code.
Unlock the Power of Jakarta EE With These Awesome Resources! – Ondro Mihalyi shares the most helpful resources for getting started or becoming highly productive with Jakarta EE.
Keep Your Application Secrets Secret – This article helps you pick the best secrets manager, depending on your context.
Modern Mobile Development: Native vs. Cross-Platform – Sebastiano Poggi discusses the knowledge and tools necessary to choose between native and cross-platform mobile development.
How To Implement Video Information and Editing APIs in Java – In this article, you’ll learn how to implement 3 separate APIs designed to help you rapidly build and scale a video processing workflow with code.
Road to Quarkus 3: Bets on the Flow API for Mutiny 2.0, Updates to Jakarta Namespace and More – Max Rydahl Andersen, Quarkus co-lead and distinguished engineer at Red Hat, shares his knowledge about the project’s goals and current progress.
How To Do Code Reviews – Watch this comprehensive guide on code reviews to learn how to view them and run tests, and review code styles, test classes, version records, and detection.
The TLS Handshake Explained – Transport Layer Security (TLS) is the cryptographic protocol behind almost any computer network used today: from web browsing to email, APIs, and VoIP. But how exactly does it work? Find out in this article.
How Gradle Works: Inside the Daemon – This is the second article in the How Gradle Works series which explains what happens inside the Gradle Daemon JVM.
DevOps for Developers: Introduction & Version Control – Follow this new series by Shai Almog to learn more about the core principles and tools used by DevOps.
Open Machine Learning: ML Trends in Open Science and Open Source – Omar Sanseviero, a machine learning engineer with 7 years of experience, presents the trends in the ML ecosystem for Open Science and Open Source and talks about the power of creating interactive demos using Open Source libraries and BigScience.
Really useful 4 lines of Kotlin code (using inline class) – The article describes the benefits of a particular 4-line class primarily used for additional type safety.
Apply to Google Summer of Code – Kotlin Projects Available – Kotlin is taking part in Google Summer of Code (GSoC) for the first time! From this article, you can navigate to the submission guidelines.
Advanced Search and Filtering with JPA Specifications in Kotlin – Filtering an advanced API search can be challenging, particularly if you want to use multiple properties. The standard JPA Repository approach may not be flexible or easy to maintain. Fortunately, in this blog post, Tomasz Scharmach shows how to leverage JPA Specifications to overcome these issues.
The “suspend + receivers” style – The Arrow project promotes a specific style of Kotlin to achieve composability of effects. Alejandro Serrano Mena explains how this style works in Kotlin, compares it to other sibling languages, and discusses the main limitations.
Kotlin and JPA — a good match or a recipe for failure? – Using technologies like Kotlin and Hibernate together can be challenging for beginners. This article highlights some common pitfalls you should know and provides a broader perspective on their potential issues.
Kotlin DSL Goodies in Gradle 8.0 – Gradle’s Kotlin DSL provides an alternative syntax to the Groovy DSL with an enhanced editing experience in supported IDEs – superior content assistance, refactoring, documentation, and more. The details are in this article.
Application Development With Kotlin Flow – Kotlin’s built-in Flow feature offers a strong foundation for building concurrent applications. In this session, you’ll learn to create and run flows of gradually increasing complexity. Yury Ruchin demonstrates how cold flows differ from hot ones and explains the connection between flows and coroutines.
Graceful Resource Handling Using Structured Concurrency in Kotlin – Simon Vergauwen discusses Arrow’s Resource DSL.
Culture and Community
How the Micronaut team leverages Gradle’s version catalogs for improved developer productivity – In this blog post, you’ll explore how the Micronaut development team utilizes Gradle’s version catalogs to enhance developer productivity, minimize the risk of releasing faulty software, coordinate module releases, and more.
Conferences and Events
Backstage with the QCon London 2023 Programming Committee – Learn why QCon software conferences stand out from other events.
IntelliJ IDEA 2023.1 Is Out! – IntelliJ IDEA 2023.1 has numerous new UI enhancements based on your feedback. Moreover, we’ve made performance improvements that speed up Maven import and make IDE features available earlier when opening projects. More new features and updates are detailed in this blog post.
New UI Enhancements in IntelliJ IDEA 2023.1 – Based on your feedback we’ve been collecting since v2022.3, we’ve introduced some updates to our reworked UI. Have a look at what improvements IntelliJ IDEA 2023.1 delivers.
Getting started with IntelliJ IDEA – If you’ve ever experienced blank-page anxiety after installing IntelliJ IDEA, this article is for you. Helen Scott explains how to customize your IntelliJ IDEA environment, write, change, test, and navigate your first code, and more.
Data Modeling with Records – 5 Examples for Busy Developers – Learn how to use Records in real-life scenarios. Discover the best use cases and limitations that come with them.
That’s it for today!
To propose content for the upcoming release of Java Annotated Monthly, kindly reach out to us via email (JAM@jetbrains.com) or Twitter. Please keep in mind that articles need to be submitted by April 20.
Subscribe to Blog updates
Thanks, we've got you!
Java Annotated Monthly – December 2023
The December edition of Java Annotated Monthly is here! As usual, you’ll find all the latest Java and Kotlin updates as well as details of key industry events for networking and learning. This issue also features the latest release candidates and targeted JEPs alongside Java tutorials and articles a…
String Templates in Java – why should you care?
TLDR; The existing String concatenation options are difficult to work with and could be error prone. String Templates (a preview feature introduced in Java 21) greatly improves how we create strings in Java by merging constant strings with variable values. The name of this feature pretty much says …
Java Annotated Monthly – November 2023
Welcome to the Java Annotated Monthly – November 2023! As the Java world keeps on spinning, we've gathered a treasure trove of articles, talks, and insights to warm your Java developers’ hearts. This month's edition features a delightful blend of the latest technological advancements and the ever…
Java Annotated Monthly – October 2023
Welcome to the October edition of Java Annotated Monthly! In this issue, we're plunging into the world of Java and tech. We'll explore the latest and greatest in the recent release of Java 21, share exciting news about the new EAP for IntelliJ IDEA 2023.3, and bring you a handpicked selection of …