| Summary: | Inconsistent classfile encountered: The undefined type parameter T is referenced from within String | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> |
| Component: | UI | Assignee: | Markus Keller <markus.kell.r> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, Olivier_Thomann, srikanth_sankaran |
| Version: | 3.7 | ||
| Target Milestone: | 3.7 M4 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Markus Keller
Will take a look. This doesn't happen if I compile the code using a 1.5 rt.jar and compliance 1.4. I wonder if the problem doesn't come from the stub jar itself. The problem occurs while reading the method info for: public bridge compareTo(TT;)I I don't understand why the bridge method has a generic signature:
The one from the stub:
// Method descriptor #113 (Ljava/lang/Object;)I
// Signature: (TT;)I
// Stack: 2, Locals: 2
public bridge synthetic int compareTo(Object arg0);
0 aload_0 [this]
1 aload_1 [arg0]
2 checkcast String [2]
5 invokevirtual String.compareTo(String) : int [117]
8 ireturn
The one from a real 1.5 rt.jar:
// Method descriptor #207 (Ljava/lang/Object;)I
// Stack: 2, Locals: 2
public bridge synthetic int compareTo(Object arg0);
0 aload_0 [this]
1 aload_1 [arg0]
2 checkcast String [188]
5 invokevirtual String.compareTo(String) : int [379]
8 ireturn
Line numbers:
[pc: 0, line: 90]
Markus, how was the 1.5 stub jar created ?
Note that the rtstubs16.jar doesn't have the same problem for the java.lang.String class.
The bridge method looks ok:
// Method descriptor #118 (Ljava/lang/Object;)I
// Stack: 2, Locals: 2
public bridge synthetic int compareTo(Object arg0);
0 aload_0 [this]
1 aload_1 [arg0]
2 checkcast String [1]
5 invokevirtual String.compareTo(String) : int [119]
8 ireturn
(In reply to comment #4) > I don't understand why the bridge method has a generic signature: ... > Markus, how was the 1.5 stub jar created ? ... Just a wild guess: It was generated by a pre bug# 101794 compiler ? See https://bugs.eclipse.org/bugs/show_bug.cgi?id=101794#c5 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=101794#c13 We believe it is an issue with the stubs library. If it is regenerated with a recent compiler the problem should go away. Please reopen in the unlikely event this proves to be a real compiler issue. > > Markus, how was the 1.5 stub jar created ?
> Just a wild guess: It was generated by a pre bug# 101794 compiler ?
Indeed, that's it. I've re-generated the rtstubs15.jar, and now it works fine.
Fixed in HEAD, moving the bug to JDT/UI (where the fix was applied).
Thanks for your investigations.
|