You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Nitin Gupta (JIRA)" <ji...@apache.org> on 2019/07/03 03:36:00 UTC
[jira] [Created] (OAK-8455) Memory Node store implementation of
ProeprtyState throws Exception that is not in line with the API
documentation
Nitin Gupta created OAK-8455:
--------------------------------
Summary: Memory Node store implementation of ProeprtyState throws Exception that is not in line with the API documentation
Key: OAK-8455
URL: https://issues.apache.org/jira/browse/OAK-8455
Project: Jackrabbit Oak
Issue Type: Bug
Reporter: Nitin Gupta
As per the api doc here [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-api/src/main/java/org/apache/jackrabbit/oak/api/PropertyState.java#L67#L69] for PropertyState the getValue method should throw an IllegalStateException if the actual Property stored is multivalued and the code calling getValue(Type type) expects it to be single valued i.e type.isArray() == false .
In SegmentStore implementation , this is followed and the getValue method throws an IllegalStateException in this scenario .
However in case of MemoryNodeStore , the code here throws an IllegalArgumentException [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MultiPropertyState.java#L151#L154] instead of IllegalStateException .
Since MemoryNodeStore is primarily used in testing , this difference in implementation can lead to false or incomplete testing .
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)