jruby/jruby — pull request #108 by kohsuke (2012-01-01 01:49:51+00:00)
Title: Don't select bridge method for invocation.

When selecting methods to expose to Ruby, there's no need to select bridge methods.

This eliminates redundant method calls, although that isn't why I need it.

My primary reason for this change is bit unusual; I've got a little byte code post processor to inject synthetic bridge methods to help me evolve code without breaking existing binaries, (http://bridge-method-injector.infradna.com/), and as a part of this I generate a bridge method whose return type is narrower, instead of wider.

That is, whereas normally bridge methods are as follows:

interface Base {
Object foo();
}

class Impl implements Base {
String foo() {...}

// the above definition causes javac to insert the following
// bridge method
@Synthetic @Bridge
Object foo() { return foo(); }
}

my byte code post processing would produce this:

```
class Impl /* no interface needed */ {
Object foo() {...}

@Synthetic @Bridge
String foo() { return (String)