Skip to content

Commit

Permalink
Memory persistence service should rely on assigned persistence servic…
Browse files Browse the repository at this point in the history
…e id.

Signed-off-by: Łukasz Dywicki <luke@code-house.org>
  • Loading branch information
splatch committed Feb 29, 2024
1 parent b7d8d8e commit 2acfa02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 0 additions & 4 deletions bundles/org.connectorio.addons.persistence.memory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
<groupId>org.openhab.core.bundles</groupId>
<artifactId>org.openhab.core.persistence</artifactId>
</dependency>
<dependency>
<groupId>org.openhab.core.bundles</groupId>
<artifactId>org.openhab.core.config.xml</artifactId>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ public class MemoryPersistenceService implements ModifiablePersistenceService {

// number of entries for each bucket
private int limit = 100;
private String id = "memory";
private final String id;
private String label = "Memory persistence service";

public MemoryPersistenceService(TimeZoneProvider timeZoneProvider) {
this(ID, timeZoneProvider);
}

public MemoryPersistenceService(String id, TimeZoneProvider timeZoneProvider) {
this.id = id;
this.timeZoneProvider = timeZoneProvider;
}

Expand All @@ -81,9 +82,6 @@ public void update(Map<String, Object> config) {
}
}

if (config.containsKey("id")) {
this.id = "" + config.get("id");
}
if (config.containsKey("label")) {
this.label = "" + config.get("label");
} else {
Expand Down

0 comments on commit 2acfa02

Please sign in to comment.