[sagercaster] Fix all code analysis findings (#13637)

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
lolodomo 2022-11-01 15:33:54 +01:00 committed by GitHub
parent aea2fd4002
commit b85e9b43df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 9 deletions

View 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.

View 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");
}

View 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();