mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[wolfsmartset] Fix NullPointerException when updating values (#11931)
* fix bug #11930 NullPointerException Signed-off-by: Bo Biene <openhab.github@biene.eu>
This commit is contained in:
parent
ef2454cd82
commit
6deb3f56da
@ -53,8 +53,8 @@ public class GetParameterValuesDTO {
|
||||
this.values = values;
|
||||
}
|
||||
|
||||
public Boolean getIsNewJobCreated() {
|
||||
return isNewJobCreated;
|
||||
public boolean getIsNewJobCreated() {
|
||||
return isNewJobCreated != null ? isNewJobCreated : false;
|
||||
}
|
||||
|
||||
public void setIsNewJobCreated(Boolean isNewJobCreated) {
|
||||
|
@ -184,7 +184,7 @@ public class WolfSmartsetUnitThingHandler extends BaseThingHandler {
|
||||
*/
|
||||
public void updateValues(@Nullable GetParameterValuesDTO values) {
|
||||
var thingId = thing.getUID();
|
||||
if (values != null && values.getValues() != null && values.getValues().size() > 0) {
|
||||
if (values != null && values.getValues() != null && !values.getValues().isEmpty()) {
|
||||
if (!values.getIsNewJobCreated()) {
|
||||
lastRefreshTime = Instant.now();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user