Bug 111219 - Disassembler generates syntactically incorrect code
Summary: Disassembler generates syntactically incorrect code
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M3   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 110160
  Show dependency tree
 
Reported: 2005-09-30 11:33 EDT by Jerome Lanneluc CLA
Modified: 2005-10-31 03:06 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 Jerome Lanneluc CLA 2005-09-30 11:33:42 EDT
I20050928

If you disassemble code in a non-default package, the name of the package is
prepend to the name of the class. E.g. this is what you get for java.lang.Double:

public final class java.lang.Double extends java.lang.Number implements
java.lang.Comparable {
  
  public static final double POSITIVE_INFINITY = Infinity;

[...]
Comment 1 Jerome Lanneluc CLA 2005-09-30 11:34:53 EDT
Also note that the constant 'Infinity' is suspicious.
Comment 2 Jerome Lanneluc CLA 2005-09-30 11:35:38 EDT
Olivier, can you please have a look at this ? This is needed for bug 110160.
Comment 3 Olivier Thomann CLA 2005-09-30 12:29:27 EDT
I will investigate.
Comment 4 Olivier Thomann CLA 2005-09-30 12:30:07 EDT
So you would expect:
package java.lang;

public final class Double extends java.lang.Number implements
java.lang.Comparable {
....

I'll check what I can do for the Infinity constant.
Comment 5 Jerome Lanneluc CLA 2005-09-30 12:35:20 EDT
(In reply to comment #4)
> So you would expect:
> package java.lang;
> 
> public final class Double extends java.lang.Number implements
> java.lang.Comparable {
> ....
> 
Correct
Comment 6 Olivier Thomann CLA 2005-09-30 21:35:49 EDT
Fixed and released in HEAD.
Added regression test
org.eclipse.jdt.core.tests.compiler.regression.ClassFileReaderTest.test072/test074.
Use the new mode
org.eclipse.jdt.core.util.ClassFileBytesDisassembler.WORKING_COPY to get the
output that you want.
Comment 7 Frederic Fusier CLA 2005-10-31 03:06:35 EST
Verified for 3.2 M3 using ASTView and build I20051025-0800+v_619