--- a/src/JavaLookup.st Fri Feb 24 22:36:28 2012 +0000
+++ b/src/JavaLookup.st Mon Feb 27 22:27:35 2012 +0000
@@ -265,11 +265,15 @@
candidates := OrderedCollection new.
finder := [:cls|
cls methodDictionary keysAndValuesDo:[:sel :mthd|
- (mthd mclass ~~ ProxyMethod
- and:[((sel size >= nameSizePlusOne) and:[(sel at: nameSizePlusOne) == $( and:[(sel startsWith: name)]])
- and:[mthd descriptor numArgs == argArrayOrNil size]]) ifTrue:[
- candidates add: mthd
- ]
+ "candidates may contain a method with same selector ->
+ do not add super-class's method"
+ (candidates contains:[:each|each selector == sel]) ifFalse:[
+ (mthd mclass ~~ ProxyMethod
+ and:[((sel size >= nameSizePlusOne) and:[(sel at: nameSizePlusOne) == $( and:[(sel startsWith: name)]])
+ and:[mthd descriptor numArgs == argArrayOrNil size]]) ifTrue:[
+ candidates add: mthd
+ ]
+ ]
]
].
@@ -299,9 +303,9 @@
"Modified: / 20-09-2011 / 00:03:48 / Jan Kurs <kursjan@fit.cvut.cz>"
"Modified (format): / 25-09-2011 / 21:08:45 / Jan Kurs <kursjan@fit.cvut.cz>"
"Created: / 19-11-2011 / 13:03:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 01-01-2012 / 17:41:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 01-01-2012 / 19:58:59 / kursjan <kursjan@fit.cvut.cz>"
"Modified (comment): / 02-01-2012 / 10:35:25 / kursjan <kursjan@fit.cvut.cz>"
+ "Modified: / 27-02-2012 / 19:43:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaLookup::Smalltalk2Java methodsFor:'lookup (old)'!