Skip to content

Commit 2cb91b0

Browse files
committed
Fix #74
1 parent 38eee87 commit 2cb91b0

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

mrbean/src/main/java/com/fasterxml/jackson/module/mrbean/AbstractTypeMaterializer.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ public Class<?> materializeRawType(MapperConfig<?> config, AnnotatedClass typeDe
254254
return _classLoader.loadAndResolve(newName, bytecode, rawType);
255255
}
256256

257-
private boolean _suitableType(JavaType type)
257+
// private until 2.9.9
258+
protected boolean _suitableType(JavaType type)
258259
{
259260
// Future plans may include calling of this method for all kinds of abstract types.
260261
// So as simple precaution, let's limit kinds of types we will try materialize
@@ -268,7 +269,9 @@ private boolean _suitableType(JavaType type)
268269
// 22-Jun-2016, tatu: As per [#12], avoid these too
269270
|| (cls == Date.class) || (cls == Calendar.class)
270271
|| (cls == CharSequence.class) || (cls == Iterable.class) || (cls == Iterator.class)
271-
) {
272+
// 06-Feb-2019, tatu: [modules-base#74] and:
273+
|| (cls == java.io.Serializable.class)
274+
) {
272275
return false;
273276
}
274277

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>com.fasterxml.jackson</groupId>
55
<artifactId>jackson-base</artifactId>
6-
<version>2.9.8</version>
6+
<version>2.9.9-SNAPSHOT</version>
77
</parent>
88
<groupId>com.fasterxml.jackson.module</groupId>
99
<artifactId>jackson-modules-base</artifactId>

release-notes/CREDITS-2.x

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,8 @@ Dan Sănduleac (dansanduleac@github)
3131
* Reported, contributed fix to #69: `ALLOW_COERCION_OF_SCALARS` ignored deserializing scalars
3232
with Afterburner
3333
(2.9.9)
34+
35+
Georg Schmidt-Dumont (georgschmidtdumont@github)
36+
37+
* Reported #74: MrBean module should not materialize `java.io.Serializable`
38+
(2.9.9)

release-notes/VERSION-2.x

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Modules:
1414

1515
#69: `ALLOW_COERCION_OF_SCALARS` ignored deserializing scalars with Afterburner
1616
(reported, fix contributed by Dan S)
17+
#74: MrBean module should not materialize `java.io.Serializable`
18+
(reported by Georg S-D)
1719

1820
2.9.8 (15-Dec-2018)
1921

0 commit comments

Comments
 (0)