https://bz.apache.org/bugzilla/show_bug.cgi?id=66552

            Bug ID: 66552
           Summary: Depend task does not handle invokeDynamic constant
                    pool entries - java.lang.ClassFormatError: Invalid
                    Constant Pool entry Type 17
           Product: Ant
           Version: 1.10.8
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optional Tasks
          Assignee: notifications@ant.apache.org
          Reporter: j.michelber...@gmail.com
  Target Milestone: ---

Seems that the depend task does not handle classfiles with the invokeDynamic
properly:
java.lang.ClassFormatError: Invalid Constant Pool entry Type 17
        at
org.apache.tools.ant.taskdefs.optional.depend.constantpool.ConstantPoolEntry.readEntry(ConstantPoolEntry.java:179)
        at
org.apache.tools.ant.taskdefs.optional.depend.constantpool.ConstantPool.read(ConstantPool.java:67)
        at
org.apache.tools.ant.taskdefs.optional.depend.ClassFile.read(ClassFile.java:73)
        at
org.apache.tools.ant.taskdefs.optional.depend.AntAnalyzer.determineDependencies(AntAnalyzer.java:78)
        at
org.apache.tools.ant.util.depend.AbstractAnalyzer.getClassDependencies(AbstractAnalyzer.java:105)
        at
org.apache.tools.ant.taskdefs.optional.depend.Depend.determineDependencies(Depend.java:325)
        at
org.apache.tools.ant.taskdefs.optional.depend.Depend.execute(Depend.java:647)

ant -version
Apache Ant(TM) version 1.10.8 compiled on May 10 2020

java -version
openjdk version "17.0.6" 2023-01-17 LTS
OpenJDK Runtime Environment (build 17.0.6+10-LTS)
OpenJDK 64-Bit Server VM (build 17.0.6+10-LTS, mixed mode, sharing)

A quick view in the latest ConstantPoolEntry.java showed, that there is no
constant for "Entry Type 17" is defined, so a classfile delivering the 17 ends
in the default block fireing the above Exception.

The constant seems to be defined since JDK11, but the Exception are not shown
building with same Ant and JDK11.
https://docs.oracle.com/javase/specs/jvms/se14/html/jvms-4.html#jvms-4.4

Seems JDK17 produces class files using that constants.
I have currently no isolated code/script to reproduce.

Found an similar issue, but with slight different constant in the bug database.
https://bz.apache.org/bugzilla/show_bug.cgi?id=54090

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to