Bug 76440 - [1.5] Disassembler doesn't render 1.5 constructs correctly
Summary: [1.5] Disassembler doesn't render 1.5 constructs correctly
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M3   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-17 08:04 EDT by Martin Aeschlimann CLA
Modified: 2004-11-03 10:11 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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