You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2011/07/07 10:44:16 UTC
[jira] [Created] (JCR-3014) Identifier paths for inexistent items
throw exception
Identifier paths for inexistent items throw exception
-----------------------------------------------------
Key: JCR-3014
URL: https://issues.apache.org/jira/browse/JCR-3014
Project: Jackrabbit Content Repository
Issue Type: Bug
Reporter: Marcel Reutegger
The following fails with a RepositoryException but it should rather return false:
session.itemExists("[" + UUID.randomUUID() + "]")
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JCR-3014) Identifier paths for inexistent items
throw exception
Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064650#comment-13064650 ]
Stefan Guggisberg commented on JCR-3014:
----------------------------------------
i don't agree with the current changes.
IMO we should fix the IdentifierResolver interface and its implementations instead.
public Path getPath(String identifier) throws MalformedPathException;
should be changed to
public Path getPath(String identifier) throws ItemNotFoundException, MalformedIdentifierException;
> Identifier paths for inexistent items throw exception
> -----------------------------------------------------
>
> Key: JCR-3014
> URL: https://issues.apache.org/jira/browse/JCR-3014
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Reporter: Marcel Reutegger
> Assignee: Alex Parvulescu
> Fix For: 2.3.0
>
>
> The following fails with a RepositoryException but it should rather return false:
> session.itemExists("[" + UUID.randomUUID() + "]")
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JCR-3014) Identifier paths for inexistent items
throw exception
Posted by "Alex Parvulescu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064695#comment-13064695 ]
Alex Parvulescu commented on JCR-3014:
--------------------------------------
ok, I did a full rollback. this needs more thought.
I didn't really like the fact that in a lot of places the actual error is wrapped into a repository exception and then thrown again.
so this seemed the easiest way to handle the problem.
your solution is more involved, there will be a lot of changes, but I guess in the in the end a cleaner api is more beneficial.
also, by 'MalformedIdentifierException' do you mean creating a new exception class?
> Identifier paths for inexistent items throw exception
> -----------------------------------------------------
>
> Key: JCR-3014
> URL: https://issues.apache.org/jira/browse/JCR-3014
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Reporter: Marcel Reutegger
> Assignee: Alex Parvulescu
> Fix For: 2.3.0
>
>
> The following fails with a RepositoryException but it should rather return false:
> session.itemExists("[" + UUID.randomUUID() + "]")
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (JCR-3014) Identifier paths for inexistent items
throw exception
Posted by "Alex Parvulescu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Parvulescu resolved JCR-3014.
----------------------------------
Resolution: Fixed
Fix Version/s: 2.3.0
Assignee: Alex Parvulescu
> Identifier paths for inexistent items throw exception
> -----------------------------------------------------
>
> Key: JCR-3014
> URL: https://issues.apache.org/jira/browse/JCR-3014
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Reporter: Marcel Reutegger
> Assignee: Alex Parvulescu
> Fix For: 2.3.0
>
>
> The following fails with a RepositoryException but it should rather return false:
> session.itemExists("[" + UUID.randomUUID() + "]")
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JCR-3014) Identifier paths for inexistent items
throw exception
Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066212#comment-13066212 ]
Stefan Guggisberg commented on JCR-3014:
----------------------------------------
> your solution is more involved, there will be a lot of changes
you're right. i've chosen a simpler approach now. it's not very elegant
but it solves the problem with minimal risk of regressions and all
existing tests passing.
> Identifier paths for inexistent items throw exception
> -----------------------------------------------------
>
> Key: JCR-3014
> URL: https://issues.apache.org/jira/browse/JCR-3014
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Reporter: Marcel Reutegger
> Assignee: Alex Parvulescu
> Fix For: 2.3.0
>
>
> The following fails with a RepositoryException but it should rather return false:
> session.itemExists("[" + UUID.randomUUID() + "]")
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JCR-3014) Identifier paths for inexistent items
throw exception
Posted by "Alex Parvulescu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13063986#comment-13063986 ]
Alex Parvulescu commented on JCR-3014:
--------------------------------------
ok, I didn't do a full rollback after all. I just removed the part that checks properties.
I got confused by the failing test [0]. But the problem is that I'm not sure if that the test is actually ok: NamespaceRemappingTest.testExceptionOnUnknownPrefix(NamespaceRemappingTest.java:174) [1].
It relies on session.propertyExists to throw an exception if a property does not exist, but the api [2] states that is will throw an exception only if the path is "not a well-formed absolute path"
So in the case where you have a well-formed absolute path that does not exist, you'll still get an error, which does not feel right. We can fix that too, but then the test [1] will break.
[0] https://builds.apache.org/job/Jackrabbit-trunk/org.apache.jackrabbit$jackrabbit-core/1580/testReport/junit/org.apache.jackrabbit.test.api/NamespaceRemappingTest/testExceptionOnUnknownPrefix/
[1] http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/NamespaceRemappingTest.java?view=markup
[2] http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/javax/jcr/Session.html#propertyExists(java.lang.String)
> Identifier paths for inexistent items throw exception
> -----------------------------------------------------
>
> Key: JCR-3014
> URL: https://issues.apache.org/jira/browse/JCR-3014
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Reporter: Marcel Reutegger
> Assignee: Alex Parvulescu
> Fix For: 2.3.0
>
>
> The following fails with a RepositoryException but it should rather return false:
> session.itemExists("[" + UUID.randomUUID() + "]")
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (JCR-3014) Identifier paths for inexistent items
throw exception
Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Guggisberg resolved JCR-3014.
------------------------------------
Resolution: Fixed
Assignee: Stefan Guggisberg (was: Alex Parvulescu)
fixed in revision 1147320.
> Identifier paths for inexistent items throw exception
> -----------------------------------------------------
>
> Key: JCR-3014
> URL: https://issues.apache.org/jira/browse/JCR-3014
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Reporter: Marcel Reutegger
> Assignee: Stefan Guggisberg
> Fix For: 2.3.0
>
>
> The following fails with a RepositoryException but it should rather return false:
> session.itemExists("[" + UUID.randomUUID() + "]")
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (JCR-3014) Identifier paths for inexistent items
throw exception
Posted by "Alex Parvulescu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Parvulescu reopened JCR-3014:
----------------------------------
the fix isn't good enough.
this should fix *only* identifier paths, not all non-existant paths which have to throw an exception.
I'll rollback the changes
> Identifier paths for inexistent items throw exception
> -----------------------------------------------------
>
> Key: JCR-3014
> URL: https://issues.apache.org/jira/browse/JCR-3014
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Reporter: Marcel Reutegger
> Assignee: Alex Parvulescu
> Fix For: 2.3.0
>
>
> The following fails with a RepositoryException but it should rather return false:
> session.itemExists("[" + UUID.randomUUID() + "]")
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira