Details
-
Improvement
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
None
Description
For instance, the following code in org.apache.calcite.linq4j.EnumerableDefaults.WrapMap
@Override public Set<Entry<@KeyFor("this") K, V>> entrySet() { return new AbstractSet<Entry<@KeyFor("this") K, V>>() {
produces the following exception with org.jboss:jandex:2.0.3.Final
Caused by: java.lang.IllegalStateException: Class extends type annotation appeared on a non class target at org.jboss.jandex.Indexer.processTypeAnnotation(Indexer.java:403) at org.jboss.jandex.Indexer.processTypeAnnotations(Indexer.java:380) at org.jboss.jandex.Indexer.processAttributes(Indexer.java:314) at org.jboss.jandex.Indexer.processMethodInfo(Indexer.java:271) at org.jboss.jandex.Indexer.index(Indexer.java:1454)
Note: Calcite bytecode is perfectly valid (provided a recent javac is used), however, jandex is used by Hibernate, Quarkus (and other projects), so it might result in non-tirival exceptions like IllegalStateException: Class extends type annotation appeared on a non class target while users would have absolutely no clue which class causes failure and why.
Sample jandex issues: https://github.com/wildfly/jandex/issues/98, https://github.com/wildfly/jandex/issues/88, https://github.com/wildfly/jandex/issues/80, and others.
I suggest we parse Calcite-produced classes with Jandex, so we know when incompatibility happens.
Here's the same case for pgjdbc/pgjdbc: https://github.com/pgjdbc/pgjdbc/pull/2010
Attachments
Issue Links
1.
|
Add optional bytecode verification with Jandex | Closed | Vladimir Sitnikov |
|