File tree Expand file tree Collapse file tree
afterburner/src/test/java
tools/jackson/module/afterburner/tofix
blackbird/src/main/resources/META-INF Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4141 opens tools .jackson .module .afterburner .ser .filter ;
4242 opens tools .jackson .module .afterburner .testutil ;
4343 opens tools .jackson .module .afterburner .testutil .failure ;
44+ opens tools .jackson .module .afterburner .tofix ;
4445 opens tools .jackson .module .afterburner .util ;
4546
4647 provides tools .jackson .databind .JacksonModule with
Original file line number Diff line number Diff line change 1+ package tools .jackson .module .afterburner .tofix ;
2+
3+ import org .junit .jupiter .api .Test ;
4+
5+ import tools .jackson .databind .ObjectMapper ;
6+ import tools .jackson .module .afterburner .AfterburnerTestBase ;
7+ import tools .jackson .module .afterburner .testutil .failure .JacksonTestFailureExpected ;
8+
9+ import static org .junit .jupiter .api .Assertions .assertEquals ;
10+
11+ // Reported as: https://github.com/FasterXML/jackson-modules-base/issues/314
12+ // but does not seem to fail as expected
13+ public class AfterburnerGenericInterface314Test extends AfterburnerTestBase
14+ {
15+ interface A314 <T > {
16+ T getBody ();
17+ }
18+
19+ static class MD314 implements A314 <String > {
20+ private String body ;
21+
22+ public MD314 (String b ) {
23+ body = b ;
24+ }
25+
26+ @ Override
27+ public String getBody () {
28+ return body ;
29+ }
30+ }
31+
32+ //@JacksonTestFailureExpected
33+ @ Test
34+ public void testMapperAfterUse () throws Exception
35+ {
36+ final ObjectMapper mapper = newAfterburnerMapper ();
37+ String json = mapper .writeValueAsString (new MD314 ("test" ));
38+ assertEquals ("{\" body\" :\" test\" }" , json );
39+ }
40+ }
Original file line number Diff line number Diff line change 1- This copy of Jackson JSON processor `jackson-module-afterburner ` module is licensed under the
1+ This copy of Jackson JSON processor `jackson-module-blackbird ` module is licensed under the
22Apache (Software) License, version 2.0 ("the License").
33See the License for details about distribution rights, and the
44specific rights regarding derivative works.
You can’t perform that action at this time.
0 commit comments