I faced a bug while storing MEdge and MVertex in a HashMap. Under certain circumstances, I was not able to retrieve them. To reproduce the issue, I found no other way than create and loop over a large amount of elements (~10k), probably because instances was cached by MapDB. Related unit tests are provided in the patch.
PS1: The Property Graph Model Test Suite does not make use of Elements implementation hashCode() and equals() methods, instead they rely on the ElementHelper.areEquals() static method. I don't know why?
PS2: unused imports in existing test classes was cleaned (using Intellij auto-formatter :)
I faced a bug while storing MEdge and MVertex in a HashMap. Under certain circumstances, I was not able to retrieve them. To reproduce the issue, I found no other way than create and loop over a large amount of elements (~10k), probably because instances was cached by MapDB. Related unit tests are provided in the patch.
PS1: The Property Graph Model Test Suite does not make use of
Elements
implementationhashCode()
andequals()
methods, instead they rely on theElementHelper.areEquals()
static method. I don't know why?PS2: unused imports in existing test classes was cleaned (using Intellij auto-formatter :)