From b7193a0acbf735e9147f3b8d4627015fba83c0f8 Mon Sep 17 00:00:00 2001 From: Kai Kreuzer Date: Fri, 14 Aug 2020 10:06:42 +0200 Subject: [PATCH] re-added log action to script scope and cleaned up imported extensions (#1590) Signed-off-by: Kai Kreuzer --- .../core/model/script/actions/{LogAction.java => Log.java} | 2 +- .../script/scoping/ScriptImplicitlyImportedTypes.java | 7 ++----- tools/static-code-analysis/spotbugs/suppressions.xml | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) rename bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/{LogAction.java => Log.java} (99%) diff --git a/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/LogAction.java b/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/Log.java similarity index 99% rename from bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/LogAction.java rename to bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/Log.java index 4e8a6fa6b..b7664cff9 100644 --- a/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/LogAction.java +++ b/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/actions/Log.java @@ -21,7 +21,7 @@ import org.slf4j.LoggerFactory; * * @author Thomas Eichstaedt-Engelen - Initial contribution */ -public class LogAction { +public class Log { private static final String LOGGER_NAME_PREFIX = "org.openhab.core.model.script."; diff --git a/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/scoping/ScriptImplicitlyImportedTypes.java b/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/scoping/ScriptImplicitlyImportedTypes.java index 38bd29531..2d790b304 100644 --- a/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/scoping/ScriptImplicitlyImportedTypes.java +++ b/bundles/org.openhab.core.model.script/src/org/openhab/core/model/script/scoping/ScriptImplicitlyImportedTypes.java @@ -28,6 +28,7 @@ import org.openhab.core.library.unit.SmartHomeUnits; import org.openhab.core.model.script.actions.BusEvent; import org.openhab.core.model.script.actions.Exec; import org.openhab.core.model.script.actions.HTTP; +import org.openhab.core.model.script.actions.Log; import org.openhab.core.model.script.actions.Ping; import org.openhab.core.model.script.actions.ScriptExecution; import org.openhab.core.model.script.engine.IActionServiceProvider; @@ -69,11 +70,6 @@ public class ScriptImplicitlyImportedTypes extends ImplicitlyImportedFeatures { result.remove(double.class); result.add(NumberExtensions.class); result.add(URLEncoder.class); - result.add(ScriptExecution.class); - result.add(BusEvent.class); - result.add(Exec.class); - result.add(HTTP.class); - result.add(Ping.class); result.addAll(getActionClasses()); return result; @@ -86,6 +82,7 @@ public class ScriptImplicitlyImportedTypes extends ImplicitlyImportedFeatures { result.add(BusEvent.class); result.add(Exec.class); result.add(HTTP.class); + result.add(Log.class); result.add(Ping.class); result.add(ImperialUnits.class); diff --git a/tools/static-code-analysis/spotbugs/suppressions.xml b/tools/static-code-analysis/spotbugs/suppressions.xml index 30da81f39..975781d28 100644 --- a/tools/static-code-analysis/spotbugs/suppressions.xml +++ b/tools/static-code-analysis/spotbugs/suppressions.xml @@ -26,7 +26,7 @@ - +