Skip to content

Commit

Permalink
Upgrade dropwizard.version to 2.1.12 (#1481)
Browse files Browse the repository at this point in the history
  • Loading branch information
FieteO authored Mar 23, 2024
1 parent 9569cbf commit 4fad46a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<packaging>jar</packaging>

<properties>
<dropwizard.version>2.0.34</dropwizard.version>
<jersey.version>2.33</jersey.version>
<dropwizard.version>2.1.12</dropwizard.version>
<jersey.version>2.35</jersey.version>
<logback.version>1.2.9</logback.version>
<cxf.version>3.4.5</cxf.version>
<shiro.version>1.12.0</shiro.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import javax.servlet.FilterRegistration;

import com.codahale.metrics.InstrumentedScheduledExecutorService;
import com.fasterxml.jackson.datatype.joda.JodaModule;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
Expand Down Expand Up @@ -127,7 +128,7 @@ public AppContext getContext() {
public void initialize(Bootstrap<ReaperApplicationConfiguration> bootstrap) {
bootstrap.addCommand(new ReaperDbMigrationCommand("schema-migration", "Performs database schema migrations"));
bootstrap.addBundle(new AssetsBundle("/assets/", "/webui", "index.html"));
bootstrap.getObjectMapper().registerModule(new JavaTimeModule());
bootstrap.getObjectMapper().registerModule(new JavaTimeModule()).registerModule(new JodaModule());

// enable using environment variables in yml files
final SubstitutingSourceProvider envSourceProvider = new SubstitutingSourceProvider(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import com.fasterxml.jackson.datatype.joda.JodaModule;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import com.google.common.cache.Cache;
Expand Down Expand Up @@ -181,7 +182,7 @@ public static CompactionStats parseCompactionStats(String json) throws IOExcepti
private static <T> T parseJson(String json, TypeReference<T> ref) throws IOException {
try {
ObjectMapper mapper = new ObjectMapper();
mapper.registerModule(new Jdk8Module());
mapper.registerModule(new Jdk8Module()).registerModule(new JodaModule());
return mapper.readValue(json, ref);
} catch (IOException e) {
LOG.error("Error parsing json", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.joda.JodaModule;
import com.google.common.collect.Maps;

import org.slf4j.Logger;
Expand Down Expand Up @@ -127,7 +128,7 @@ public static Response doHttpCall(

private static <T> T parseJSON(String json, TypeReference<T> ref) {
try {
return new ObjectMapper().readValue(json, ref);
return new ObjectMapper().registerModule(new JodaModule()).readValue(json, ref);
} catch (IOException e) {
LOG.error("error parsing json", e);
throw new RuntimeException(e);
Expand Down

0 comments on commit 4fad46a

Please sign in to comment.