jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Parvulescu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCR-3014) Identifier paths for inexistent items throw exception
Date Tue, 12 Jul 2011 16:45:00 GMT

    [ 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

        

Mime
View raw message