[jira] Commented: (JCR-1212) JCR2SPI Node.hasProperty(String) optional property incompatibility with Jeceira
[ https://issues.apache.org/jira/browse/JCR-1212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12543945 ] angela commented on JCR-1212: - david, any news on this? JCR2SPI Node.hasProperty(String) optional property incompatibility with Jeceira - Key: JCR-1212 URL: https://issues.apache.org/jira/browse/JCR-1212 Project: Jackrabbit Issue Type: Improvement Components: SPI Affects Versions: 1.4 Environment: 1.4-SNAPSHOT Reporter: David Rauschenbach Priority: Minor Jeceira throws a PathNotFoundException when an SPI2JCR-wrapped Jeceira repository gets invoked with the SPI getPropertyInfo, specifying an optional property that does not exist for a given node instance. JCR2SPI only expects an ItemNotFoundException to be thrown in such a case, which prevents Node.hasProperty(String) from returning true/false, and instead results in a RepositoryException being thrown, which in effect is an interoperability issue. JCR2SPI compatibility with Jeceira-based repositories would be significantly improved if the code in NodeEntryImpl.java:loadPropertyEntry(PropertyId) caught not only ItemNotFoundException, but also PathNotFoundException, before returning null in both cases. Proposed change to NodeEntryImpl.java: private PropertyEntry loadPropertyEntry(PropertyId childId) throws RepositoryException { try { PropertyState state = factory.getItemStateFactory().createDeepPropertyState(childId, this); return (PropertyEntry) state.getHierarchyEntry(); } catch (ItemNotFoundException e) { return null; } catch (PathNotFoundException e) { -- new return null; -- new } } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (JCR-1212) JCR2SPI Node.hasProperty(String) optional property incompatibility with Jeceira
[ https://issues.apache.org/jira/browse/JCR-1212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12543947 ] David Rauschenbach commented on JCR-1212: - Sorry I've gone silent... worked through the last two weekends. Feel free to close this issue if you want, since I'm not going to be coding any unit tests this week. Thanks. I'll leave the exception mapping in my Jeceira-to-Jackrabbit mapping layer for now, and we'll have to worry about fixing either or both or neither products later. JCR2SPI Node.hasProperty(String) optional property incompatibility with Jeceira - Key: JCR-1212 URL: https://issues.apache.org/jira/browse/JCR-1212 Project: Jackrabbit Issue Type: Improvement Components: SPI Affects Versions: 1.4 Environment: 1.4-SNAPSHOT Reporter: David Rauschenbach Priority: Minor Jeceira throws a PathNotFoundException when an SPI2JCR-wrapped Jeceira repository gets invoked with the SPI getPropertyInfo, specifying an optional property that does not exist for a given node instance. JCR2SPI only expects an ItemNotFoundException to be thrown in such a case, which prevents Node.hasProperty(String) from returning true/false, and instead results in a RepositoryException being thrown, which in effect is an interoperability issue. JCR2SPI compatibility with Jeceira-based repositories would be significantly improved if the code in NodeEntryImpl.java:loadPropertyEntry(PropertyId) caught not only ItemNotFoundException, but also PathNotFoundException, before returning null in both cases. Proposed change to NodeEntryImpl.java: private PropertyEntry loadPropertyEntry(PropertyId childId) throws RepositoryException { try { PropertyState state = factory.getItemStateFactory().createDeepPropertyState(childId, this); return (PropertyEntry) state.getHierarchyEntry(); } catch (ItemNotFoundException e) { return null; } catch (PathNotFoundException e) { -- new return null; -- new } } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (JCR-1212) JCR2SPI Node.hasProperty(String) optional property incompatibility with Jeceira
[ https://issues.apache.org/jira/browse/JCR-1212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12543016 ] angela commented on JCR-1212: - I think that JCR2SPI and SPI2JCR should be as tolerant as possible with different JCR compliant implementations no objections here. however: before i spent hours to find out what david rauschenbach is refering to, i want him to create a simple test case that illustrates his problem with the default setup and shows the effect of the proposed modification. as stated above: from what i remember, the itemstatefactory implementation deals with the PathNotFoundException (and throws ItemNotFoundException). that's why i requested additional information. david rauschenbach, can you please provide that or resolve this issue? thanks angela JCR2SPI Node.hasProperty(String) optional property incompatibility with Jeceira - Key: JCR-1212 URL: https://issues.apache.org/jira/browse/JCR-1212 Project: Jackrabbit Issue Type: Improvement Components: SPI Affects Versions: 1.4 Environment: 1.4-SNAPSHOT Reporter: David Rauschenbach Priority: Minor Jeceira throws a PathNotFoundException when an SPI2JCR-wrapped Jeceira repository gets invoked with the SPI getPropertyInfo, specifying an optional property that does not exist for a given node instance. JCR2SPI only expects an ItemNotFoundException to be thrown in such a case, which prevents Node.hasProperty(String) from returning true/false, and instead results in a RepositoryException being thrown, which in effect is an interoperability issue. JCR2SPI compatibility with Jeceira-based repositories would be significantly improved if the code in NodeEntryImpl.java:loadPropertyEntry(PropertyId) caught not only ItemNotFoundException, but also PathNotFoundException, before returning null in both cases. Proposed change to NodeEntryImpl.java: private PropertyEntry loadPropertyEntry(PropertyId childId) throws RepositoryException { try { PropertyState state = factory.getItemStateFactory().createDeepPropertyState(childId, this); return (PropertyEntry) state.getHierarchyEntry(); } catch (ItemNotFoundException e) { return null; } catch (PathNotFoundException e) { -- new return null; -- new } } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (JCR-1212) JCR2SPI Node.hasProperty(String) optional property incompatibility with Jeceira
[ https://issues.apache.org/jira/browse/JCR-1212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542409 ] David Nuescheler commented on JCR-1212: --- I would take the following position on this. I think that JCR2SPI and SPI2JCR should be as tolerant as possible with different JCR compliant implementations. JCR compliant being the keyword ;) I guess I would agree to make modifications in any SPI layer in case we find out that we are not lenient enough to allow compliant repositories. I would probably have the jeceira guys fix their behavior in case they clearly violate the JCR spec. David, do you have an indication on what JCR method exactly you are talking about, and if the jeceira behaviour according to your reading of the JCR v1.0 spec is correct? Does that make sense? JCR2SPI Node.hasProperty(String) optional property incompatibility with Jeceira - Key: JCR-1212 URL: https://issues.apache.org/jira/browse/JCR-1212 Project: Jackrabbit Issue Type: Improvement Components: SPI Affects Versions: 1.4 Environment: 1.4-SNAPSHOT Reporter: David Rauschenbach Priority: Minor Jeceira throws a PathNotFoundException when an SPI2JCR-wrapped Jeceira repository gets invoked with the SPI getPropertyInfo, specifying an optional property that does not exist for a given node instance. JCR2SPI only expects an ItemNotFoundException to be thrown in such a case, which prevents Node.hasProperty(String) from returning true/false, and instead results in a RepositoryException being thrown, which in effect is an interoperability issue. JCR2SPI compatibility with Jeceira-based repositories would be significantly improved if the code in NodeEntryImpl.java:loadPropertyEntry(PropertyId) caught not only ItemNotFoundException, but also PathNotFoundException, before returning null in both cases. Proposed change to NodeEntryImpl.java: private PropertyEntry loadPropertyEntry(PropertyId childId) throws RepositoryException { try { PropertyState state = factory.getItemStateFactory().createDeepPropertyState(childId, this); return (PropertyEntry) state.getHierarchyEntry(); } catch (ItemNotFoundException e) { return null; } catch (PathNotFoundException e) { -- new return null; -- new } } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (JCR-1212) JCR2SPI Node.hasProperty(String) optional property incompatibility with Jeceira
[ https://issues.apache.org/jira/browse/JCR-1212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542069 ] angela commented on JCR-1212: - PropertyNotFoundException ? PathNotFoundException ? i don't know of a PropertyNotFoundException within jsr 170. please be consistent. and please provide a test case that illustrates the problem and shows that your proposal has an effect. from what i remember, the itemstatefactory implementation deal with the PathNotFoundException (and throw ItemNotFoundException. thus: i can't follow you again :( JCR2SPI Node.hasProperty(String) optional property incompatibility with Jeceira - Key: JCR-1212 URL: https://issues.apache.org/jira/browse/JCR-1212 Project: Jackrabbit Issue Type: Improvement Components: SPI Affects Versions: 1.4 Environment: 1.4-SNAPSHOT Reporter: David Rauschenbach Priority: Minor Jeceira throws a PropertyNotFoundException when an SPI2JCR-wrapped Jeceira repository gets invoked with the SPI getPropertyInfo, specifying an optional property that does not exist for a given node instance. JCR2SPI only expects an ItemNotFoundException to be thrown in such a case, which prevents Node.hasProperty(String) from returning true/false, and instead results in a RepositoryException being thrown, which in effect is an interoperability issue. JCR2SPI compatibility with Jeceira-based repositories would be significantly improved if the code in NodeEntryImpl.java:loadPropertyEntry(PropertyId) caught not only ItemNotFoundException, but also PathNotFoundException, before returning null in both cases. Proposed change to NodeEntryImpl.java: private PropertyEntry loadPropertyEntry(PropertyId childId) throws RepositoryException { try { PropertyState state = factory.getItemStateFactory().createDeepPropertyState(childId, this); return (PropertyEntry) state.getHierarchyEntry(); } catch (ItemNotFoundException e) { return null; } catch (PathNotFoundException e) { -- new return null; -- new } } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (JCR-1212) JCR2SPI Node.hasProperty(String) optional property incompatibility with Jeceira
[ https://issues.apache.org/jira/browse/JCR-1212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542128 ] Julian Reschke commented on JCR-1212: - I always get confused about PathNotFoundExceptions and ItemNotFoundExceptions :-) That being said, we should agree on what is correct, and then either fix SPI2JCR or Jeceira (that's open source too, right?). JCR2SPI Node.hasProperty(String) optional property incompatibility with Jeceira - Key: JCR-1212 URL: https://issues.apache.org/jira/browse/JCR-1212 Project: Jackrabbit Issue Type: Improvement Components: SPI Affects Versions: 1.4 Environment: 1.4-SNAPSHOT Reporter: David Rauschenbach Priority: Minor Jeceira throws a PathNotFoundException when an SPI2JCR-wrapped Jeceira repository gets invoked with the SPI getPropertyInfo, specifying an optional property that does not exist for a given node instance. JCR2SPI only expects an ItemNotFoundException to be thrown in such a case, which prevents Node.hasProperty(String) from returning true/false, and instead results in a RepositoryException being thrown, which in effect is an interoperability issue. JCR2SPI compatibility with Jeceira-based repositories would be significantly improved if the code in NodeEntryImpl.java:loadPropertyEntry(PropertyId) caught not only ItemNotFoundException, but also PathNotFoundException, before returning null in both cases. Proposed change to NodeEntryImpl.java: private PropertyEntry loadPropertyEntry(PropertyId childId) throws RepositoryException { try { PropertyState state = factory.getItemStateFactory().createDeepPropertyState(childId, this); return (PropertyEntry) state.getHierarchyEntry(); } catch (ItemNotFoundException e) { return null; } catch (PathNotFoundException e) { -- new return null; -- new } } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (JCR-1212) JCR2SPI Node.hasProperty(String) optional property incompatibility with Jeceira
[ https://issues.apache.org/jira/browse/JCR-1212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542132 ] David Rauschenbach commented on JCR-1212: - Agreed that there is probably a right answer about which exception is correct in various situations, which can be applied to Jeceira if appropriate. On the other hand, out of my support for SPI2JCR, I want to see it become more robust in terms of being more tolerant of various non-Jackrabbit based Repository implementations. JCR2SPI Node.hasProperty(String) optional property incompatibility with Jeceira - Key: JCR-1212 URL: https://issues.apache.org/jira/browse/JCR-1212 Project: Jackrabbit Issue Type: Improvement Components: SPI Affects Versions: 1.4 Environment: 1.4-SNAPSHOT Reporter: David Rauschenbach Priority: Minor Jeceira throws a PathNotFoundException when an SPI2JCR-wrapped Jeceira repository gets invoked with the SPI getPropertyInfo, specifying an optional property that does not exist for a given node instance. JCR2SPI only expects an ItemNotFoundException to be thrown in such a case, which prevents Node.hasProperty(String) from returning true/false, and instead results in a RepositoryException being thrown, which in effect is an interoperability issue. JCR2SPI compatibility with Jeceira-based repositories would be significantly improved if the code in NodeEntryImpl.java:loadPropertyEntry(PropertyId) caught not only ItemNotFoundException, but also PathNotFoundException, before returning null in both cases. Proposed change to NodeEntryImpl.java: private PropertyEntry loadPropertyEntry(PropertyId childId) throws RepositoryException { try { PropertyState state = factory.getItemStateFactory().createDeepPropertyState(childId, this); return (PropertyEntry) state.getHierarchyEntry(); } catch (ItemNotFoundException e) { return null; } catch (PathNotFoundException e) { -- new return null; -- new } } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.