[sagercaster] Fix all code analysis findings (#13637)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>pull/13642/head
parent
aea2fd4002
commit
b85e9b43df
|
@ -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...)
|
* 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).
|
* 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.
|
||||||
SagerWeatherCaster needs an observation period of minimum 6 hours.
|
|
||||||
|
|
||||||
For these reasons, this binding is not a binding in the usual sense.
|
For these reasons, this binding is not a binding in the usual sense.
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,6 @@ public class SagerCasterBindingConstants {
|
||||||
public static final String CHANNEL_WIND_ANGLE = "wind-angle";
|
public static final String CHANNEL_WIND_ANGLE = "wind-angle";
|
||||||
|
|
||||||
// Some algorythms constants
|
// Some algorythms constants
|
||||||
public final static String FORECAST_PENDING = "0";
|
public static final String FORECAST_PENDING = "0";
|
||||||
public final static Set<String> SHOWERS = Set.of("G", "K", "L", "R", "S", "T", "U", "W");
|
public static final Set<String> SHOWERS = Set.of("G", "K", "L", "R", "S", "T", "U", "W");
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,15 +76,15 @@ import org.slf4j.LoggerFactory;
|
||||||
@Component(service = SagerWeatherCaster.class, scope = ServiceScope.SINGLETON)
|
@Component(service = SagerWeatherCaster.class, scope = ServiceScope.SINGLETON)
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
public class SagerWeatherCaster {
|
public class SagerWeatherCaster {
|
||||||
public final static String UNDEF = "-";
|
public static final String UNDEF = "-";
|
||||||
// Northern Polar Zone & Northern Tropical Zone
|
// 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
|
// 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
|
// 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
|
// 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 Logger logger = LoggerFactory.getLogger(SagerWeatherCaster.class);
|
||||||
private final Properties forecaster = new Properties();
|
private final Properties forecaster = new Properties();
|
||||||
|
|
Loading…
Reference in New Issue