Skip to content

Commit f81baa0

Browse files
ROCANA-11477: Fix AnnotationIntrospector.Pair usage in cm_api (#2)
* Replaces use of `AnnotationIntrospector.Pair` with `AnnotationIntrospectorPair` as recommended by the [jackson 2.1 javadoc](https://fasterxml.github.io/jackson-databind/javadoc/2.1.0/com/fasterxml/jackson/databind/AnnotationIntrospector.html) * This enables projects using newer versions of Jackson to include the API without problem because `AnnotationIntrospector.Pair` is removed in Jackson 2.3
1 parent d00f286 commit f81baa0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/src/main/java/com/cloudera/api/ApiObjectMapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616

1717
package com.cloudera.api;
1818

19-
import com.fasterxml.jackson.databind.AnnotationIntrospector;
2019
import com.fasterxml.jackson.databind.MapperFeature;
2120
import com.fasterxml.jackson.databind.ObjectMapper;
2221
import com.fasterxml.jackson.databind.SerializationFeature;
22+
import com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair;
2323
import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector;
2424

2525
import java.text.DateFormat;
@@ -38,7 +38,7 @@ public ApiObjectMapper() {
3838

3939
// Allow JAX-B annotations.
4040
setAnnotationIntrospector(
41-
new AnnotationIntrospector.Pair(
41+
new AnnotationIntrospectorPair(
4242
getSerializationConfig().getAnnotationIntrospector(),
4343
new JaxbAnnotationIntrospector()));
4444

0 commit comments

Comments
 (0)