Skip to content

Conversation

legraphista
Copy link

In the following scenario we have one module that uses a different version of neo4j-driver that the one that is installed in the project.

node_modules/
 - [email protected]
 - module_a/
  - [email protected]

This will result in loading 2 instances of neo4j-driver and 2 instances of the class Integer.

Now lets say that module_a generates an Integer using it's version of the Integer class and then that integer is passed in a query (using the project's version of neo4j-driver). When the packer checks for integer it checks the class, but it check it's version of Integer which is different and fails to parse it as an integer, defaulting to parse it as an object ({low, high}).

image
As seen in the screenshot, in the packer, x is an Integer class, but not the same class that is checked against.

I think a good solution for this is to use the Integer.isInteger implementation to check for integers.

@lutovich
Copy link
Contributor

Hi @legraphista,

Thanks for the fix. It makes perfect sense. I'll merge it to 1.0 and 1.1 branches.

@lutovich lutovich merged commit 2be25cd into neo4j:1.0 Jan 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants