Community
Participate
Working Groups
20041017 Create a class file from the following source and send it through the disassembler. It could do better with the 1.5 constructs: - no type parameters, 'vararg' rendered as modifier package test; public class A<X, Y> { public void foo(Object o, Object[]... args) { } } --- result: public class test.A extends java.lang.Object { public test.A(); public varargs void foo(Object arg, Object[][] arg); }
This is not wrong. The varargs on the VM side is a modifier. Why is this really a problem?
I guess I expected a more Java language similar output. Note that the String is used by the classfile editor to be shown when there is no source
Yes, but keep in mind that the disassembler should expose the .class file contents from a JVM point of view, not a source point of view. Ellipsis (...) are converted to an array on the VM side + a new modifier (AccVarArgs). I don't know if it makes sense to expose this from a JLS point of view. I will discuss with Philippe. Everyone is welcome to give an opinion on this issue.
Fixed and released in HEAD. Regression test added in ClassFileReaderTest.test070.
Verified for 3.1M3 with build I20041102