Hello world! 👋 👋 👋 We are Tinkoff Java developers: Constantine, Andrey and Arseniy. We collect interesting news, articles, tutorials, and other materials from the world of Java development, and we decided to share it not only with our colleagues, but also with the entire community.
Featured News
Build 33 early version of JDK 22 was available last week and contains updates from Build 32 with fixes for various issues. For JDK 23 and JDK 22, developers are encouraged to report bugs through the Java Bug Database.
A vulnerability in the Spring Framework. The Spring Framework team stated that versions 6.1.3 and 6.0.16, released on January 11, 2024, fix the CVE-2024-22233 vulnerability, known as the Spring Framework Server Web DoS vulnerability. It allows an attacker to send a specially crafted HTTP request that can cause a denial-of-service condition if the application is using Spring MVC and Spring Security 6.1.6+ or 6.2.1+ is present in the class search path.
The Micronaut Foundation has released version 4.2.4 of the Micronaut framework. The new version contains Micronaut Core 4.2.4, bug fixes, dependency and module updates: Micronaut AWS, Micronaut Flyway, Micronaut JAX-RS, Micronaut JMS, Micronaut MicroStream, Micronaut MQTT and Micronaut Servlet.
Quality Outreach Heads-up – Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal in a Future Release. Text about the intention to remove memory access methods in the sun.misc.Unsafe class in future versions of Java. This is due to the increased focus on ensuring the integrity of the Java platform. Deprecate is planned to be made in the JEP Draft.
Hibernate Reactive 2.2.2.Final Released updates dependencies to Hibernate ORM 6.4.2.Final, Remove unused code and new annotations @EnableFor and @DisabledFor for enabling and disabling tests for database types. The second alpha release of Hibernate Search 7.1.0 offers compatibility with Hibernate ORM 6.4.2.Final, Lucene 9.9.1 and Elasticsearch 8.12, integration of Elasticsearch/OpenSearch vector search capabilities, and information about the capabilities of each field when analyzing the metamodel.
JEP 455: Primitive Types in Patterns, instanceof, and switch is directed in JDK 23.
JEP adds pattern-matching with primitive types to Patterns, instanceof, and switch. This feature is in preview in JDK 23.
Maxim Shafirov is stepping down as CEO of JetBrains. He will be replaced by Kirill Skrygan, who headed the IntelliJ department, and during his time at the company, he also led the Code With Me and Rider projects.
Interesting Videos
Kirill Danilov — FPS: How We Provide “Fast and Reliable” and Why We Accelerated Reports by 5000 Times. The report is more about the FPS architecture than about Java. It gives a good idea of how a high-load system with 99.99% availability requirements can be arranged, what decisions need to be made during design, what difficulties may arise and how to solve them.
Java’s Plans for 2024 – Inside Java Newscast #61. In the last issue, there was a video about what was added to Java in 2023. And this is about what may appear in 2024. Nikolai talks about projects such as Babylon, Loom, Leyden, Valhalla, Amber, Panama and Lilliput. Which features are expected this year, and which ones will have to wait longer.
The Panama Effect – Inside Java Podcast 32. The Foreign Function & Memory API will be completed in JDK 22 and will help integrate native code into a Java program. With the new API, you can efficiently call code outside the JVM, securely access non-JVM-managed memory, call native libraries, and process native data without the fragility and danger of JNI. Anna’s guest in this episode is Jorn Vernee, one of the main developers and maintainers of the Foreign Function & Memory API.
Useful articles
Tutorial: JWebserver – Launch the Java Simple Web Server. JwebServer is a JDK tool that provides a minimal HTTP server. This server can be used for prototyping, testing, and debugging. The tool works only with static files and looks at one directory hierarchy via the HTTP/1.1 protocol, dynamic content and other versions of HTTP are not supported.
Writing a Java Inspection for IntelliJ IDEA Using AI Assistant. IntelliJ IDEA AI Assistant Writes Java Code Inspections for IntelliJ IDEA Itself. Tagir Valeev details the process of implementing a simple inspection (int)($VAR$^$VAR$< << 32) => Long.hashCode($VAR$) using the code generation by the AI assistant and concludes that while the AI Unable to generate production-ready code. For example, the AI wasn’t embarrassed by the fact that Java doesn’t have a <<< operator, it’s just a typo. Although such an assistant will not write code for you, it will definitely save you time when writing it.
(Semantic) Versioning your Java libraries. The semantic scheme of versioning Java libraries has long been a standard. It is simple and intuitive. But many may have come across the fact that the patch version allegedly contains backwards incompatible changes. The author has written a maven plugin that automatically checks the changes made and suggests which part of the version number needs to be updated.
Project Loom. Not just virtual threads. An interesting note on some of the technical details of virtual threads and the use cases for their internal APIs.
Creating and using a BOM in Gradle. In a simple and understandable way, our regular contributor @IvanVakhrushev told us what BOM is and why we need it. Provides an example of how to create a PTO in Gradle, and how to resolve conflicts in dependency versions.
Project Valhalla: An epic Java quest behind the performance. A small but very entertaining article about primitive objects from Project Valhalla, which give greater locality of memory, and as a result, greater performance. The story is supported by benchmarks for sorting and calculating the sum of primitives.
How we started using Java 21 virtual threads and got a one-two deadlock in TPC-C for PostgreSQL. An article about Yandex’s experience in the transition to virtual streams, telling how poorly they work together with synchronized. And also that even if you are sure that your code will work fine, some synchronized one that is deep in a third-party library can spoil your life.
How to use the Java CountDownLatch. A small article from Vlad Mihalcea, which may be useful for beginners. This time, the author is not talking about data safety, but about synchronizing streams in Java using CountDownLatch.
How do I load classes in Java 8 and Java 9+? A great material useful for those who want to deepen their knowledge of the topic of loading classes in Java. This article discusses how booting worked up to and including Java 8, and then discusses the changes that came with the advent of modularity in Java 9.
Java ScopedValue – scoped values, which serve as an alternative to thread local variables in Project Loom. Their APIs are reviewed and compared, as well as implementation details.
Plugin for analyzing PostgreSQL plans in the JetBrains IDE and its development. Tensor, which is used to analyze postgresql query plans, can now be plugged in as a plugin for Jetbrains IDEs. In addition to this news, the article describes the development of the plugin step by step, which may be of interest to those who wanted to learn more about this topic.
Curious Podcasts
Javaswag – #55 – Dmitry Tikhomirov – J2CL and Java to Javascript compilation, GWT and open source to Redhat Type episode Kind page. Dmitry talks about his experience with J2CL, a tool for compiling Java code into Javascript. In addition to the tool itself, we discussed analogues like Kotlin Multiplatform and cases of using such tools.
Java Events
FOSDEM Conference 2024 was held on February 3-4. There was a separate Java track at the conference, where the current state of OpenJDK, the Liliput project, and the steps that are needed to make the Loom project better and more stable were discussed. We talked about the intricacies of working with JFR, both in JDK and in GraalVM.
Thank you @rudikone and @IvanVakhrushev for your help in gathering materials! Thank you to the readers for motivating them to look for interesting and important things. Stay tuned to the comments with feedback, see you in a month 😉
Send Us Your Materials, if you come across something interesting – we will publish it in the next issue!
———-
Acknowledgement and Usage Notice
The editorial team at TechBurst Magazine acknowledges the invaluable contribution of Андрей Орлов the author of the original article that forms the foundation of our publication. We sincerely appreciate the author’s work. All images in this publication are sourced directly from the original article, where a reference to the author’s profile is provided as well. This publication respects the author’s rights and enhances the visibility of their original work. If there are any concerns or the author wishes to discuss this matter further, we welcome an open dialogue to address potential issues and find an amicable resolution. Feel free to contact us through the ‘Contact Us’ section; the link is available in the website footer.