Best of JavaFebruary 2026

  1. 1
    Article
    Avatar of foojayioFoojay.io·8w

    A Visual Diff of Java’s Evolution: Inside java.evolved

    java.evolved is a community site that documents how common Java coding patterns have changed across language versions using side-by-side before/after examples. It targets developers working in mixed-era codebases (Java 6, 8, 17+) by showing how existing code would look if written with modern idioms. Examples include replacing verbose data classes with records, using pattern matching in instanceof checks, and leveraging switch expressions. The project is positioned as a practical reference for onboarding and code reviews in mature Java systems.

  2. 2
    Video
    Avatar of fknightForrestKnight·11w

    I Can't Believe Rust is Replacing Java

    XAI completely rewrote X's recommendation algorithm, replacing dozens of Java/Scala microservices with four Rust components and a Grok-based transformer. The old system used hand-engineered features and explicit weights across interconnected services, while the new architecture moves intelligence into an ML model with Rust handling orchestration. The shift addresses JVM garbage collection issues for sub-millisecond latency requirements and reflects a broader industry trend of using Rust for performance-critical infrastructure alongside AI-driven systems.

  3. 3
    Video
    Avatar of awesome-codingAwesome·9w

    Java’s biggest upgrade in decades

    Java is introducing null safety through Project Valhalla after 22 years, using null-restricted value types to maintain backward compatibility. The project also brings value objects and generic specialization, allowing Java to achieve C-like performance while preserving object-oriented features. These changes eliminate pointer chasing and enable memory-efficient data structures without breaking existing codebases. Despite newer languages offering built-in null safety, Java remains dominant in enterprise systems, with over 90% of Fortune 500 companies relying on it for critical operations.

  4. 4
    Video
    Avatar of primeagenThePrimeTime·9w

    Only 40 lines of code

    A 40-line code change in OpenJDK eliminated a 400x performance gap by replacing proc file reading with clock_gettime() for thread CPU time measurement. The old implementation opened proc files, parsed strings, and converted numbers back from text, spending 90% of time on file operations. The new approach uses a direct system call, reducing execution time from 11 microseconds to 279 nanoseconds. Flame graphs visualize the dramatic reduction in overhead, showing how most time was previously wasted on file handling rather than actual computation.

  5. 5
    Article
    Avatar of baeldungBaeldung·11w

    Why We Should Not Mock Collections With Mockito

    Mocking Java collections like List, Set, or Map with Mockito is an anti-pattern that leads to brittle tests and unrealistic behavior. Collections are deterministic data structures, not external dependencies requiring isolation. On Java 21+, mocking collections may fail due to stricter JVM instrumentation rules. Instead of mocking, use real collection instances in tests to create clearer, more maintainable tests that focus on observable behavior rather than implementation details. This approach exposes design issues and encourages better separation of concerns.

  6. 6
    Article
    Avatar of springSpring·8w

    Spring Boot 4.0.3 available now

    Spring Boot 4.0.3 has been released. This is a maintenance release in the 4.0.x line, available now from the Spring project at Broadcom.

  7. 7
    Article
    Avatar of jakartaeeJakarta EE·8w

    Will AI Kill Open Source?

    A human-written opinion piece arguing that AI will not kill open source software. The author contends that open source libraries provide verified, stable building blocks that AI should leverage rather than replace. The piece suggests AI could actually benefit from well-defined specifications and test suites — pointing to Jakarta EE as an example — and hints at a follow-up series exploring this relationship further.

  8. 8
    Article
    Avatar of springSpring·9w

    Spring Framework 7.0.5 Available Now

    Spring Framework 7.0.5 has been released. No further details are available from the content.

  9. 9
    Article
    Avatar of inside_javaInside Java·10w

    JDK 27: Removal of 'ThreadPoolExecutor.finalize()' – Inside.java

    JDK 27 will remove the empty `ThreadPoolExecutor.finalize()` method, which was deprecated for removal in JDK 18 as part of the broader effort to eliminate finalization. This removal creates a source-incompatible change: code calling `ThreadPoolExecutor.finalize()` directly or via `super.finalize()` will now implicitly call `Object.finalize()`, which throws `Throwable`, likely causing compile errors. Projects should remove finalize usage entirely, or as a workaround, wrap the invocation in a try-catch block.

  10. 10
    Article
    Avatar of springSpring·7w

    Moving beyond Strings in Spring Data

    Spring Data 2026.0.0-M1 introduces type-safe property paths as an alternative to string-based property references in queries. String-based references lack compiler validation and IDE refactoring support, causing bugs that only surface at runtime. The new approach uses Java method references (e.g., TypedPropertyPath.of(Person::getFirstName)) and Kotlin property references with operator overloads, providing compile-time validation, IDE navigation, and refactoring safety. Existing string-based APIs remain fully supported; type-safe paths are strictly additive and can be adopted incrementally. Method references are introspected once and cached for performance.

  11. 11
    Article
    Avatar of quarkusQuarkus·8w

    How Project Leyden brought a new perspective

    Project Leyden, which caches classes in a loaded and linked state to shift expensive startup work into a training phase, gave the Quarkus team a new lens for analyzing startup performance. By nearly eliminating class-loading noise from startup profiles, flamegraph analysis revealed previously hidden bottlenecks: runtime reflection-based compatibility layers in libraries like Netty and Vert.x, runtime annotation processing in Hibernate ORM, costly ServiceLoader lookups, expensive static initializers in UUID/BigDecimal/TimeZone, and classpath walks for non-existent resources. The team addressed several of these through bytecode rewriting, generating empty package-info classes, and class loader tricks. The post argues these lessons apply broadly across the Java ecosystem and previews deeper Leyden integration coming in Quarkus 3.32.

  12. 12
    Article
    Avatar of infoworldInfoWorld·8w

    JetBrains introduces Java to Kotlin converter for Visual Studio Code

    JetBrains has released a Java to Kotlin converter extension for Visual Studio Code, available on the VS Code Marketplace. The extension lets developers convert individual Java files to Kotlin via a context menu action, using the same conversion engine found in JetBrains IDEs combined with LLMs to produce idiomatic Kotlin output. It supports multiple LLM backends including GitHub Copilot, Ollama, and OpenRouter, and is designed to reduce manual effort when migrating legacy Java codebases or transitioning projects to Kotlin.

  13. 13
    Article
    Avatar of springSpring·8w

    Spring Boot 3.5.11 available now

    Spring Boot 3.5.11 has been released. This is a maintenance release in the 3.5.x line, available now from the Spring project under Broadcom.

  14. 14
    Article
    Avatar of freecodecampfreeCodeCamp·9w

    How to Build Your Own Circuit Breaker in Spring Boot – and Really Understand Resilience4j

    Learn how circuit breakers work by building one from scratch in Spring Boot. The tutorial walks through implementing a thread-safe state machine with explicit failure tracking, scheduler-driven recovery, and clear CLOSED/OPEN/HALF_OPEN transitions. Covers concurrency guarantees, failure classification, Spring integration via @Configuration, and when to use custom implementations versus Resilience4j. Includes complete working code with atomic counters, synchronized state transitions, and ScheduledExecutorService for time-based recovery.

  15. 15
    Article
    Avatar of baeldungBaeldung·7w

    Convert an InputStream to a DataHandler in Java

    When retrieving large files from a database in Java, loading the entire content as a byte array causes OutOfMemoryError. The solution is to implement a custom DataSource that wraps an InputStream, then pass it to a DataHandler constructor. This avoids loading all data into memory at once. The tutorial walks through creating an InputStreamDataSource class implementing the DataSource interface, using it to build a DataHandler, and optionally supporting dynamic MIME type specification. Note that since Java 11, the Java Activation Framework (javax.activation) must be added as an explicit dependency.

  16. 16
    Article
    Avatar of baeldungBaeldung·11w

    Set Datasource When Creating Hibernate SessionFactory in Java

    Hibernate's SessionFactory can be explicitly configured with a Spring-managed Datasource by disabling JPA auto-configuration and manually wiring the connection pool. This approach provides fine-grained control over Hibernate bootstrapping, useful for multi-database setups or custom ORM behavior. The tutorial demonstrates using StandardServiceRegistryBuilder to inject the Datasource, configuring Hibernate properties programmatically, and validating the setup with JUnit tests in a Spring Boot application.

  17. 17
    Article
    Avatar of lobstersLobsters·11w

    java sucks

    A detailed critique of Java from 1997-2000, written during the development of Mozilla's Grendel project. While praising Java's automatic memory management and superiority over C/C++, the author catalogs extensive frustrations with the language design (lack of closures, primitive types not being objects, broken finalization), the standard library (inadequate file I/O, missing utilities), and Sun's conflation of four distinct things under the Java name (language, library, VM, security model). The piece argues that Sun's insistence on bundling everything together hindered Java's adoption as a native-compiled language alternative to C++.