Bug 76440

Summary: [1.5] Disassembler doesn't render 1.5 constructs correctly
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Martin Aeschlimann CLA 2004-10-17 08:04:35 EDT
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);
}
Comment 1 Olivier Thomann CLA 2004-10-17 11:44:26 EDT
This is not wrong. The varargs on the VM side is a modifier.
Why is this really a problem?
Comment 2 Martin Aeschlimann CLA 2004-10-17 17:54:48 EDT
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
Comment 3 Olivier Thomann CLA 2004-10-19 13:17:56 EDT
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.
Comment 4 Olivier Thomann CLA 2004-10-20 13:51:22 EDT
Fixed and released in HEAD.
Regression test added in ClassFileReaderTest.test070.
Comment 5 David Audel CLA 2004-11-03 10:11:32 EST
Verified for 3.1M3 with build I20041102