]> git.basschouten.com Git - openhab-addons.git/commitdiff
[sagercaster] Fix all code analysis findings (#13637)
authorlolodomo <lg.hc@free.fr>
Tue, 1 Nov 2022 14:33:54 +0000 (15:33 +0100)
committerGitHub <noreply@github.com>
Tue, 1 Nov 2022 14:33:54 +0000 (15:33 +0100)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
bundles/org.openhab.binding.sagercaster/README.md
bundles/org.openhab.binding.sagercaster/src/main/java/org/openhab/binding/sagercaster/internal/SagerCasterBindingConstants.java
bundles/org.openhab.binding.sagercaster/src/main/java/org/openhab/binding/sagercaster/internal/caster/SagerWeatherCaster.java

index c9eadf8a16753286ea35bb5fb70306c2614a6257..3cc96bde95d0ee67e6b374b1e51c0149972c9b63 100644 (file)
@@ -6,8 +6,7 @@ The Sager Weathercaster is a scientific instrument for accurate prediction of th
 
 * To operate, this binding will need to use channel values provided by other means (e.g. Weather Binding, Netatmo, a 1-Wire personal weather station...)
 
-* This binding buffers readings for some hours before producing weather forecasts(wind direction and sea level pressure). 
-SagerWeatherCaster needs an observation period of minimum 6 hours.
+* This binding buffers readings for some hours before producing weather forecasts (wind direction and sea level pressure). SagerWeatherCaster needs an observation period of minimum 6 hours.
 
 For these reasons, this binding is not a binding in the usual sense.
 
index c5a55cc7e27159fef3037819db87a31387205990..a1cf0b6e743a8a4a2710132cf3370bf552f51315 100644 (file)
@@ -60,6 +60,6 @@ public class SagerCasterBindingConstants {
     public static final String CHANNEL_WIND_ANGLE = "wind-angle";
 
     // Some algorythms constants
-    public final static String FORECAST_PENDING = "0";
-    public final static Set<String> SHOWERS = Set.of("G", "K", "L", "R", "S", "T", "U", "W");
+    public static final String FORECAST_PENDING = "0";
+    public static final Set<String> SHOWERS = Set.of("G", "K", "L", "R", "S", "T", "U", "W");
 }
index 75e22034984963394f2ec0bc280c6cc14b9d6893..8437651d12521de34124fe6dab42457ca4f5bf5e 100644 (file)
@@ -76,15 +76,15 @@ import org.slf4j.LoggerFactory;
 @Component(service = SagerWeatherCaster.class, scope = ServiceScope.SINGLETON)
 @NonNullByDefault
 public class SagerWeatherCaster {
-    public final static String UNDEF = "-";
+    public static final String UNDEF = "-";
     // Northern Polar Zone & Northern Tropical Zone
-    private final static String[] NPZDIRECTIONS = { "S", "SW", "W", "NW", "N", "NE", "E", "SE" };
+    private static final String[] NPZDIRECTIONS = { "S", "SW", "W", "NW", "N", "NE", "E", "SE" };
     // Northern Temperate Zone
-    private final static String[] NTZDIRECTIONS = { "N", "NE", "E", "SE", "S", "SW", "W", "NW" };
+    private static final String[] NTZDIRECTIONS = { "N", "NE", "E", "SE", "S", "SW", "W", "NW" };
     // Southern Polar Zone & Southern Tropical Zone
-    private final static String[] SPZDIRECTIONS = { "N", "NW", "W", "SW", "S", "SE", "E", "NE" };
+    private static final String[] SPZDIRECTIONS = { "N", "NW", "W", "SW", "S", "SE", "E", "NE" };
     // Southern Temperate Zone
-    private final static String[] STZDIRECTIONS = { "S", "SE", "E", "NE", "N", "NW", "W", "SW" };
+    private static final String[] STZDIRECTIONS = { "S", "SE", "E", "NE", "N", "NW", "W", "SW" };
 
     private final Logger logger = LoggerFactory.getLogger(SagerWeatherCaster.class);
     private final Properties forecaster = new Properties();