Skip to content

Commit

Permalink
Good bye, checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
sfuhrm committed Jan 12, 2024
1 parent b269d0c commit c99ab22
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 39 deletions.
18 changes: 0 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,24 +120,6 @@
<releaseProfiles>release</releaseProfiles>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<configuration>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
</configuration>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>clirr-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ public Station deserialize(
return station;
}

<T> void transfer(JsonObject jsonObject, String key, Station station, BiConsumer<Station, T> setter, Class<T> type) throws ParseException {
<T> void transfer(JsonObject jsonObject,
String key,
Station station,
BiConsumer<Station, T> setter,
Class<T> type) throws ParseException {
JsonElement element = jsonObject.get(key);
if (element == null || element.isJsonNull()) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit c99ab22

Please sign in to comment.