From c3624e7397b0fe977abc7a458281cd5063094b1a Mon Sep 17 00:00:00 2001 From: lsiepel Date: Sun, 19 Feb 2023 21:14:16 +0100 Subject: [PATCH] [onebusaway] Remove org.apache.common (#14419) Signed-off-by: lsiepel --- .../onebusaway/internal/config/ApiConfiguration.java | 6 ++---- .../binding/onebusaway/internal/config/ChannelConfig.java | 4 +--- .../onebusaway/internal/config/RouteConfiguration.java | 4 +--- .../onebusaway/internal/config/StopConfiguration.java | 6 ++---- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/bundles/org.openhab.binding.onebusaway/src/main/java/org/openhab/binding/onebusaway/internal/config/ApiConfiguration.java b/bundles/org.openhab.binding.onebusaway/src/main/java/org/openhab/binding/onebusaway/internal/config/ApiConfiguration.java index ba364e238..2cabb96fa 100644 --- a/bundles/org.openhab.binding.onebusaway/src/main/java/org/openhab/binding/onebusaway/internal/config/ApiConfiguration.java +++ b/bundles/org.openhab.binding.onebusaway/src/main/java/org/openhab/binding/onebusaway/internal/config/ApiConfiguration.java @@ -14,8 +14,6 @@ package org.openhab.binding.onebusaway.internal.config; import static org.openhab.binding.onebusaway.internal.OneBusAwayBindingConstants.*; -import org.apache.commons.lang3.builder.ToStringBuilder; - /** * The {@link ApiConfiguration} defines the model for an API bridge configuration. * @@ -55,7 +53,7 @@ public class ApiConfiguration { @Override public String toString() { - return new ToStringBuilder(this).append(API_CONFIG_API_KEY, this.getApiKey()) - .append(API_CONFIG_API_SERVER, this.getApiServer()).toString(); + return getClass().getSimpleName() + "{ " + API_CONFIG_API_KEY + "=" + this.getApiKey() + ", " + + API_CONFIG_API_SERVER + "=" + this.getApiServer() + "}"; } } diff --git a/bundles/org.openhab.binding.onebusaway/src/main/java/org/openhab/binding/onebusaway/internal/config/ChannelConfig.java b/bundles/org.openhab.binding.onebusaway/src/main/java/org/openhab/binding/onebusaway/internal/config/ChannelConfig.java index 24a22183a..6125e9e3d 100644 --- a/bundles/org.openhab.binding.onebusaway/src/main/java/org/openhab/binding/onebusaway/internal/config/ChannelConfig.java +++ b/bundles/org.openhab.binding.onebusaway/src/main/java/org/openhab/binding/onebusaway/internal/config/ChannelConfig.java @@ -14,8 +14,6 @@ package org.openhab.binding.onebusaway.internal.config; import static org.openhab.binding.onebusaway.internal.OneBusAwayBindingConstants.CHANNEL_CONFIG_OFFSET; -import org.apache.commons.lang3.builder.ToStringBuilder; - /** * The {@link ChannelConfig} defines the model for a channel configuration. * @@ -40,6 +38,6 @@ public class ChannelConfig { @Override public String toString() { - return new ToStringBuilder(this).append(CHANNEL_CONFIG_OFFSET, this.getOffset()).toString(); + return getClass().getSimpleName() + "{ " + CHANNEL_CONFIG_OFFSET + "=" + this.getOffset() + "}"; } } diff --git a/bundles/org.openhab.binding.onebusaway/src/main/java/org/openhab/binding/onebusaway/internal/config/RouteConfiguration.java b/bundles/org.openhab.binding.onebusaway/src/main/java/org/openhab/binding/onebusaway/internal/config/RouteConfiguration.java index 0e674ab1c..1d7ee1882 100644 --- a/bundles/org.openhab.binding.onebusaway/src/main/java/org/openhab/binding/onebusaway/internal/config/RouteConfiguration.java +++ b/bundles/org.openhab.binding.onebusaway/src/main/java/org/openhab/binding/onebusaway/internal/config/RouteConfiguration.java @@ -14,8 +14,6 @@ package org.openhab.binding.onebusaway.internal.config; import static org.openhab.binding.onebusaway.internal.OneBusAwayBindingConstants.ROUTE_CONFIG_ROUTE_ID; -import org.apache.commons.lang3.builder.ToStringBuilder; - /** * The {@link RouteConfiguration} defines the model for a route stop configuration. * @@ -41,6 +39,6 @@ public class RouteConfiguration { @Override public String toString() { - return new ToStringBuilder(this).append(ROUTE_CONFIG_ROUTE_ID, this.getRouteId()).toString(); + return getClass().getSimpleName() + "{ " + ROUTE_CONFIG_ROUTE_ID + "=" + this.getRouteId() + "}"; } } diff --git a/bundles/org.openhab.binding.onebusaway/src/main/java/org/openhab/binding/onebusaway/internal/config/StopConfiguration.java b/bundles/org.openhab.binding.onebusaway/src/main/java/org/openhab/binding/onebusaway/internal/config/StopConfiguration.java index 75c5978fd..42b38e07f 100644 --- a/bundles/org.openhab.binding.onebusaway/src/main/java/org/openhab/binding/onebusaway/internal/config/StopConfiguration.java +++ b/bundles/org.openhab.binding.onebusaway/src/main/java/org/openhab/binding/onebusaway/internal/config/StopConfiguration.java @@ -14,8 +14,6 @@ package org.openhab.binding.onebusaway.internal.config; import static org.openhab.binding.onebusaway.internal.OneBusAwayBindingConstants.*; -import org.apache.commons.lang3.builder.ToStringBuilder; - /** * The {@link StopConfiguration} defines the model for a stop bridge configuration. * @@ -56,7 +54,7 @@ public class StopConfiguration { @Override public String toString() { - return new ToStringBuilder(this).append(STOP_CONFIG_INTERVAL, this.getInterval()) - .append(STOP_CONFIG_ID, this.getStopId()).toString(); + return getClass().getSimpleName() + "{ " + STOP_CONFIG_INTERVAL + "=" + this.getInterval() + ", " + + STOP_CONFIG_ID + "=" + this.getStopId() + "}"; } }