Java 17 features (N-S) (#15565)
- add missing @override - Java style array syntax - remove redundant modifiers - always move String constants to left side in comparisons - simplify lambda expressions and return statements - use replace instead of replaceAll w/o regex - instanceof matching and multiline strings Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -48,7 +48,7 @@ public class StationDbService {
|
||||
@Activate
|
||||
public StationDbService() {
|
||||
try (InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("/db/stations.json");
|
||||
Reader reader = new InputStreamReader(is, StandardCharsets.UTF_8);) {
|
||||
Reader reader = new InputStreamReader(is, StandardCharsets.UTF_8)) {
|
||||
Gson gson = new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();
|
||||
stations = Arrays.asList(gson.fromJson(reader, Station[].class));
|
||||
} catch (IOException | JsonSyntaxException | JsonIOException e) {
|
||||
|
||||
@@ -66,7 +66,7 @@ public abstract class Synop {
|
||||
private static final int HV_LESS_THAN_10_HP_LIMIT = 96;
|
||||
private static final int HV_LESS_THAN_50_HP_LIMIT = 98;
|
||||
|
||||
public static enum HorizontalVisibility {
|
||||
public enum HorizontalVisibility {
|
||||
UNDEFINED,
|
||||
LESS_THAN_1,
|
||||
LESS_THAN_10,
|
||||
|
||||
Reference in New Issue
Block a user