diff --git a/bundles/org.openhab.core/src/main/java/org/eclipse/smarthome/core/items/Metadata.java b/bundles/org.openhab.core/src/main/java/org/eclipse/smarthome/core/items/Metadata.java index 9159217ed..0215febd2 100644 --- a/bundles/org.openhab.core/src/main/java/org/eclipse/smarthome/core/items/Metadata.java +++ b/bundles/org.openhab.core/src/main/java/org/eclipse/smarthome/core/items/Metadata.java @@ -25,7 +25,7 @@ import org.eclipse.smarthome.core.common.registry.Identifiable; * This is a data class for storing meta-data for a given item and namespace. * It is the entity used for within the {@link MetadataRegistry}. * - * @author Kai Kreuzer - Initial contribution and API + * @author Kai Kreuzer - Initial contribution * */ @NonNullByDefault @@ -35,6 +35,17 @@ public final class Metadata implements Identifiable { private final String value; private final Map configuration; + /** + * Package protected default constructor to allow reflective instantiation. + * + * !!! DO NOT REMOVE - Gson needs it !!! + */ + Metadata() { + key = new MetadataKey("", ""); + value = ""; + configuration = Collections.emptyMap(); + } + public Metadata(MetadataKey key, String value, @Nullable Map configuration) { this.key = key; this.value = value;