Hi,

just walked over something again which keeps annoying me :-)

If there are Java methods like:
  isNotEmpty(Object _o)
  isNotEmpty(String _s)

which are called by Rhino like this:
  isNotEmpty(null)

an exception is thrown that Rhino can't decide for a signature
(because null could be either).

I can follow the reasoning but IMHO it would be more convenient to
defer to the type highest in the class hierarchy (isNotEmpty(Object)
in this case). If there are multiple paths, choose the first or so.

Its technically not 100% correct, but IMHO the situation that someone
has methods with the same name but different behavior  is much less
likely than the other way around.
In fact I just checked Java. It doesn't complain, but actually invokes
isNotEmpty(String). Weird, does someone know why? :-)

Thanks,
  Helge
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to