Fix ConfigConstants deprecations (#8525)

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born
2020-09-21 22:57:04 +02:00
committed by GitHub
parent 7f39d01a0f
commit 0c11a21d90
23 changed files with 49 additions and 51 deletions

View File

@@ -35,7 +35,7 @@ import org.openhab.binding.icalendar.internal.logic.CalendarException;
import org.openhab.binding.icalendar.internal.logic.CommandTag;
import org.openhab.binding.icalendar.internal.logic.CommandTagType;
import org.openhab.binding.icalendar.internal.logic.Event;
import org.openhab.core.config.core.ConfigConstants;
import org.openhab.core.OpenHAB;
import org.openhab.core.events.EventPublisher;
import org.openhab.core.items.events.ItemEventFactory;
import org.openhab.core.library.types.DateTimeType;
@@ -75,7 +75,7 @@ public class ICalendarHandler extends BaseThingHandler implements CalendarUpdate
public ICalendarHandler(Thing thing, HttpClient httpClient, EventPublisher eventPublisher) {
super(thing);
this.httpClient = httpClient;
calendarFile = new File(ConfigConstants.getUserDataFolder() + File.separator
calendarFile = new File(OpenHAB.getUserDataFolder() + File.separator
+ getThing().getUID().getAsString().replaceAll("[<>:\"/\\\\|?*]", "_") + ".ical");
eventPublisherCallback = eventPublisher;
updateStatesLastCalledTime = Instant.now();