microsoft / spring-data-gremlin

We are in the process of deprecating Spring Data Gremlin. -- Provide generic annotation oriented programming form based on gremlin for graph database
Other
129 stars 76 forks source link

avoid unchecked casts in `AbstractGremlinResultReader#readProperty` #256

Open harti2006 opened 5 years ago

harti2006 commented 5 years ago

Description

This is a small improvement of the readProperty method: I replaced the unchecked cast with some more robust ones that don't rely on a specific implementation of java.util.Map. This allows me to use this library with Amazon Neptune and the Serializers.GRAPHSON_V1D0 (org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0). The recommended Serializers.GRAPHSON (org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0) did not work in my project, because it produced the same data structure as handled in https://github.com/microsoft/spring-data-gremlin/pull/243.

Todos

Steps to Test

codecov-io commented 5 years ago

Codecov Report

Merging #256 into master will increase coverage by 0.01%. The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #256      +/-   ##
==========================================
+ Coverage   86.21%   86.22%   +0.01%     
==========================================
  Files          60       60              
  Lines        1357     1358       +1     
  Branches      232      232              
==========================================
+ Hits         1170     1171       +1     
  Misses         74       74              
  Partials      113      113
Impacted Files Coverage Δ
...conversion/result/AbstractGremlinResultReader.java 88.88% <75%> (+1.38%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a1c230f...13f6c81. Read the comment docs.

harti2006 commented 5 years ago

The changed code is already covered by some unit tests.

targeter21 commented 4 years ago

Could a reviewer look at this in the interest of it being merged? This seems to be all that's needed for working with AWS Neptune.