Fix: checking if a parameter is integer in packer by using Integer.isInteger #188
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the following scenario we have one module that uses a different version of
neo4j-driverthat the one that is installed in the project.This will result in loading 2 instances of
neo4j-driverand 2 instances of the classInteger.Now lets say that
module_agenerates anIntegerusing it's version of theIntegerclass and then that integer is passed in a query (using the project's version ofneo4j-driver). When the packer checks for integer it checks the class, but it check it's version ofIntegerwhich is different and fails to parse it as an integer, defaulting to parse it as an object ({low, high}).As seen in the screenshot, in the packer,
xis anIntegerclass, but not the same class that is checked against.I think a good solution for this is to use the
Integer.isIntegerimplementation to check for integers.