From c99ab225caa053fbae6f1672399fb732cd0a56ef Mon Sep 17 00:00:00 2001 From: Stephan Fuhrmann Date: Fri, 12 Jan 2024 20:55:14 +0100 Subject: [PATCH] Good bye, checkstyle --- pom.xml | 18 ----------- .../radiobrowser4j/StationDeserializer.java | 6 +++- .../radiobrowser4j/StatsDeserializer.java | 30 +++++++------------ 3 files changed, 15 insertions(+), 39 deletions(-) diff --git a/pom.xml b/pom.xml index 9733f671..3aa733c7 100644 --- a/pom.xml +++ b/pom.xml @@ -120,24 +120,6 @@ release - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.3.1 - - - validate - validate - - true - true - - - check - - - - org.codehaus.mojo clirr-maven-plugin diff --git a/radiobrowser4j/src/main/java/de/sfuhrm/radiobrowser4j/StationDeserializer.java b/radiobrowser4j/src/main/java/de/sfuhrm/radiobrowser4j/StationDeserializer.java index d2230440..e51549bf 100644 --- a/radiobrowser4j/src/main/java/de/sfuhrm/radiobrowser4j/StationDeserializer.java +++ b/radiobrowser4j/src/main/java/de/sfuhrm/radiobrowser4j/StationDeserializer.java @@ -69,7 +69,11 @@ public Station deserialize( return station; } - void transfer(JsonObject jsonObject, String key, Station station, BiConsumer setter, Class type) throws ParseException { + void transfer(JsonObject jsonObject, + String key, + Station station, + BiConsumer setter, + Class type) throws ParseException { JsonElement element = jsonObject.get(key); if (element == null || element.isJsonNull()) { return; diff --git a/radiobrowser4j/src/main/java/de/sfuhrm/radiobrowser4j/StatsDeserializer.java b/radiobrowser4j/src/main/java/de/sfuhrm/radiobrowser4j/StatsDeserializer.java index a47eb239..2e9a0199 100644 --- a/radiobrowser4j/src/main/java/de/sfuhrm/radiobrowser4j/StatsDeserializer.java +++ b/radiobrowser4j/src/main/java/de/sfuhrm/radiobrowser4j/StatsDeserializer.java @@ -18,26 +18,16 @@ public Stats deserialize( ) throws JsonParseException { Stats stats = new Stats(); JsonObject jsonObject = jsonElement.getAsJsonObject(); - stats.setSupportedVersion( - jsonObject.get("supported_version").getAsInt()); - stats.setSoftwareVersion( - jsonObject.get("software_version").getAsString()); - stats.setStatus( - jsonObject.get("status").getAsString()); - stats.setStations( - jsonObject.get("stations").getAsInt()); - stats.setStationsBroken( - jsonObject.get("stations_broken").getAsInt()); - stats.setTags( - jsonObject.get("tags").getAsInt()); - stats.setClicksLastHour( - jsonObject.get("clicks_last_hour").getAsInt()); - stats.setClicksLastDay( - jsonObject.get("clicks_last_day").getAsInt()); - stats.setLanguages( - jsonObject.get("languages").getAsInt()); - stats.setCountries( - jsonObject.get("countries").getAsInt()); + stats.setSupportedVersion(jsonObject.get("supported_version").getAsInt()); + stats.setSoftwareVersion(jsonObject.get("software_version").getAsString()); + stats.setStatus(jsonObject.get("status").getAsString()); + stats.setStations(jsonObject.get("stations").getAsInt()); + stats.setStationsBroken(jsonObject.get("stations_broken").getAsInt()); + stats.setTags(jsonObject.get("tags").getAsInt()); + stats.setClicksLastHour(jsonObject.get("clicks_last_hour").getAsInt()); + stats.setClicksLastDay(jsonObject.get("clicks_last_day").getAsInt()); + stats.setLanguages(jsonObject.get("languages").getAsInt()); + stats.setCountries(jsonObject.get("countries").getAsInt()); return stats; } }