[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;
|
this.values = values;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getIsNewJobCreated() {
|
public boolean getIsNewJobCreated() {
|
||||||
return isNewJobCreated;
|
return isNewJobCreated != null ? isNewJobCreated : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIsNewJobCreated(Boolean isNewJobCreated) {
|
public void setIsNewJobCreated(Boolean isNewJobCreated) {
|
||||||
|
|||||||
@ -184,7 +184,7 @@ public class WolfSmartsetUnitThingHandler extends BaseThingHandler {
|
|||||||
*/
|
*/
|
||||||
public void updateValues(@Nullable GetParameterValuesDTO values) {
|
public void updateValues(@Nullable GetParameterValuesDTO values) {
|
||||||
var thingId = thing.getUID();
|
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()) {
|
if (!values.getIsNewJobCreated()) {
|
||||||
lastRefreshTime = Instant.now();
|
lastRefreshTime = Instant.now();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user