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

BridgeDiscovery.searchPortal() mismatched return type. #1

Open
rob0rt opened this issue Feb 16, 2014 · 0 comments
Open

BridgeDiscovery.searchPortal() mismatched return type. #1

rob0rt opened this issue Feb 16, 2014 · 0 comments

Comments

@rob0rt
Copy link

rob0rt commented Feb 16, 2014

Hi!

First of all, thanks for making this library. It's far more useful and easy to follow then the offical Phillips version of the SDK.

I've been working on an android app to control Hue, when I kept getting the exception:

nl.q42.jue.PortalDiscoveryResult cannot be cast to nl.q42.jue.HueBridge 

I believe this error is caused in the PortalDiscoveryResult class at this line:
https://github.com/Q42/Jue/blob/master/jue/src/nl/q42/jue/PortalDiscoveryResult.java#L9

When I change it to:

public final static Type gsonType = new TypeToken<List<HueBridge>>(){}.getType(); 

It works as desired and I do not get the exception. Is having the gsonType return a list of PortalDiscoveryResults desired? When using the method as shown in your documentation, it causes the error, making me believe this is a bug. If it is, I would be more then happy to open a pull request with the changes.

Thank you!

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

1 participant