Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[enocean] Add support for Soda Handles (EEP D2-06-01) #11230
[enocean] Add support for Soda Handles (EEP D2-06-01) #11230
Changes from 14 commits
df8e0d4
09f17f8
d9ffb7d
edb214c
c656476
6996804
b47f313
45085ca
d616f39
9a87ce4
cb211a0
0114165
ca78f5c
0cf8e43
76fbff8
e50f5be
86423c5
e4815a0
e99b910
242eef0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add @NonNullByDefault
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lolodomo
I added the annotation but I'm struggling with the annotation of the getCurrentStateFunc parameter of the convertToStateImpl method. If I annotate it with Nullable it will still give me an Exception due to a mismatched annotation. I think this might be due to the fact that State is annotated as NonNull but I can't figure out how to fix that... Any help would be highly appreciated, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the problem is due to parent classes not being null annotated?
Did you try to annotate them too?
If this is the problem, maybe we can forget my comment as my intention was not to tell you to annotate many classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be the case but it would go way beyond the scope of this PR to annotate large parts of the binding (no null annotations are used so far).
The correct way to do this for my single class (as the start of an iterative approach) would be as I understand it from the documentation to annotate the parameters with Nullable. This works fine for all parameter except for the Function<String, State> parameter with its generic types. What's special is that the State type is an openHAB core class that is properly annotated while the others are plain basic Java classes that are not annotated at all. I tried a lot of different things without really knowing what I'm doing and finally gave up yesterday night...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so please forget this comment in the context of this PR and push your updates.