Details
Description
(note: inspired by JACKSON-350)
Looks like classloading can be nasty problem (... never heard that one before?
).
Since neither 'default' nor contextual class work perfectly, let's use try both; starting with contextual.
If need be, can add more features in future. But let's first try simple improvement.
Activity
Tatu Saloranta
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | In Progress [ 3 ] |
Tatu Saloranta
made changes -
| Summary | Add a Feature to enforce use of 'Class.forName(...)' for class loading (Jackson 2) | Improve class loading to use both contextual ClassLoader and 'Class.forName(...)' |
| Description |
(note: inspired by [ Looks like classloading can be nasty problem (... never heard that one before? :) ). One short-term improvement would be to allow choosing between context classloader, and basic 'Class.forName()', as neither seems to work in all cases, and both have some valid use cases. |
(note: inspired by [ Looks like classloading can be nasty problem (... never heard that one before? :) ). Since neither 'default' nor contextual class work perfectly, let's use try both; starting with contextual. If need be, can add more features in future. But let's first try simple improvement. |
Tatu Saloranta
made changes -
| Status | In Progress [ 3 ] | Resolved [ 5 ] |
| Fix Version/s | 1.8.9 [ 18299 ] | |
| Fix Version/s | 1.9.6 [ 18358 ] | |
| Resolution | Fixed [ 1 ] |
Gaetan Pitteloud
made changes -
| Attachment | ClassDeserializer.java [ 61977 ] |
Additionally should just add something like "DeserializationContext.findClass(String className)", to enclose details. This could also use fallbacks.
Further, I think it actually makes sense to try both approaches: perhaps first contextual ClassLoader, and if that fails, Class.forName().