Jandex 2.4.3 and the path to 3.0
by Ladislav Thon
Hi,
last week, I've released Jandex 3.0.0-RC1, and yesterday, I've released
Jandex 2.4.3.Final. (A corresponding release of the Jandex Maven plugin is
on its way to Central as we speak.)
There's a few breaking changes in Jandex 3.0 and the 2.4.3 release is
supposed to make migration easier (or at least require less coordination).
Specifically, Jandex 2.4.3 deprecates these 2 methods because they have a
different return type in 3.0:
- ClassInfo.annotations()
- MethodInfo.parameters()
Replacements are, respectively:
- ClassInfo.annotationsMap()
- MethodInfo.parameterTypes()
These 2 replacement methods are present both in Jandex 2.4.3 and
3.0.0[-RC1].
Additionally, certain usages of MethodInfo.parameters() can be simplified
using MethodInfo.parametersCount() and parameterType(int). These 2 methods
are also present both in 2.4.3 and 3.0.0[-RC1].
Updating to Jandex 2.4.3 is safe, because it's fully compatible with
previous releases. A project that uses Jandex 2.4.3 and avoids deprecated
methods is almost fully _binary_ compatible with Jandex 3.0 (almost because
of the return type change in Indexer.index(), but that should only affect a
very small number of existing code paths).
I went through the projects that I know use Jandex and made the necessary
changes myself and will submit PRs in the coming days. These projects are:
- Quarkus, including ArC and RESTEasy Reactive
- Gizmo
- Weld
- SmallRye OpenAPI
- SmallRye Async API -- no changes required
- SmallRye GraphQL
- WildFly Core -- no changes required, just updating Jandex
- WildFly Full
- RESTEasy (classic) -- no changes required
If you maintain (or know about) some other project that uses Jandex, feel
free to ping me, I'll be happy to help.
Note that there are more changes in Jandex 3.0. All the details can be
found in the issue tracker: https://github.com/smallrye/jandex/milestone/3
For your convenience, here's a summary of what's coming in Jandex 3.0 and
is technically a breaking change, even though most of them won't likely
affect anyone:
- moved Jandex to SmallRye
- bumped minimum Java version to 8
- regularized access to annotations from AnnotationTarget
- this is why ClassInfo.annotations() needs to change the return type
- there are methods to access annotations without considering nested
annotation targets, too!
- regularized access to method parameters from MethodInfo
- this is why MethodInfo.parameters() needs to change the return type
- common parameter-accessing methods on MethodInfo ignore
mandated/synthetic parameters
- special methods exist to access all parameters, including
mandated/synthetic
- added a new kind of types, TypeVariableReference, to faithfully represent
recursive type variables
- changed Indexer.index() to return void (instead of ClassInfo)
- required to be able to post-process an index during Indexer.complete()
- added indexing of class-retained annotations
- Jandex 2 only indexes runtime-retained annotations
- AnnotationInstance.runtimeVisible() can be used to distinguish
- added a few methods to IndexView
- navigation for interfaces: getKnownDirectSubinterfaces(),
getAllKnownSubinterfaces()
- navigation for packages: getClassesInPackage(), getSubpackages()
- breaks projects that implement this interface on their own (which I
know at least WildFly and Quarkus do)
- removed IndexReader.getDataVersion()
- it's been incorrect anyway, and I couldn't find anyone using it
When Jandex 3.0 goes final, which I hope happens in a few weeks, I will
publish an announcement with all details on the SmallRye blog. In the
meantime, I'll use the previously mentioned projects (and their test
suites) to verify that Jandex 3.0 doesn't contain any hidden surprises.
Any questions? Ideas? My inbox and the Jandex issue tracker are always open
:-)
Thanks,
LT
2 years, 3 months
Standard WildFly has moved to EE 10 / jakarta namespace
by Brian Stansberry
Last night I merged the 'big-bang' branch into WildFly main. That branch
converted the code in the testsuite to the jakarta.* namespace and EE 10 /
MP 5 etc dependencies that previously were only used in WildFly Preview. So
as of last night the WildFly main branch no longer produces an EE 8 release.
I created a tag[1] of the tip of main just prior to merging that. I did
that as some members of our community expressed a desire for such a tag.
The main branch still includes all the maven modules that formerly produced
the component jars used in EE 8 standard WildFly. Over time we'll migrate
the code in those to use the jakarta.* code and deps currently in the
ee-9/source-transform modules. There aren't an issue trackers for that
work yet, partly because there are more critical things that we need to get
done over the next few weeks, so filing them isn't a priority for me. If
moving a particular module to jakarta.* is blocking some urgent dev work,
we can move individual modules on an ad-hoc basis.
There are a number of follow up tasks to get done, tracked under
WFLY-16678[2]. A number of those are already done.
One of those, WFLY-16677, proposes some kind of profile or something to
disable building javax.* modules that are never distributed; i.e. that only
exist to store code that gets transformed by another module. As I
commented on that JIRA though, it might make more sense to just remove
those modules from the build altogether. Thoughts on that are welcome.
Finally, please note that the big-bang brought some big changes in how
dependencyManagement is organized.[4] I apologize for not adequately
socializing those. I thought something like that might be useful some
day as a way to better organize things, but it was only last week that I
realized it was really necessary to get the transition to jakarta.* / EE 10
done.
[1] https://github.com/wildfly/wildfly/releases/tag/Pre_EE10_Big_Bang
[2] https://issues.redhat.com/browse/WFLY-16678
[3] https://issues.redhat.com/browse/WFLY-16677
[4] https://issues.redhat.com/browse/WFLY-16660
Best regards,
--
Brian Stansberry
Project Lead, WildFly
He/Him/His
2 years, 5 months
JDK 19: Rampdown Phase 2 + JavaOne
by David Delabassee
Greetings!
JDK 19 is now in Rampdown Phase Two [1]. The overall feature set is
frozen. Per the JDK Release Process [2] we now turn our focus to P1 and
P2 bugs, which can be fixed with approval [3]. Late enhancements are
still possible, with approval, but the bar is now extraordinarily high [4].
Given the current state of affairs, it is a good time to start testing
your project(s) on JDK 20 Early-Access builds. To conclude, please make
sure to check the heads-up below, including the one covering JavaOne!
[1] https://mail.openjdk.org/pipermail/jdk-dev/2022-July/006803.html
[2] https://openjdk.org/jeps/3
[3] https://openjdk.org/jeps/3#Fix-Request-Process
[4] https://openjdk.org/jeps/3#Late-Enhancement-Request-Process
## Heads-up - JavaOne is back!
After a long hiatus, JavaOne is back! From October 17-20 in Las Vegas,
JavaOne will be jam-packed with hundreds of valuable and actionable
sessions directly from the experts: learning sessions, tutorials,
hands-on labs, lightning talks, panels, an unconference, BoF's, etc. The
full JavaOne content catalog will be released soon. In the meantime,
make sure to check https://inside.java/javaone/ for more updates.
And if you are planning to attend JavaOne, please ping me. I'd like to
meet you in person to chat over OpenJDK and the Quality Outreach
program. And the drinks will be on me!
## Heads-up - JavaFX Media enhancements survey
The JavaFX team is conducting a short survey [5] to gather input on
potential JavaFX Media enhancements.
The process is quite simple as the feedback will be collected via the
openjfx-dev [6] mailing list. So if you are using JavaFX, make sure to
raise your voice.
[5] https://mail.openjdk.org/pipermail/openjfx-dev/2022-July/034949.html
[6] https://mail.openjdk.org/mailman/listinfo/openjfx-dev
## JDK 19
JDK 19 Early-Access builds 32 are now available [7], and are provided
under the GNU General Public License v2, with the Classpath Exception.
The Release Notes are available here [8].
[7] https://jdk.java.net/19/
[8] https://jdk.java.net/19/release-notes
### JEPs integrated to JDK 19:
- JEP 405: Record Patterns (Preview)
- JEP 422: Linux/RISC-V Port
- JEP 424: Foreign Function & Memory API (Preview)
- JEP 425: Virtual Threads (Preview)
- JEP 426: Vector API (4th Incubator)
- JEP 427: Pattern Matching for switch (3rd Preview)
- JEP 428: Structured Concurrency (Incubator)
### Recent changes that maybe of interest:
- JDK-8289127: Apache Lucene triggers: DEBUG MESSAGE: duplicated
predicate failed which is impossible
- JDK-8290596: Update java.net.InetAddress to Detect Ambiguous IPv4
Address Literals
- JDK-8290615: Remove the Alternate ThreadLocal Implementation of the
Subject::current and Subject::callAs APIs
- JDK-8290417: CDS cannot archive lamda proxy with useImplMethodHandle
- JDK-8287809: Revisit implementation of memory session
- JDK-8289278: Suspend/ResumeAllVirtualThreads need both can_suspend and
can_support_virtual_threads
- JDK-8288589: Files.readString ignores encoding errors for UTF-16
- JDK-8288425: Footprint regression due MH creation when initializing
StringConcatFactory
## JDK 20
JDK 20 Early-Access builds 7 are now available [9], and are provided
under the GNU General Public License v2, with the Classpath Exception.
[9] https://jdk.java.net/20/
### Recent changes that maybe of interest:
- JDK-8264999: GeneralPath.lineTo() to itself produces jagged lines
[Logged by Apache PDFBox]
- JDK-8284997: arm32 build crashes since JDK-8283326 [Logged by JaCoCo]
- JDK-8286101: Support formatting in @value tag
- JDK-8289260: BigDecimal movePointLeft() and movePointRight() do not
follow their API spec
- JDK-8287835: Add support for additional float/double to integral
conversion for x86
- JDK-8283091: Support type conversion between different data sizes in SLP
- JDK-8288573: Make Executable.getParameterCount() actually abstract
- JDK-8266670: Better modeling of access flags in core reflection
- JDK-8290601: Update java.net.InetAddress to Detect Ambiguous IPv4
Address Literals
- JDK-8290334: Update FreeType to 2.12.1
- JDK-8286030: Avoid JVM crash when containers share the same /tmp dir
- JDK-8289743: AArch64: Clean up patching logic
- JDK-8288107: Auto-vectorization for integer min/max
- JDK-8274235: -Xshare:dump should not call vm_direct_exit
## Topics of Interest:
* What is OpenJDK? - Inside Java Newscast
https://inside.java/2022/06/30/insidejava-newscast-028/
* “Towards Generational ZGC!” - Inside Java Podcast
https://inside.java/2022/06/29/podcast-024/
* HotSpot Deep Dive - Safepoint
https://inside.java/2022/07/12/hotspot-deep-dive-safepoint/
* Introduction to Project Panama - Part 2: Variadic Functions
https://inside.java/2022/06/27/introduction-to-project-panama-part-2/
* Data-Oriented Programming - Inside Java Newscast
https://inside.java/2022/07/14/insidejava-newscast-029/
* Launching 10 millions virtual threads with Loom - JEP Café
https://inside.java/2022/07/07/jepcafe12/
* Java 19 Virtual Threads - JEP Café
https://inside.java/2022/06/08/jepcafe11/
## July 2022 Critical Patch Update Released
As part of the July 2022 CPU, we released JDK 18.0.2, JDK 17.0.4 LTS,
JDK 11.0.16 LTS, JDK 8u341 and JDK 7u351 as well as OpenJDK 18.0.2
~
As always, if you find an issue while testing your project(s), please
let us know through the usual channels. Thanks for your support!
--
David
2 years, 5 months