Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 21068 Details for
Bug 87749
different IMethodBindings of generic method have equal getKey()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
patch87749_org.eclipse.jdt.core.txt (text/plain), 4.21 KB, created by
Jerome Lanneluc
on 2005-05-12 16:55:44 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2005-05-12 16:55:44 EDT
Size:
4.21 KB
patch
obsolete
>Index: compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java,v >retrieving revision 1.31 >diff -u -r1.31 ParameterizedGenericMethodBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java 12 May 2005 14:18:58 -0000 1.31 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java 12 May 2005 20:50:41 -0000 >@@ -321,16 +321,16 @@ > * p.X<U> { <T> void bar(T t, U u) { new X<String>().bar(this, "") } } --> Lp/X<Ljava/lang/String;>;.bar<T:Ljava/lang/Object;>(TT;TU;)V%<Lp/X;> > */ > public char[] computeUniqueKey(boolean isLeaf) { >- if (this.isRaw) >- return super.computeUniqueKey(isLeaf); > StringBuffer buffer = new StringBuffer(); > buffer.append(super.computeUniqueKey(isLeaf)); > buffer.append('%'); > buffer.append('<'); >- int length = this.typeArguments.length; >- for (int i = 0; i < length; i++) { >- TypeBinding typeArgument = this.typeArguments[i]; >- buffer.append(typeArgument.computeUniqueKey(false/*not a leaf*/)); >+ if (!this.isRaw) { >+ int length = this.typeArguments.length; >+ for (int i = 0; i < length; i++) { >+ TypeBinding typeArgument = this.typeArguments[i]; >+ buffer.append(typeArgument.computeUniqueKey(false/*not a leaf*/)); >+ } > } > buffer.append('>'); > int resultLength = buffer.length(); >Index: model/org/eclipse/jdt/internal/core/util/BindingKeyParser.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/BindingKeyParser.java,v >retrieving revision 1.15 >diff -u -r1.15 BindingKeyParser.java >--- model/org/eclipse/jdt/internal/core/util/BindingKeyParser.java 11 May 2005 13:53:13 -0000 1.15 >+++ model/org/eclipse/jdt/internal/core/util/BindingKeyParser.java 12 May 2005 20:50:45 -0000 >@@ -312,7 +312,7 @@ > } > > void skipParametersStart() { >- if (this.index < this.source.length && this.source[this.index] == '<') >+ while (this.index < this.source.length && (this.source[this.index] == '<' || this.source[this.index] == '%')) > this.index++; > } > >@@ -611,6 +611,7 @@ > } > > private void parseParameterizedMethod() { >+ this.scanner.skipParametersStart(); > while (!this.scanner.isAtParametersEnd()) { > parseTypeArgument(); > } >Index: model/org/eclipse/jdt/internal/core/util/BindingKeyResolver.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/BindingKeyResolver.java,v >retrieving revision 1.19 >diff -u -r1.19 BindingKeyResolver.java >--- model/org/eclipse/jdt/internal/core/util/BindingKeyResolver.java 11 May 2005 13:53:13 -0000 1.19 >+++ model/org/eclipse/jdt/internal/core/util/BindingKeyResolver.java 12 May 2005 20:50:46 -0000 >@@ -40,6 +40,7 @@ > import org.eclipse.jdt.internal.compiler.lookup.PackageBinding; > import org.eclipse.jdt.internal.compiler.lookup.ParameterizedGenericMethodBinding; > import org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding; >+import org.eclipse.jdt.internal.compiler.lookup.RawTypeBinding; > import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding; > import org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding; > import org.eclipse.jdt.internal.compiler.lookup.TypeBinding; >@@ -189,8 +190,10 @@ > > public void consumeParameterizedMethod() { > TypeBinding[] arguments = getTypeBindingArguments(); >- if (arguments.length != this.methodBinding.typeVariables().length) return; >- this.methodBinding = new ParameterizedGenericMethodBinding(this.methodBinding, arguments, this.environment); >+ if (arguments.length != this.methodBinding.typeVariables().length) >+ this.methodBinding = new ParameterizedGenericMethodBinding(this.methodBinding, (RawTypeBinding) null, this.environment); >+ else >+ this.methodBinding = new ParameterizedGenericMethodBinding(this.methodBinding, arguments, this.environment); > this.compilerBinding = this.methodBinding; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 87749
: 21068 |
21069