Skip to content

Commit 174aa43

Browse files
committed
refactor: make default ObjectMapper constant
1 parent 83a21cc commit 174aa43

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
/** An interface from which to retrieve configuration information. */
1010
public interface ConfigurationService {
1111

12+
ObjectMapper OBJECT_MAPPER = new ObjectMapper();
13+
1214
/**
1315
* Retrieves the configuration associated with the specified controller
1416
*
@@ -77,7 +79,7 @@ default int concurrentReconciliationThreads() {
7779
* @return the ObjectMapper to use
7880
*/
7981
default ObjectMapper getObjectMapper() {
80-
return new ObjectMapper();
82+
return OBJECT_MAPPER;
8183
}
8284

8385
int DEFAULT_TERMINATION_TIMEOUT_SECONDS = 10;

0 commit comments

Comments
 (0)