[
https://issues.apache.org/jira/browse/BCEL-360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stefan Reich updated BCEL-360:
------------------------------
Description:
LDC with a constant of type Class is allowed since JDK 5 only.
ClassGen should give an error when this command is used in a class file with a
too low setMajor() value.
Currently ClassGen will happily produce a broken class file in this case.
As ClassGen defaults to writing class files for JDK 1.1, this issue is quite
easy to be confused by.
More info and example program:
[https://lists.apache.org/thread/psmzvyz46c78wg4xjotx5xfwrrdc7s4y]
was:
LDC with a constant of type Class is allowed since JDK 5 only.
ClassGen should give an error when this command is used in a class file with a
too low setMajor() value.
Currently ClassGen will happily produce a broken class file in this case.
As ClassGen defaults to writing class files for JDK 1.1, this issue is quite
easy to be confused be.
More info and example program:
[https://lists.apache.org/thread/psmzvyz46c78wg4xjotx5xfwrrdc7s4y]
> LDC with class constant should fail if writing class file for older JDK
> -----------------------------------------------------------------------
>
> Key: BCEL-360
> URL: https://issues.apache.org/jira/browse/BCEL-360
> Project: Commons BCEL
> Issue Type: Bug
> Reporter: Stefan Reich
> Priority: Minor
> Attachments: MakeBadClassFile.java
>
>
> LDC with a constant of type Class is allowed since JDK 5 only.
> ClassGen should give an error when this command is used in a class file with
> a too low setMajor() value.
> Currently ClassGen will happily produce a broken class file in this case.
> As ClassGen defaults to writing class files for JDK 1.1, this issue is quite
> easy to be confused by.
> More info and example program:
> [https://lists.apache.org/thread/psmzvyz46c78wg4xjotx5xfwrrdc7s4y]
--
This message was sent by Atlassian Jira
(v8.20.1#820001)