Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.

avoid unchecked casts in AbstractGremlinResultReader#readProperty #256

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

harti2006
Copy link

@harti2006 harti2006 commented Nov 28, 2019

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 #243.

Todos

  • Tests
  • Documentation

Steps to Test

  • set up an instance of Amazon Neptune (without IAM role authentication)
  • configure this library with Serializers.GRAPHSON_V1D0
  • create a Vertex class and respective Repository
  • use repository.save or repository.findAll

@codecov-io
Copy link

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%) ⬆️

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
Copy link
Author

The changed code is already covered by some unit tests.

@targeter21
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants