Community
Participate
Working Groups
Build Identifier: I20100608-0911 When editing the example code, different keys will be generated for class C but not for class B. 1. If the source A.java is modified, generated keys are "Leclipse/bug/A<TT;>.B;" for generic member class B, respectivelly "Leclipse/bug/A<TT;>.B.C;" for generic member class C. In this case binding objects are MemberTypeBinding. 2. If the source Test.java is modified, generated keys are "Leclipse/bug/A<TT;>.B;" for generic member class B, respectivelly "Leclipse/bug/A$B$C;" for generic member class C. In this case binding objects are BinaryTypeBinding. I find the difference in ResourceBinding.computeGenericTypeSignature(TypeVariableBinding[]) method. As I see the MemberTypeBinding object for class B has the ExtraCompilerModifiers.AccGenericSignature flag, but the BinaryTypeBinding object for class B hasn't. I don't know if it is a problem. Reproducible: Always
Created attachment 181642 [details] Example project
Created attachment 181699 [details] workaround patch
Created attachment 184040 [details] Test case Zsolt, can you provide us a test case or the steps to reproduce the problem? The attached test case produces a similar error but in a different part of the code. Between, you meant ReferenceBinding and not ResourceBinding, right?
Thanks for the test case, Srikanth.
(In reply to comment #3) > Zsolt, can you provide us a test case or the steps to reproduce the problem? > The attached test case produces a similar error but in a different part of the > code. Sorry, I have no test case for this problem :( Our AST visitor (extension of org.eclipse.jdt.internal.compiler.ASTVisitor) stores the type bindings in a map using string keys: String key = String.valueOf(typeBinding.computeUniqueKey()); These key values are different, as I described in the description. > Between, you meant ReferenceBinding and not ResourceBinding, right? Yes, I meant ReferenceBinding. I hope this will help you. If not, I should try to make small working example.
(In reply to comment #4) > Thanks for the test case, Srikanth. Just for the record, this test case elicits a very similar but not identical issue.
(In reply to comment #5) > I hope this will help you. If not, I should try to make small working example. I would really appreciate an example. I am not able to come up with something myself.
(In reply to comment #7) > I would really appreciate an example. I am not able to come up with something > myself. I'm working on it but it is not so simple...
As I see the mentioned problem appears only in our code because we are doing a project-wide analysis where binary and source bindings must have the same keys. As I see, the JDT compiler works in different way so I think this problem is not a JDT bug. Thanks, and I am sorry for wasting your time.
Verified.