[jira] [Updated] (OAK-8455) Memory Node store implementation of PropertyState throws Exception that is not in line with the API documentation
[ https://issues.apache.org/jira/browse/OAK-8455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Mueller updated OAK-8455: Fix Version/s: 1.16.0 > Memory Node store implementation of PropertyState 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 > Components: store-spi >Reporter: Nitin Gupta >Assignee: Thomas Mueller >Priority: Major > Labels: indexingPatch > Fix For: 1.16.0 > > Attachments: OAK-8455_1.patch > > > 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 . > > For example , the fix for https://issues.apache.org/jira/browse/OAK-8328 > required to catch IllegalStateException in a use case where the property was > configured to be multi valued in the repository but the code expected it to > be single valued . Now the fix works fine on SegmentStore , but due to the > difference in implementation in MemoryNodeStore , a test written with > memorynode store fails . > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OAK-8455) Memory Node store implementation of PropertyState throws Exception that is not in line with the API documentation
[ https://issues.apache.org/jira/browse/OAK-8455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Mueller updated OAK-8455: Labels: indexingPatch (was: ) > Memory Node store implementation of PropertyState 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 > Components: store-spi >Reporter: Nitin Gupta >Priority: Major > Labels: indexingPatch > Attachments: OAK-8455_1.patch > > > 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 . > > For example , the fix for https://issues.apache.org/jira/browse/OAK-8328 > required to catch IllegalStateException in a use case where the property was > configured to be multi valued in the repository but the code expected it to > be single valued . Now the fix works fine on SegmentStore , but due to the > difference in implementation in MemoryNodeStore , a test written with > memorynode store fails . > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OAK-8455) Memory Node store implementation of PropertyState throws Exception that is not in line with the API documentation
[ https://issues.apache.org/jira/browse/OAK-8455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nitin Gupta updated OAK-8455: - Attachment: OAK-8455_1.patch > Memory Node store implementation of PropertyState 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 > Components: store-spi >Reporter: Nitin Gupta >Priority: Major > Attachments: OAK-8455_1.patch > > > 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 . > > For example , the fix for https://issues.apache.org/jira/browse/OAK-8328 > required to catch IllegalStateException in a use case where the property was > configured to be multi valued in the repository but the code expected it to > be single valued . Now the fix works fine on SegmentStore , but due to the > difference in implementation in MemoryNodeStore , a test written with > memorynode store fails . > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OAK-8455) Memory Node store implementation of PropertyState throws Exception that is not in line with the API documentation
[ https://issues.apache.org/jira/browse/OAK-8455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nitin Gupta updated OAK-8455: - Summary: Memory Node store implementation of PropertyState throws Exception that is not in line with the API documentation (was: Memory Node store implementation of ProeprtyState throws Exception that is not in line with the API documentation) > Memory Node store implementation of PropertyState 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 >Priority: Major > > 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 . > > For example , the fix for https://issues.apache.org/jira/browse/OAK-8328 > required to catch IllegalStateException in a use case where the property was > configured to be multi valued in the repository but the code expected it to > be single valued . Now the fix works fine on SegmentStore , but due to the > difference in implementation in MemoryNodeStore , a test written with > memorynode store fails . > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OAK-8455) Memory Node store implementation of PropertyState throws Exception that is not in line with the API documentation
[ https://issues.apache.org/jira/browse/OAK-8455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nitin Gupta updated OAK-8455: - Component/s: store-spi > Memory Node store implementation of PropertyState 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 > Components: store-spi >Reporter: Nitin Gupta >Priority: Major > > 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 . > > For example , the fix for https://issues.apache.org/jira/browse/OAK-8328 > required to catch IllegalStateException in a use case where the property was > configured to be multi valued in the repository but the code expected it to > be single valued . Now the fix works fine on SegmentStore , but due to the > difference in implementation in MemoryNodeStore , a test written with > memorynode store fails . > -- This message was sent by Atlassian JIRA (v7.6.3#76005)