Rémi Forax wrote:
Florian Weimer a écrit :
* Eamonn McManus:
The proposed change could be made, but it is not just a spec
change. All JVMs that don't currently conform to the spec would need
to change, as Rémi Forax notes, and that includes the JDK and its
derivatives. I'm not a HotSpot expe
Florian Weimer wrote:
* Rémi Forax:
The solution is to not rely on reflection and to parse the bytecode
using by example ASM :
see http://asm.ow2.org/
I think you'd still need to sort based on line numbers, which requires
debugging information which is not always available.
The only
* Rémi Forax:
> The solution is to not rely on reflection and to parse the bytecode
> using by example ASM :
> see http://asm.ow2.org/
I think you'd still need to sort based on line numbers, which requires
debugging information which is not always available.
The only reliable way I know is to us
Rémi Forax wrote:
> Florian Weimer a écrit :
>> I suggest to replace:
>>
>> | The elements [methods] in the array returned are not sorted and are
>> | not in any particular order.
>>
>> with:
>>
>> | If the class is a compiled Java class, the elements in the array are
>> | sorted according to the o
Florian Weimer a écrit :
* Eamonn McManus:
The proposed change could be made, but it is not just a spec
change. All JVMs that don't currently conform to the spec would need
to change, as Rémi Forax notes, and that includes the JDK and its
derivatives. I'm not a HotSpot expert but my guess is
* Eamonn McManus:
> The proposed change could be made, but it is not just a spec
> change. All JVMs that don't currently conform to the spec would need
> to change, as Rémi Forax notes, and that includes the JDK and its
> derivatives. I'm not a HotSpot expert but my guess is that there's
> some pr
Code that relies on Class.getDeclaredMethods() returning the methods
in source-code order is currently wrong not just in theory but in
practice. That the JDK appears to return them in that order is a
fragile coincidence, as I explained in this
blog entry. Apparently unrelated changes anywhere e
Florian Weimer a écrit :
I suggest to replace:
| The elements [methods] in the array returned are not sorted and are
| not in any particular order.
with:
| If the class is a compiled Java class, the elements in the array are
| sorted according to the order of declaration in the source code.
|