You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Michael Dürig (JIRA)" <ji...@apache.org> on 2008/04/08 17:09:24 UTC

[jira] Created: (JCR-1526) Various improvment to Path and PathImpl

Various improvment to Path and PathImpl
---------------------------------------

                 Key: JCR-1526
                 URL: https://issues.apache.org/jira/browse/JCR-1526
             Project: Jackrabbit
          Issue Type: Improvement
          Components: jackrabbit-spi, jackrabbit-spi-commons
            Reporter: Michael Dürig


There are various issues with Path and PathImpl which the following patch addresses:
- Fixed problem with normalization of some paths in PathImpl. 
- Fixed handling of relative paths in PathImpl. 
- Fixed wrong return value for depth and ancestor count in PathImpl. 
- Added method for determining equivalence of paths in PathImpl.
- Fixed subPath method in PathImpl. 
- Clarified blurry contract for Path.
- Added many new test cases

For many of the fixes credits are due to Angela.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1526) Various improvment to Path and PathImpl

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587624#action_12587624 ] 

Michael Dürig commented on JCR-1526:
------------------------------------

The path factory does not allow to construct such a paths at all:

/.. throws java.lang.IllegalArgumentException: Invalid path: Too many parent elements.

{}/{} throws java.lang.IllegalArgumentException: Invalid path: The root element may only occur at the beginning.






> Various improvment to Path and PathImpl
> ---------------------------------------
>
>                 Key: JCR-1526
>                 URL: https://issues.apache.org/jira/browse/JCR-1526
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-spi, jackrabbit-spi-commons
>            Reporter: Michael Dürig
>         Attachments: JCR-1526.patch
>
>
> There are various issues with Path and PathImpl which the following patch addresses:
> - Fixed problem with normalization of some paths in PathImpl. 
> - Fixed handling of relative paths in PathImpl. 
> - Fixed wrong return value for depth and ancestor count in PathImpl. 
> - Added method for determining equivalence of paths in PathImpl.
> - Fixed subPath method in PathImpl. 
> - Clarified blurry contract for Path.
> - Added many new test cases
> For many of the fixes credits are due to Angela.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-1526) Various improvment to Path and PathImpl

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dürig updated JCR-1526:
-------------------------------

    Attachment: JCR-1526.patch

Patch

> Various improvment to Path and PathImpl
> ---------------------------------------
>
>                 Key: JCR-1526
>                 URL: https://issues.apache.org/jira/browse/JCR-1526
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-spi, jackrabbit-spi-commons
>            Reporter: Michael Dürig
>         Attachments: JCR-1526.patch
>
>
> There are various issues with Path and PathImpl which the following patch addresses:
> - Fixed problem with normalization of some paths in PathImpl. 
> - Fixed handling of relative paths in PathImpl. 
> - Fixed wrong return value for depth and ancestor count in PathImpl. 
> - Added method for determining equivalence of paths in PathImpl.
> - Fixed subPath method in PathImpl. 
> - Clarified blurry contract for Path.
> - Added many new test cases
> For many of the fixes credits are due to Angela.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (JCR-1526) Various improvment to Path and PathImpl

Posted by "Michael Dürig (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dürig closed JCR-1526.
------------------------------


> Various improvment to Path and PathImpl
> ---------------------------------------
>
>                 Key: JCR-1526
>                 URL: https://issues.apache.org/jira/browse/JCR-1526
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-spi, jackrabbit-spi-commons
>            Reporter: Michael Dürig
>            Assignee: angela
>         Attachments: JCR-1526.patch
>
>
> There are various issues with Path and PathImpl which the following patch addresses:
> - Fixed problem with normalization of some paths in PathImpl. 
> - Fixed handling of relative paths in PathImpl. 
> - Fixed wrong return value for depth and ancestor count in PathImpl. 
> - Added method for determining equivalence of paths in PathImpl.
> - Fixed subPath method in PathImpl. 
> - Clarified blurry contract for Path.
> - Added many new test cases
> For many of the fixes credits are due to Angela.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (JCR-1526) Various improvment to Path and PathImpl

Posted by "angela (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

angela reassigned JCR-1526:
---------------------------

    Assignee: angela

