Skip to content

Commit f50603c

Browse files
authored
Merge pull request #92 from HubSpot/mk-record-error-details
Add fix guava serialization
2 parents 15aebd3 + 67ec3d4 commit f50603c

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

check_api/pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,24 @@
136136
<artifactId>caffeine</artifactId>
137137
<version>${caffeine.version}</version>
138138
</dependency>
139+
139140
<!-- Hubspot deps -->
140141
<dependency>
141142
<groupId>com.fasterxml.jackson.core</groupId>
142143
<artifactId>jackson-databind</artifactId>
143144
<version>2.12.5</version>
144145
</dependency>
146+
<dependency>
147+
<groupId>com.fasterxml.jackson.datatype</groupId>
148+
<artifactId>jackson-datatype-guava</artifactId>
149+
<version>2.12.5</version>
150+
</dependency>
151+
<dependency>
152+
<groupId>com.fasterxml.jackson.datatype</groupId>
153+
<artifactId>jackson-datatype-jdk8</artifactId>
154+
<version>2.12.5</version>
155+
</dependency>
156+
145157
<dependency>
146158
<!-- Apache 2.0 -->
147159
<groupId>com.google.jimfs</groupId>

check_api/src/main/java/com/google/errorprone/hubspot/FileManager.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@
2424
import java.util.Optional;
2525

2626
import com.fasterxml.jackson.databind.ObjectMapper;
27+
import com.fasterxml.jackson.datatype.guava.GuavaModule;
28+
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
2729
import com.google.common.base.Strings;
2830
import com.sun.tools.javac.util.Context;
2931

3032
class FileManager {
31-
private static final ObjectMapper MAPPER = new ObjectMapper();
33+
private static final ObjectMapper MAPPER = new ObjectMapper().registerModules(new GuavaModule(), new Jdk8Module());
3234
private static final String OVERWATCH_DIR_ENV_VAR = "MAVEN_PROJECTBASEDIR";
3335
private static final String BLAZAR_DIR_ENV_VAR = "VIEWABLE_BUILD_ARTIFACTS_DIR";
3436

0 commit comments

Comments
 (0)