Skip to content

Commit a23ff9f

Browse files
committed
Minor javadoc additions wrt #868, change jackson-core/annotations deps to 2.6.0 (release)
1 parent 4333eb6 commit a23ff9f

File tree

5 files changed

+27
-6
lines changed

5 files changed

+27
-6
lines changed

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<parent>
66
<groupId>com.fasterxml.jackson</groupId>
77
<artifactId>jackson-parent</artifactId>
8-
<version>2.6.0-rc1</version>
8+
<version>2.6.1</version>
99
</parent>
1010

1111
<groupId>com.fasterxml.jackson.core</groupId>
1212
<artifactId>jackson-databind</artifactId>
13-
<version>2.6.0-rc5-SNAPSHOT</version>
13+
<version>2.6.0-SNAPSHOT</version>
1414
<name>jackson-databind</name>
1515
<packaging>bundle</packaging>
1616
<description>General data-binding functionality for Jackson: works on core streaming API</description>
@@ -20,7 +20,7 @@
2020
<connection>scm:git:[email protected]:FasterXML/jackson-databind.git</connection>
2121
<developerConnection>scm:git:[email protected]:FasterXML/jackson-databind.git</developerConnection>
2222
<url>http://github.com/FasterXML/jackson-databind</url>
23-
<tag>jackson-databind-2.6.0-rc3</tag>
23+
<tag>HEAD</tag>
2424
</scm>
2525

2626
<properties>
@@ -69,12 +69,12 @@ javax.xml.datatype, javax.xml.namespace, javax.xml.parsers
6969
<dependency>
7070
<groupId>com.fasterxml.jackson.core</groupId>
7171
<artifactId>jackson-annotations</artifactId>
72-
<version>2.6.0-rc3</version>
72+
<version>2.6.0</version>
7373
</dependency>
7474
<dependency>
7575
<groupId>com.fasterxml.jackson.core</groupId>
7676
<artifactId>jackson-core</artifactId>
77-
<version>2.6.0-rc3</version>
77+
<version>2.6.0</version>
7878
</dependency>
7979

8080
<!-- and for testing we need a few libraries

release-notes/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Project: jackson-databind
8181
#840: Change semantics of `@JsonPropertyOrder(alphabetic)` to only count `true` value
8282
#848: Custom serializer not used if POJO has `@JsonValue`
8383
#849: Possible problem with `NON_EMPTY` exclusion, `int`s, `Strings`
84+
#868: Annotations are lost in the case of duplicate methods
8485
- Remove old cglib compatibility tests; cause problems in Eclipse
8586
- Add `withFilterId()` method in `JsonSerializer` (demote from `BeanSerializer`)
8687

src/main/java/com/fasterxml/jackson/databind/deser/std/StdDelegatingDeserializer.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import java.io.IOException;
44

55
import com.fasterxml.jackson.core.JsonParser;
6-
import com.fasterxml.jackson.core.JsonProcessingException;
76
import com.fasterxml.jackson.databind.*;
87
import com.fasterxml.jackson.databind.deser.ContextualDeserializer;
98
import com.fasterxml.jackson.databind.deser.ResolvableDeserializer;

src/main/java/com/fasterxml/jackson/databind/introspect/POJOPropertyBuilder.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,15 @@ private AnnotationMap _mergeAnnotations(int index, Linked<? extends AnnotatedMem
714714
return ann;
715715
}
716716

717+
/**
718+
* Replacement, as per [databind#868], of simple access to annotations, which
719+
* does "deep merge" if an as necessary.
720+
*<pre>
721+
* nodes[index].value.getAllAnnotations()
722+
*</pre>
723+
*
724+
* @since 2.6
725+
*/
717726
private <T extends AnnotatedMember> AnnotationMap _getAllAnnotations(Linked<T> node) {
718727
AnnotationMap ann = node.value.getAllAnnotations();
719728
if (node.next != null) {
@@ -722,7 +731,17 @@ private <T extends AnnotatedMember> AnnotationMap _getAllAnnotations(Linked<T> n
722731
return ann;
723732
}
724733

734+
/**
735+
* Helper method to handle recursive merging of annotations within accessor class,
736+
* to ensure no annotations are accidentally dropped within chain when non-visible
737+
* and secondary accessors are pruned later on.
738+
*<p>
739+
* See [databind#868] for more information.
740+
*
741+
* @since 2.6
742+
*/
725743
private <T extends AnnotatedMember> Linked<T> _applyAnnotations(Linked<T> node, AnnotationMap ann) {
744+
@SuppressWarnings("unchecked")
726745
T value = (T) node.value.withAnnotations(ann);
727746
if (node.next != null) {
728747
node = node.withNext(_applyAnnotations(node.next, ann));

src/test/java/com/fasterxml/jackson/databind/seq/ObjectReaderTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public void testPointerLoadingMappingIteratorOne() throws Exception {
8181
assertTrue(pojo.name.containsKey("value"));
8282
assertEquals(1234, pojo.name.get("value"));
8383
assertFalse(itr.hasNext());
84+
itr.close();
8485
}
8586

8687
public void testPointerLoadingMappingIteratorMany() throws Exception {
@@ -101,5 +102,6 @@ public void testPointerLoadingMappingIteratorMany() throws Exception {
101102
assertTrue(pojo.name.containsKey("value"));
102103
assertEquals(5678, pojo.name.get("value"));
103104
assertFalse(itr.hasNext());
105+
itr.close();
104106
}
105107
}

0 commit comments

Comments
 (0)