Summary: | [1.5] Unable to save unit | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Philipe Mulet <philippe_mulet> |
Component: | Core | Assignee: | Kent Johnson <kent_johnson> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | sma |
Version: | 3.0 | ||
Target Milestone: | 3.1 M1 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Philipe Mulet
2004-04-04 18:47:10 EDT
The problem comes from the fact we don't decode parameterized qualified name signatures: In order to properly decode it, the signature wrapper should likely combine the original descriptor so as to get the information about member types ($ names vs. . names). e.g. // Method descriptor #19 (LX$MX$MMX;)V // Signature: (LX<Ljava/lang/Thread;>.MX.MMX<LX;>;)V from input: public class X <T>{ public static void main(String [] args) { new X<String>().new MX<Exception>(); } void foo(X<Thread>.MX.MMX<X> mx) { } class MX <MT> { class MMX <MMT> { } } } Other example: public class X <T extends X.MX<Runnable>.MMX<Iterable<String>>>{ public static void main(String [] args) { new X<X.MX<Runnable>.MMX<Iterable<String>>>().new MX<Exception>(); } void foo(X<Thread>.MX.MMX<X> mx) { } class MX <MT> { class MMX <MMT> { } } } Observe the leading portion of T bound signature, it is using a dollar name... bug or expected behavior. Spec doesn't describe this. // Compiled from X.java (version 1.5 : 49.0, super bit) // Signature: <T:LX$MX<Ljava/lang/Runnable;>.MMX<Ljava/lang/Iterable<Ljava/lang/String;>;>;>Lj ava/lang/Object; class X extends java.lang.Object { // Method descriptor #19 (LX$MX$MMX;)V // Signature: (LX<Ljava/lang/Thread;>.MX.MMX<LX;>;)V // Stack: 0, Locals: 2 void foo(X$MX$MMX arg); Actually, we should rely on the leading '$' which means we do not need to reach the original descriptor to properly decode the information in the signature. fixed. |