I switched the workflow back to an Ubuntu 24.04 base image and now I have
an anti-repro (full build pass) using OpenJDK 17. 🟢

build passed for https://github.com/meonkeys/apache-fineract/commit/1d7d087

changes:
https://github.com/meonkeys/apache-fineract/compare/07ea81e3..use-other-java

It was breaking for me without the update-alternatives invocations. Maybe
something in the base OS was falling back to a separate installed v11 JDK?
No idea.

I wrote:

> Related (naive) question: why can't we use the latest and greatest JDK for
> development (e.g. version 24)? I would expect a newer release to be faster,
> have fewer bugs, detect more bugs in code, etc.
>
> Based on c81fc7f0f4709095336e742cfbd7052bb4d01808 ("Upgrade to JDK 17")
> I'm guessing the answer is that using a newer JDK version means lots of
> little code changes to handle deprecated APIs, etc. Is that right?


Just for fun I also tried a full build with OpenJDK 21. That passed too:

build passed for
https://github.com/meonkeys/apache-fineract/commit/186ccdc599

changes:
https://github.com/meonkeys/apache-fineract/compare/07ea81e3..fix-openjdk-21-exception
(note: final build still in progress at time of writing)

*Do we want to upgrade to Java 21*? Want me to open a PR for that? Looks
like there are lots of changes
<https://www.oracle.com/java/technologies/javase/21-relnote-issues.html> to
consider.

Side note, I think the syntax for onMethod_ = @__(@Override) should be
onMethod_
= {@Override}, but it seems to work either way. This commit
<https://github.com/meonkeys/apache-fineract/commit/bc9663a768> uses the
new syntax and build passed for me locally. See also:
https://projectlombok.org/features/experimental/onX and
https://github.com/projectlombok/lombok/issues/3531

I'm assuming azul zulu java 21 would be fine as well. I haven't tried it. I
don't know the ins and outs of all the different Java builds out there, I
just thought to try and use the latest build that ships with ubuntu. If
that one works it should ease deployment a bit for people deploying on
ubuntu since we also build on ubuntu. It's handy to use distro-supplied
versions of stuff like Java since the distro vendors (e.g. debian,
canonical) patch it for stability/security/etc. and their package builds
are mostly reproducible.

Reply via email to