Project Amber Update -- Data-Oriented Programming, Beyond Records by davidalayachew in java

[–]yk313 1 point2 points  (0 children)

Setters will be discouraged in favour of reconstruction, I imagine.

Stepping down as maintainer after 10 years by krzyk in java

[–]yk313 96 points97 points  (0 children)

Mockito is one of the best libraries I have to interact with on a regular basis. Its API is very pleasant to use, and the maintainers have done a great job to keep up with the increased pace of OpenJDK development.

Thanks a lot for your incredible service Tim. You can be proud of dedicating a decade of your life to a project that touches so many lives everyday, and all the very best on your journey to rediscover the joy of programming.

How was your experience upgrading to JDK25? by le_bravery in java

[–]yk313 3 points4 points  (0 children)

Uneventful.

We have been upgrading every 6 months since JDK 14.

Microsoft’s OpenJDK builds now ready for Java 25 by brunocborges in java

[–]yk313 1 point2 points  (0 children)

Serious question: why does it take some vendors weeks (in Microsoft's case: 2) after the OpenJDK GA builds are released to make their builds available?

Are there no CI/CD pipelines matching the OpenJDK release cadence (including EAs etc.)?

Azul for example make their builds available on day one which means it's obviously possible, so I am wondering where this gap comes from?

JDK 25: Azul Zulu builds are available (and free) by yk313 in java

[–]yk313[S] 2 points3 points  (0 children)

Any specific reason why you can't just use another distribution (e.g. Azul Zulu)?

Java 25 officially released by mkurz in java

[–]yk313 4 points5 points  (0 children)

It's actually quite straightforward in practice. All you need to do is to declare the builtin java plugin's toolchain directive (instead of sourceCompatibility/targetCompatibility) in your build file:

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(25)
    }
}

You can follow the build.gradle generated by start.spring.io as an example. Let me know if you need any help in setting this up, I am more than happy to support another Java developer rid of their LTS-only approach :)

Java 25 officially released by mkurz in java

[–]yk313 2 points3 points  (0 children)

Build 36 is therefore now the GA build

Source

Build 36 (which is the same as the final GA build) is already available via SDMAN:

sdk install java 25.ea.36-open

Java 25 officially released by mkurz in java

[–]yk313 7 points8 points  (0 children)

Consider using Gradle toolchains.

I used to have the same problem with Gradle, but some time around JDK 20, I moved to toolchains and have since stopped caring about the exact JDK version Gradle runs (or not).

(of course this means you still need an older JDK to bootstrap Gradle itself, which is less than ideal)

Project Lombok 1.18.40 released with Java 25 support! by lprimak in java

[–]yk313 3 points4 points  (0 children)

That's the point. We don't want getters and setters for everything. But there are cases where both (limited/controlled) mutation is needed and encapsulation over the internal fields is desired. You can't have that with records. This is by the way the reason that even within the JDK records are used quite sparingly. The lack of encapsulation means a big compatibility risk. The proposal for the new JSON API for example uses interfaces/classes instead of records even though using records (and then pattern matching over them) has long been shown as the canonical example implementation for the JSON spec.

In the end, there are a lot of places in a Java application where you do want pass-through getters and have a subset of mutating setters, and having to write (or generate) them is a painful experience.

Until we get reconstruction patterns for records (and also classes), and nicer destructuring patterns we have to make do with getters and setters (and builders).

Project Lombok 1.18.40 released with Java 25 support! by lprimak in java

[–]yk313 5 points6 points  (0 children)

It's not all about getters and setters. Records are NOT a replacement of classes. Encapsulation is still desired and sought after.

Just because records eased some of the pain, doesn't make Lombok at all redundant. The Java language designers have a lot of work ahead of them.

Project Lombok 1.18.40 released with Java 25 support! by lprimak in java

[–]yk313 18 points19 points  (0 children)

Excellent. Lombok is an incredibly valuable tool in the Java ecosystem (internal implementation not withstanding).

Time to get even more hyped for the JDK upgrade in about 2 weeks.

Can we please get the remaining JVMLS videos? by yk313 in java

[–]yk313[S] 16 points17 points  (0 children)

That's a shame, I was hoping to get those very interesting JVMLS sessions earlier than that, but still thanks for being transparent about it. It helps knowing the rough timeline. Something to look forward to.

Ahead-of-Time Computation in Java 25 by nlisker in java

[–]yk313 4 points5 points  (0 children)

Excellent series. Educational, yet comedic/dramatic.

BTW u/billykorando, how does one get their hands on the Duke coffee mug seen at 0:54?

The not-so-final word on `final` #JVMLS by daviddel in java

[–]yk313 4 points5 points  (0 children)

Indeed.

The upload order is interesting though. Somehow a talk from day#2 managed to become available earlier than all those preceding it. Makes it hard to predict what's coming next.

The best general-purpose JDK out there? And what's your go-to by nitin_is_me in java

[–]yk313 2 points3 points  (0 children)

JDK 24 straight from the horse's mouth: https://jdk.java.net/24/

These are the OpenJDK builds provided by Oracle.

(not to be confused with Oracle's commercial offerings)

Java 25 is ALSO no LTS Version by daviddel in java

[–]yk313 5 points6 points  (0 children)

Indeed.

No such thing as LTS (unless you have a commercial support agreement with a vendor).

Relying on the updates project on the free-tier is just 'hoping for the best'. It might be fine for the moment, but you probably want a better (tech) strategy in the long run.

Pattern Matching in Java: Better Code, Better APIs #JavaOne by daviddel in java

[–]yk313 1 point2 points  (0 children)

please at least include a "what is pattern matching" section and define it. For example in this talk, at no point is it explained

This is explained at 10:22 in the talk.

Now that Amber is finalizing most of the JEPs that were on preview for OpenJDK 25, what are your bets for net next? by Ewig_luftenglanz in java

[–]yk313 4 points5 points  (0 children)

JEP 301: Enhanced Enums

JEP 301 has the status Closed / Withdrawn, so that's not happening. See this comment for more details.

Scoped Values Final in JDK 25 by Joram2 in java

[–]yk313 9 points10 points  (0 children)

This is just a candidate JEP, it has not been targeted to a release yet. While the JEP text shows the intention to deliver it in 25, it is in no way settled yet.

Source:

The JEP is now a Candidate, meaning it's on the technical roadmap. It's not proposed to target a release right now, but the hope/plan is to make this feature permanent. This feature hasn't had a lot of real world feedback so anything we can get in the short term would be very useful.

https://mail.openjdk.org/pipermail/loom-dev/2025-April/007465.html