> Various improvment to Path and PathImpl
> ---------------------------------------
>
>                 Key: JCR-1526
>                 URL: https://issues.apache.org/jira/browse/JCR-1526
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-spi, jackrabbit-spi-commons
>            Reporter: Michael Dürig
>            Assignee: angela
>         Attachments: JCR-1526.patch
>
>
> There are various issues with Path and PathImpl which the following patch addresses:
> - Fixed problem with normalization of some paths in PathImpl. 
> - Fixed handling of relative paths in PathImpl. 
> - Fixed wrong return value for depth and ancestor count in PathImpl. 
> - Added method for determining equivalence of paths in PathImpl.
> - Fixed subPath method in PathImpl. 
> - Clarified blurry contract for Path.
> - Added many new test cases
> For many of the fixes credits are due to Angela.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (JCR-1526) Various improvment to Path and PathImpl

Posted by "angela (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

angela resolved JCR-1526.
-------------------------

    Resolution: Fixed

patch committed as is with rev. 646802  
thanks michael


> Various improvment to Path and PathImpl
> ---------------------------------------
>
>                 Key: JCR-1526
>                 URL: https://issues.apache.org/jira/browse/JCR-1526
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-spi, jackrabbit-spi-commons
>            Reporter: Michael Dürig
>            Assignee: angela
>         Attachments: JCR-1526.patch
>
>
> There are various issues with Path and PathImpl which the following patch addresses:
> - Fixed problem with normalization of some paths in PathImpl. 
> - Fixed handling of relative paths in PathImpl. 
> - Fixed wrong return value for depth and ancestor count in PathImpl. 
> - Added method for determining equivalence of paths in PathImpl.
> - Fixed subPath method in PathImpl. 
> - Clarified blurry contract for Path.
> - Added many new test cases
> For many of the fixes credits are due to Angela.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1526) Various improvment to Path and PathImpl

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587115#action_12587115 ] 

Stefan Guggisberg commented on JCR-1526:
----------------------------------------

thanks, michi!

i quickly browsed through the patch, looks good.

however, i've got one minor issue: 

if i interpret the code changes in PathFactoryImpl$Path#getNormalizedPath() 
correctly the following call would succeed where it currently throws an exception:

NameResolver nameResolver = ...
PathResolver pathResolver = new ParsingPathResolver(PathFactoryImpl.getInstance(),
        nameResolver);
...
pathResolver.getQPath("/..").getNormalizedPath();

according to the javadoc of Path#getNormalizedPath it should throw an exception.

furthermore, i might be wrong but i think that it is still possible to create 
syntactically incorrect paths using PathFactoryImpl (JCR-1409), e.g.

PathFactory pf = PathFactoryImpl.getInstance(); 
Path.Element re = pf.getRootElement(); 
Path illegalPath = pf.create(new Path.Element[]{re, re}); 

i would expect that Path objects always represent syntactically correct paths.

 

> Various improvment to Path and PathImpl
> ---------------------------------------
>
>                 Key: JCR-1526
>                 URL: https://issues.apache.org/jira/browse/JCR-1526
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-spi, jackrabbit-spi-commons
>            Reporter: Michael Dürig
>         Attachments: JCR-1526.patch
>
>
> There are various issues with Path and PathImpl which the following patch addresses:
> - Fixed problem with normalization of some paths in PathImpl. 
> - Fixed handling of relative paths in PathImpl. 
> - Fixed wrong return value for depth and ancestor count in PathImpl. 
> - Added method for determining equivalence of paths in PathImpl.
> - Fixed subPath method in PathImpl. 
> - Clarified blurry contract for Path.
> - Added many new test cases
> For many of the fixes credits are due to Angela.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1526) Various improvment to Path and PathImpl

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587631#action_12587631 ] 

Stefan Guggisberg commented on JCR-1526:
----------------------------------------

you're right. i only browsed through the patch and missed some of the changes, sorry.

+1 for the patch

> Various improvment to Path and PathImpl
> ---------------------------------------
>
>                 Key: JCR-1526
>                 URL: https://issues.apache.org/jira/browse/JCR-1526
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-spi, jackrabbit-spi-commons
>            Reporter: Michael Dürig
>         Attachments: JCR-1526.patch
>
>
> There are various issues with Path and PathImpl which the following patch addresses:
> - Fixed problem with normalization of some paths in PathImpl. 
> - Fixed handling of relative paths in PathImpl. 
> - Fixed wrong return value for depth and ancestor count in PathImpl. 
> - Added method for determining equivalence of paths in PathImpl.
> - Fixed subPath method in PathImpl. 
> - Clarified blurry contract for Path.
> - Added many new test cases
> For many of the fixes credits are due to Angela.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.