[enocean] D2-50 EEP remove extra channels and fix warnings #17531
+34
−37
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.
Description
Improvement: Fix 7 warnings on building a jar:
Null comparison always yields false...
-EEPFactory.java:[54,17]
,EEPFactory.java:[67,17]
,EnOceanBaseSensorHandler.java:[158,13]
Dead code
(caused by the above warinings) -EEPFactory.java:[54,29]
,EEPFactory.java:[67,29]
,EnOceanBaseSensorHandler.java:[158,41]
Potential null pointer access
-EnOceanTransceiver.java:[451,13]
Improvement: remove channels which are not supported by device using EEP D2-50-00, D2-50-01, D2-50-10, D2-50-11.
Before this PR choosing either of the above EEP doesn't change anything in the channels list, it looked like all the devices support all channels, but according to the specification they don't. For reference check EnOcean specification on page 236
Test jar file