diff --git a/jnius/reflect.py b/jnius/reflect.py index 003e7fb..0c16f34 100644 --- a/jnius/reflect.py +++ b/jnius/reflect.py @@ -219,7 +219,7 @@ def autoclass(clsname): cls = c while cls is not None: - methods = cls.getDeclaredMethods() + methods = cls.getMethods() methods_name = [x.getName() for x in methods] for index, method in enumerate(methods): diff --git a/tests/test_regressions.py b/tests/test_regressions.py index 046fa7a..225b552 100644 --- a/tests/test_regressions.py +++ b/tests/test_regressions.py @@ -1,7 +1,8 @@ -from jnius import autoclass +from jnius import autoclass, cast def test_465(): arraylist = autoclass("java.util.ArrayList")() arraylist.iterator() + cast('java.util.Collection', arraylist).stream() arraylist.stream()