Re: BCEL: Can't load Object.class using LDC

2022-02-04 Thread Stefan Reich
Hi Gary, well I'm kinda done here, things work fine for me. I did create an issue though: https://issues.apache.org/jira/browse/BCEL-360 On Fri, 4 Feb 2022 at 16:54, Gary Gregory wrote: > Stefan, > > Would you please create a Jira ticket? This will give your issue more > visibility and one loca

RE: BCEL: Can't load Object.class using LDC

2022-02-04 Thread Mark Roberts
I would suggest defaulting to the system property "java.version", that is what the Daikon tool set does. Mark -Original Message- From: Gary Gregory [mailto:garydgreg...@gmail.com] Sent: Friday, February 4, 2022 7:54 AM To: Commons Developers List Subject: Re: BCEL: Can't load Object.clas

Re: BCEL: Can't load Object.class using LDC

2022-02-04 Thread Gary Gregory
Stefan, Would you please create a Jira ticket? This will give your issue more visibility and one location with ALL the information needed in the future. Gary On Fri, Feb 4, 2022, 09:49 Stefan Reich wrote: > Will you look at that. BCEL's verifier actually checks for this > (Pass3aVerifier.java

Re: BCEL: Can't load Object.class using LDC

2022-02-04 Thread Stefan Reich
Will you look at that. BCEL's verifier actually checks for this (Pass3aVerifier.java): public void visitLDC(final LDC ldc) { indexValid(ldc, ldc.getIndex()); final Constant c = constantPoolGen.getConstant(ldc.getIndex()); if (c instanceof ConstantClass) { addMessage("Operand of L

Re: BCEL: Can't load Object.class using LDC

2022-02-04 Thread Stefan Reich
Update: They changed it in Java 5. ClassGen.setMajor(49) + ClassGen.setMinor(0) works. On Fri, 4 Feb 2022 at 15:26, Stefan Reich < stefan.reich.maker.of@googlemail.com> wrote: > Mystery solved, ladies and gentlemen... > > It was... > > the byte code version. BCEL outputs version 45.3 by defau

Re: BCEL: Can't load Object.class using LDC

2022-02-04 Thread Stefan Reich
Mystery solved, ladies and gentlemen... It was... the byte code version. BCEL outputs version 45.3 by default (JDK 1.1). There were multiple changes to the class file format spec since then. Specifically, they must have allowed ldc to load .class objects directly at some point after JDK 1.1. In