mirror of
https://github.com/netbirdio/gomobile-tvos-fork.git
synced 2026-05-22 18:43:29 -07:00
bind: don't inherit java.lang.Object methods to Java interfaces
Before, the Java generator let Java interfaces inherit java.lang.Object methods. However, interfaces strictly doesn't inherit Object and since the JNI GetMethodID returns NULL for Object methods on interface classes, stop making Object a super class to interfaces. Change-Id: I3757c1ed02c07ccffab74a30132d5197742c6513 Reviewed-on: https://go-review.googlesource.com/30096 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
@@ -73,7 +73,7 @@ public class ClassesTest extends InstrumentationTestCase {
|
||||
public void testGoObject() {
|
||||
Runnable r = new GoRunnable();
|
||||
r.run();
|
||||
assertTrue("GoRunnable.toString", r.toString().equals(Javapkg.ToStringPrefix));
|
||||
assertEquals("GoRunnable.toString", r.toString(), Javapkg.ToStringPrefix);
|
||||
Runnable r2 = ((GoRunnable)r).getThis();
|
||||
assertTrue("GoObject.this", r == r2);
|
||||
Object o = new GoObject();
|
||||
|
||||
Reference in New Issue
Block a user