mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 21:31:53 +01:00
add missing no-arg constructors (#509)
* FirmwareUpdateProgressInfo * FirmwareStatusInfo * FirmwareUpdateResultInfo Fixes: https://github.com/openhab/openhab-core/issues/507 Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
This commit is contained in:
parent
c37d2a41e9
commit
68c8db8227
@ -37,6 +37,17 @@ public final class FirmwareStatusInfo {
|
||||
@Nullable
|
||||
private final String firmwareVersion;
|
||||
|
||||
/**
|
||||
* Package protected default constructor to allow reflective instantiation.
|
||||
*
|
||||
* !!! DO NOT REMOVE - Gson needs it !!!
|
||||
*/
|
||||
FirmwareStatusInfo() {
|
||||
thingUID = new ThingUID("internal:reflective:constructor");
|
||||
firmwareStatus = FirmwareStatus.UNKNOWN;
|
||||
firmwareVersion = null;
|
||||
}
|
||||
|
||||
private FirmwareStatusInfo(ThingUID thingUID, FirmwareStatus firmwareStatus, @Nullable String firmwareVersion) {
|
||||
Objects.requireNonNull(thingUID, "Thing UID must not be null.");
|
||||
this.thingUID = thingUID;
|
||||
|
@ -13,6 +13,7 @@
|
||||
package org.eclipse.smarthome.core.thing.firmware;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNull;
|
||||
@ -44,6 +45,20 @@ public final class FirmwareUpdateProgressInfo {
|
||||
|
||||
private final @Nullable Integer progress;
|
||||
|
||||
/**
|
||||
* Package protected default constructor to allow reflective instantiation.
|
||||
*
|
||||
* !!! DO NOT REMOVE - Gson needs it !!!
|
||||
*/
|
||||
FirmwareUpdateProgressInfo() {
|
||||
thingUID = new ThingUID("internal:reflective:constructor");
|
||||
firmwareVersion = "";
|
||||
progressStep = ProgressStep.WAITING;
|
||||
sequence = Collections.emptyList();
|
||||
pending = false;
|
||||
progress = null;
|
||||
}
|
||||
|
||||
private FirmwareUpdateProgressInfo(ThingUID thingUID, String firmwareVersion, ProgressStep progressStep,
|
||||
Collection<ProgressStep> sequence, boolean pending, int progress) {
|
||||
Objects.requireNonNull(thingUID, "ThingUID must not be null.");
|
||||
|
@ -33,6 +33,17 @@ public final class FirmwareUpdateResultInfo {
|
||||
|
||||
private final ThingUID thingUID;
|
||||
|
||||
/**
|
||||
* Package protected default constructor to allow reflective instantiation.
|
||||
*
|
||||
* !!! DO NOT REMOVE - Gson needs it !!!
|
||||
*/
|
||||
FirmwareUpdateResultInfo() {
|
||||
thingUID = new ThingUID("internal:reflective:constructor");
|
||||
result = FirmwareUpdateResult.ERROR;
|
||||
errorMessage = null;
|
||||
}
|
||||
|
||||
private FirmwareUpdateResultInfo(ThingUID thingUID, FirmwareUpdateResult result, @Nullable String errorMessage) {
|
||||
Objects.requireNonNull(thingUID, "The thingUID must not be null.");
|
||||
this.thingUID = thingUID;
|
||||
|
Loading…
Reference in New Issue
Block a user