Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Remove interface inference #5063

Merged
merged 4 commits into from
Feb 10, 2018

Conversation

sjsf
Copy link
Contributor

@sjsf sjsf commented Feb 9, 2018

As seen e.g. in openhab/org.openhab.binding.zigbee#47 (comment), the SafeCaller.create(Class) method which infers the target interface has proven itself to be quite dangerous. Especially with target objects which are not in the framework's control (which is the main use-case for the SafeCaller), not all interfaces might be reachable from the current class loader. Hence I think it would be best to completely drop it. It was convenient, but not such a great improvement to start catching such exceptions and jumping through further hoops to make it possible.

Signed-off-by: Simon Kaufmann simon.kfm@googlemail.com

Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
Copy link
Contributor

@maggu2810 maggu2810 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it is API breaking I would like to get a go from @kaikreuzer, too in front of merging.

Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
@sjsf
Copy link
Contributor Author

sjsf commented Feb 9, 2018

Thanks @maggu2810 - I though just realized that I had the types the wrong way round, therefore I had to push another commit.

However, this doesn't really work nicely now with typed interfaces - see 3d2a698#diff-c0c87bcca219c6210ea787bcc45cf0a1R360. Do you maybe have an idea how this could be done nicely?

Signed-off-by: Kai Kreuzer <kai@openhab.org>
Copy link
Contributor

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a pity, the signature used to be much nicer before. But as it causes issues, I don't have any better suggestions on how to solve this.

@kaikreuzer kaikreuzer merged commit 98ce8cb into eclipse-archived:master Feb 10, 2018
@htreu htreu added this to the 0.10.0 milestone Oct 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants