Adjustments after changing null-annotations for updating properties (#12221)

Signed-off-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
J-N-K 2022-02-08 18:35:16 +01:00 committed by GitHub
parent a3448a57d3
commit 60f9f60faf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 16 additions and 10 deletions

View File

@ -59,7 +59,7 @@ public class ExecWhitelistWatchService extends AbstractWatchService {
}
@Override
protected Kind<?>[] getWatchEventKinds(@Nullable Path directory) {
protected Kind<?> @Nullable [] getWatchEventKinds(@Nullable Path directory) {
return new Kind<?>[] { ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY };
}

View File

@ -155,7 +155,7 @@ public class HPPrinterHandler extends BaseThingHandler {
}
@Override
protected void updateProperties(final Map<String, String> properties) {
protected void updateProperties(final @Nullable Map<String, String> properties) {
super.updateProperties(properties);
}

View File

@ -777,7 +777,7 @@ public class LifxLightHandler extends BaseThingHandler {
}
@Override
protected void updateProperties(Map<String, String> properties) {
protected void updateProperties(@Nullable Map<String, String> properties) {
String oldHostVersion = getThing().getProperties().get(LifxBindingConstants.PROPERTY_HOST_VERSION);
super.updateProperties(properties);
String newHostVersion = getThing().getProperties().get(LifxBindingConstants.PROPERTY_HOST_VERSION);

View File

@ -23,6 +23,7 @@ import java.util.concurrent.TimeUnit;
import javax.measure.Unit;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.luxtronikheatpump.internal.enums.HeatpumpChannel;
import org.openhab.binding.luxtronikheatpump.internal.enums.HeatpumpCoolingOperationMode;
import org.openhab.binding.luxtronikheatpump.internal.enums.HeatpumpOperationMode;
@ -75,7 +76,7 @@ public class LuxtronikHeatpumpHandler extends BaseThingHandler {
}
@Override
public void updateProperty(String name, String value) {
public void updateProperty(String name, @Nullable String value) {
super.updateProperty(name, value);
}

View File

@ -81,7 +81,7 @@ public class MiIoDatabaseWatchService extends AbstractWatchService {
}
@Override
protected Kind<?>[] getWatchEventKinds(@Nullable Path directory) {
protected Kind<?> @Nullable [] getWatchEventKinds(@Nullable Path directory) {
return new Kind<?>[] { ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY };
}

View File

@ -65,7 +65,7 @@ public abstract class SurePetcareBaseObjectHandler extends BaseThingHandler {
}
@Override
public void updateProperties(Map<String, String> properties) {
public void updateProperties(@Nullable Map<String, String> properties) {
super.updateProperties(properties);
}

View File

@ -15,6 +15,7 @@ package org.openhab.binding.velux.internal.handler.utils;
import java.util.Map;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.core.thing.Bridge;
import org.openhab.core.thing.ChannelUID;
import org.openhab.core.thing.binding.BaseBridgeHandler;
@ -59,7 +60,7 @@ public abstract class ExtendedBaseBridgeHandler extends BaseBridgeHandler {
* @param properties properties map, that was updated and should be persisted
*/
@Override
public void updateProperties(Map<String, String> properties) {
public void updateProperties(@Nullable Map<String, String> properties) {
super.updateProperties(properties);
}

View File

@ -15,6 +15,7 @@ package org.openhab.binding.velux.internal.handler.utils;
import java.util.Map;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.core.thing.Thing;
import org.openhab.core.thing.binding.BaseThingHandler;
@ -61,7 +62,7 @@ public abstract class ExtendedBaseThingHandler extends BaseThingHandler {
* @param properties properties map, that was updated and should be persisted
*/
@Override
public void updateProperties(Map<String, String> properties) {
public void updateProperties(@Nullable Map<String, String> properties) {
super.updateProperties(properties);
}
}

View File

@ -59,7 +59,7 @@ public class ExecTransformationWhitelistWatchService extends AbstractWatchServic
}
@Override
protected Kind<?>[] getWatchEventKinds(@Nullable Path directory) {
protected Kind<?> @Nullable [] getWatchEventKinds(@Nullable Path directory) {
return new Kind<?>[] { ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY };
}

View File

@ -25,6 +25,8 @@ import org.openhab.core.transform.TransformationService;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The {@link TransformationScriptWatcher} watches the transformation directory for files. If a deleted/modified file is
@ -35,10 +37,11 @@ import org.osgi.service.component.annotations.Reference;
*/
@Component
public class TransformationScriptWatcher extends AbstractWatchService {
public static final String TRANSFORM_FOLDER = OpenHAB.getConfigFolder() + File.separator
+ TransformationService.TRANSFORM_FOLDER_NAME;
private final Logger logger = LoggerFactory.getLogger(TransformationScriptWatcher.class);
private final JavaScriptEngineManager manager;
@Activate