Skip to content

jackson 2.9.1#2342

Closed
pjfanning wants to merge 5 commits intoswagger-api:masterfrom
pjfanning:jackson-2.9.0
Closed

jackson 2.9.1#2342
pjfanning wants to merge 5 commits intoswagger-api:masterfrom
pjfanning:jackson-2.9.0

Conversation

@pjfanning
Copy link
Contributor

No description provided.

Copy link

@deki deki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great that you updated it. Currently swagger fails when Jackson 2.9.0 is on classpath. I don't understand why the Jackson guys couldn't deprecate the annotated() method first and remove it later.

pom.xml Outdated
<surefire-version>2.18.1</surefire-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<commons-lang-version>3.2.1</commons-lang-version>
<commons-lang-version>3.5</commons-lang-version>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.6 is latest release

if (member != null && !ignore(member, xmlAccessorTypeAnnotation, propName, propertiesToIgnore)) {
List<Annotation> annotationList = new ArrayList<Annotation>();
for (Annotation a : member.annotations()) {
for (Annotation a : member.getAllAnnotations().annotations()) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a null check should be added

} else {
return context.resolveProperty(propType,
Iterables.toArray(propMember.annotations(), Annotation.class));
Iterables.toArray(propMember.getAllAnnotations().annotations(), Annotation.class));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a null check should be added

paramType = field.getRawType();

for (final Annotation fieldAnnotation : field.annotations()) {
for (final Annotation fieldAnnotation : field.getAllAnnotations().annotations()) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a null check should be added

}

for (final Annotation fieldAnnotation : setter.annotations()) {
for (final Annotation fieldAnnotation : setter.getAllAnnotations().annotations()) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a null check should be added

}

for (final Annotation fieldAnnotation : getter.annotations()) {
for (final Annotation fieldAnnotation : getter.getAllAnnotations().annotations()) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a null check should be added

@pjfanning
Copy link
Contributor Author

@deki thanks for reviewing - I have pushed a new commit to address the issues you raised

deki referenced this pull request in FasterXML/jackson-databind Aug 1, 2017
@Helmsdown
Copy link
Contributor

+1 for this PR. We just ran into this with a wonderful NoSuchMethodError

@garydgregory
Copy link
Contributor

+1. Please never break binary compatibility in a minor release and create jar hell for the rest of us. If you do want to break BC, do so in a major release along with a package name and Maven coordinate change. That the only same way to go.

@pjfanning
Copy link
Contributor Author

pjfanning commented Aug 1, 2017

I was unaware of FasterXML/jackson-databind@bf451c0 when I added this PR. I just assumed the annoations in jackson-databind had been deprecated.
Is it not possible to workaround the issue by using jackson 2.8.9 (which swagger is still currently dependent on)?

@ttiurani
Copy link

+1. I'm also in jar hell because of the jackson-databind mess, and unfortunately 2.9.0 already sneaked in as a dependendency to my project. Any rough estimates on when this might be merged & released?

@plelevier
Copy link

+1. Jar hell for me too

@deki
Copy link

deki commented Aug 28, 2017

I created a PR for Jackson to reintroduce the method for 2.9.1 release for the meantime: FasterXML/jackson-databind#1752

@deki
Copy link

deki commented Sep 11, 2017

Jackson 2.9.1 was released in the meantime. My fix is included. So in case you are in jar hell, you can solve it now.

@pjfanning pjfanning changed the title jackson 2.9.0 jackson 2.9.1 Sep 11, 2017
@pjfanning
Copy link
Contributor Author

This is already updated in the 2.0 branch

@pjfanning pjfanning closed this Nov 20, 2017
@pjfanning pjfanning deleted the jackson-2.9.0 branch December 20, 2017 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants