John Blum created GEODE-8256:
--------------------------------

             Summary: The Jackson ObjectMapper used by a PdxInstance does not 
properly handle Java 8 Types
                 Key: GEODE-8256
                 URL: https://issues.apache.org/jira/browse/GEODE-8256
             Project: Geode
          Issue Type: Improvement
            Reporter: John Blum


The Jackson {{ObjectMapper}} in the {{PdxInstanceImpl}} class (see 
[here|https://github.com/apache/geode/blob/rel/v1.12.0/geode-core/src/main/java/org/apache/geode/pdx/internal/PdxInstanceImpl.java#L68-L75])is
 not properly configured.  

Specifically, it cannot handle *Java 8* types since these types are not 
included in Jackson 2, by default, primarily because Jackson 2 is based on Java 
6 (not Java 8).  However, that does not mean Jackson 2 cannot handle Java 8 
types, when configured properly with extension modules.

To make matters worse, the {{ObjectMapper}} used by PDX, and specifically the 
{{PdxInstance}} implementation, violates the _Open/Closed_ software design 
principle, so there is literally no way to modify (i.e. override/extend) the 
configuration of the {{ObjectMapper}} as required by the application.

See 
[here|https://github.com/spring-projects/spring-boot-data-geode/blob/1.3.0.RELEASE/spring-geode/src/test/java/org/springframework/geode/data/json/JsonCacheDataImporterExporterIntegrationTests.java#L583-L618]
 for a test case demonstrating the issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to