Hi,
All methods of the NodeStore API that take a NodeBuilder argument require that NodeBuilder to initially have been acquired from that same store. Otherwise the method will throw an IllegalArgumentException. E.g. the Javadoc of NodeStore.merge states: "throws IllegalArgumentException if the builder is not acquired from a root state of this store".
Michael On 1.9.16 9:36 , Robert Munteanu wrote:
Hi, I'm working on implementing a custom node store which multiplexes other node stores. Adding it as a fixture in oak-it results in a test failure in ReadWriteNamespaceRegistryTest.testMappings [1] The reason is that org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent class wraps the passed nodeStore into a MemoryNodeStore, and that memory node store later on receives a builder which is not MemoryNodeBuilder [2] → IllegalArgumentException. I'm not familiar enough with that class to propose a fix, but effectively it forces all builders to be MemoryNodeBuilders, which is too restrictive IMO. Is this a bug to file or something that I need to live with when implementing a new NodeStore? Thanks, Robert [1]: https://github.com/apache/jackrabbit-oak/blob/64f48874ac4aab6e0ffb 085e07642ffa44d8c7ca/oak- it/src/test/java/org/apache/jackrabbit/oak/plugins/name/ReadWriteNamesp aceRegistryTest.java#L46 [2]: https://github.com/apache/jackrabbit-oak/blob/64f48874ac4aab6e0ffb 085e07642ffa44d8c7ca/oak- core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/write/Ini tialContent.java#L119
