Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java doesn't accept our subclasses as arguments #3

Closed
tshirtman opened this issue Aug 20, 2012 · 3 comments
Closed

Java doesn't accept our subclasses as arguments #3

tshirtman opened this issue Aug 20, 2012 · 3 comments
Assignees

Comments

@tshirtman
Copy link
Member

python  I   jnius.jnius.JavaException: Invalid class argument, want 'java/util/Collection', got 'java/util/Set'

but java sets ARE java collections.

@ghost ghost assigned tito Aug 20, 2012
@tito
Copy link
Member

tito commented Aug 20, 2012

Do you have a simple example/call that i can test the new approach (it was my fault, checks was too constrained)

@tito tito closed this as completed in 77f2928 Aug 20, 2012
@tshirtman
Copy link
Member Author

something like this, should do.

List = autoclass('lang.java.util.ArrayList')
Set = autoclass('lang.java.util.Set')
mylist = List(Set())

untested thought.

@tito
Copy link
Member

tito commented Aug 20, 2012

I've pushed a test case in the previous commit so it's ok. Not your example :)
(Set is an interface, so you can't instantiate it directly.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants