From 434d40d8f663271b491cdf647c560ce097c41a2b Mon Sep 17 00:00:00 2001 From: Christian Niessner Date: Sun, 24 May 2020 17:59:01 +0200 Subject: [PATCH] [tacmi] executed `mvn spotless:apply` to fix formatting issues Signed-off-by: Christian Niessner --- bundles/org.openhab.binding.tacmi/pom.xml | 3 ++- .../src/main/feature/feature.xml | 10 +++++----- .../binding/tacmi/internal/TACmiBindingConstants.java | 10 ++++++---- .../tacmi/internal/TACmiChannelConfiguration.java | 1 - .../internal/TACmiChannelConfigurationAnalog.java | 1 - .../openhab/binding/tacmi/internal/TACmiHandler.java | 2 -- .../binding/tacmi/internal/message/AnalogMessage.java | 2 -- .../binding/tacmi/internal/message/AnalogValue.java | 2 +- .../binding/tacmi/internal/message/DigitalMessage.java | 1 - .../binding/tacmi/internal/podData/PodData.java | 1 - .../binding/tacmi/internal/stateCache/PodState.java | 5 ++--- .../binding/tacmi/internal/stateCache/StateCache.java | 1 - .../tacmi/internal/stateCache/StateCacheUtils.java | 9 ++++----- .../src/main/resources/ESH-INF/thing/thing-types.xml | 6 +++--- 14 files changed, 23 insertions(+), 31 deletions(-) diff --git a/bundles/org.openhab.binding.tacmi/pom.xml b/bundles/org.openhab.binding.tacmi/pom.xml index 2a0904690ec02..829c6d9f49da1 100644 --- a/bundles/org.openhab.binding.tacmi/pom.xml +++ b/bundles/org.openhab.binding.tacmi/pom.xml @@ -1,5 +1,6 @@ - + 4.0.0 diff --git a/bundles/org.openhab.binding.tacmi/src/main/feature/feature.xml b/bundles/org.openhab.binding.tacmi/src/main/feature/feature.xml index 2e587a971af3d..b7a38c94d4f59 100644 --- a/bundles/org.openhab.binding.tacmi/src/main/feature/feature.xml +++ b/bundles/org.openhab.binding.tacmi/src/main/feature/feature.xml @@ -1,9 +1,9 @@ - mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features + mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features - - openhab-runtime-base - mvn:org.openhab.addons.bundles/org.openhab.binding.tacmi/${project.version} - + + openhab-runtime-base + mvn:org.openhab.addons.bundles/org.openhab.binding.tacmi/${project.version} + diff --git a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/TACmiBindingConstants.java b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/TACmiBindingConstants.java index 1ee5abe26a105..c4cfcbe53e7cc 100644 --- a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/TACmiBindingConstants.java +++ b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/TACmiBindingConstants.java @@ -31,13 +31,15 @@ public class TACmiBindingConstants { public static final ThingTypeUID THING_TYPE_CMI = new ThingTypeUID(BINDING_ID, "cmi"); public static final ThingTypeUID THING_TYPE_COE_BRIDGE = new ThingTypeUID(BINDING_ID, "coe-bridge"); - public static final ChannelTypeUID CHANNEL_TYPE_COE_DIGITAL_IN_UID = new ChannelTypeUID(BINDING_ID, "coe-digital-in"); + public static final ChannelTypeUID CHANNEL_TYPE_COE_DIGITAL_IN_UID = new ChannelTypeUID(BINDING_ID, + "coe-digital-in"); public static final ChannelTypeUID CHANNEL_TYPE_COE_ANALOG_IN_UID = new ChannelTypeUID(BINDING_ID, "coe-analog-in"); - public static final ChannelTypeUID CHANNEL_TYPE_COE_DIGITAL_OUT_UID = new ChannelTypeUID(BINDING_ID, "coe-digital-out"); - public static final ChannelTypeUID CHANNEL_TYPE_COE_ANALOG_OUT_UID = new ChannelTypeUID(BINDING_ID, "coe-analog-out"); + public static final ChannelTypeUID CHANNEL_TYPE_COE_DIGITAL_OUT_UID = new ChannelTypeUID(BINDING_ID, + "coe-digital-out"); + public static final ChannelTypeUID CHANNEL_TYPE_COE_ANALOG_OUT_UID = new ChannelTypeUID(BINDING_ID, + "coe-analog-out"); // Channel specific configuration items public final static String CHANNEL_CONFIG_OUTPUT = "output"; - } diff --git a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/TACmiChannelConfiguration.java b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/TACmiChannelConfiguration.java index 929d29d95451e..658cbed1fb9b1 100644 --- a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/TACmiChannelConfiguration.java +++ b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/TACmiChannelConfiguration.java @@ -43,5 +43,4 @@ public boolean equals(@Nullable Object other) { TACmiChannelConfiguration o = (TACmiChannelConfiguration) other; return this.output == o.output; } - } diff --git a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/TACmiChannelConfigurationAnalog.java b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/TACmiChannelConfigurationAnalog.java index eade299aedb3a..e8fcc34c0d15d 100644 --- a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/TACmiChannelConfigurationAnalog.java +++ b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/TACmiChannelConfigurationAnalog.java @@ -44,5 +44,4 @@ public boolean equals(@Nullable Object other) { TACmiChannelConfigurationAnalog o = (TACmiChannelConfigurationAnalog) other; return this.output == o.output && this.type == o.type; } - } diff --git a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/TACmiHandler.java b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/TACmiHandler.java index d7144de86553d..3a1fd5d65e2ef 100644 --- a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/TACmiHandler.java +++ b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/TACmiHandler.java @@ -299,7 +299,6 @@ public void handleCoE(final Message message) { updateState(channel.getUID(), state ? OnOffType.ON : OnOffType.OFF); } } - } public void monitor() { @@ -335,5 +334,4 @@ public void monitor() { if (scu != null) scu.persistStates(podDatas.values()); } - } diff --git a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/message/AnalogMessage.java b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/message/AnalogMessage.java index 4d5d5df0781ee..996e10b8908ed 100644 --- a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/message/AnalogMessage.java +++ b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/message/AnalogMessage.java @@ -119,12 +119,10 @@ public boolean hasPortnumber(int portNumber) { @Override public void debug(Logger logger) { - } @Override public MessageType getType() { return MessageType.A; } - } diff --git a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/message/AnalogValue.java b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/message/AnalogValue.java index 76f3ce7a6e54e..9444fe1fb2aa9 100644 --- a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/message/AnalogValue.java +++ b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/message/AnalogValue.java @@ -36,7 +36,7 @@ public final class AnalogValue { */ public AnalogValue(int rawValue, int type) { measureType = TACmiMeasureType.fromInt(type); - value = ((double)rawValue) / measureType.getOffset(); + value = ((double) rawValue) / measureType.getOffset(); if (measureType.equals(TACmiMeasureType.UNSUPPORTED)) { logger.warn("Unsupported measure type {}, value is {}", type, value); } else { diff --git a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/message/DigitalMessage.java b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/message/DigitalMessage.java index 2c430e735e8ea..f2ba9eb726448 100644 --- a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/message/DigitalMessage.java +++ b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/message/DigitalMessage.java @@ -104,5 +104,4 @@ public void debug(Logger logger) { public MessageType getType() { return MessageType.D; } - } diff --git a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/podData/PodData.java b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/podData/PodData.java index 60a28a235d050..0290ad04d9e67 100644 --- a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/podData/PodData.java +++ b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/podData/PodData.java @@ -37,5 +37,4 @@ public PodData(byte podId, MessageType messageType) { this.podId = podId; this.messageType = messageType; } - } diff --git a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/stateCache/PodState.java b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/stateCache/PodState.java index 72a546070a252..b85c2014eaf0b 100644 --- a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/stateCache/PodState.java +++ b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/stateCache/PodState.java @@ -22,8 +22,7 @@ */ @NonNullByDefault public class PodState { - + public int value; public int measureType; - -} \ No newline at end of file +} diff --git a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/stateCache/StateCache.java b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/stateCache/StateCache.java index a86e87eb4135e..11b6f0bd78351 100644 --- a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/stateCache/StateCache.java +++ b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/stateCache/StateCache.java @@ -28,5 +28,4 @@ public class StateCache { // could be Nullable due to json.read public @Nullable Collection pods; - } diff --git a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/stateCache/StateCacheUtils.java b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/stateCache/StateCacheUtils.java index 8423f0f07c7bb..ba5877c60525d 100644 --- a/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/stateCache/StateCacheUtils.java +++ b/bundles/org.openhab.binding.tacmi/src/main/java/org/openhab/binding/tacmi/internal/stateCache/StateCacheUtils.java @@ -19,9 +19,6 @@ import java.util.Collection; import java.util.Iterator; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; import org.openhab.binding.tacmi.internal.message.Message; @@ -29,6 +26,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + /** * The {@link StateCache} class defines common constants, which are used across * the whole binding. @@ -73,7 +73,7 @@ public StateCacheUtils(final File file, final Collection<@Nullable PodData> podD @Nullable // seems quit idiotic here as null checks also generate warnings... ? final PodState ps = spi.next(); // if (ps == null) { - // message.setValue(id, (short) 0, 0); + // message.setValue(id, (short) 0, 0); // } else { message.setValue(id, (short) (ps.value & 0xffff), ps.measureType); // } @@ -145,5 +145,4 @@ public void persistStates(final Collection<@Nullable PodData> data) { logger.warn("Persistance of state file {} failed: {}", this.stateCacheFile, t.getMessage(), t); } } - } diff --git a/bundles/org.openhab.binding.tacmi/src/main/resources/ESH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.tacmi/src/main/resources/ESH-INF/thing/thing-types.xml index a09a04a6132a4..b23a50bb32b98 100644 --- a/bundles/org.openhab.binding.tacmi/src/main/resources/ESH-INF/thing/thing-types.xml +++ b/bundles/org.openhab.binding.tacmi/src/main/resources/ESH-INF/thing/thing-types.xml @@ -7,7 +7,7 @@ - + @@ -32,7 +32,7 @@ Switch A digital channel sent from C.M.I. to OpenHAB - + @@ -56,7 +56,7 @@ Number A Analog Channel received from the C.M.I. - +