jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCR-3128) Problem with formerly escaped JCR node names when upgrading to Jackrabbit 2.2.9
Date Tue, 25 Oct 2011 09:10:32 GMT

    [ https://issues.apache.org/jira/browse/JCR-3128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134854#comment-13134854
] 

Jukka Zitting commented on JCR-3128:
------------------------------------

Yep, this is a clear backwards compatibility issue if you're using escapeIllegalJcrChars()
for example to map arbitrary strings to JCR names. An upgrade shouldn't break that mapping.

Unfortunately changing the mapping again now would just create another backwards compatibility
issue. So my recommendation would be to either resolve this just as Won't Fix with a recommendation
to use Sascha's workaround from above, or to add a new escapeIllegalJcr10Chars() method for
use by clients that rely on the older mapping. In either case a client code change is needed
for the 1.x to 2.x upgrade in cases where the client relies on this mapping.
                
> Problem with formerly escaped JCR node names when upgrading to Jackrabbit 2.2.9
> -------------------------------------------------------------------------------
>
>                 Key: JCR-3128
>                 URL: https://issues.apache.org/jira/browse/JCR-3128
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.2.9
>            Reporter: Sascha Theves
>
> The following unit test fails:
> {code}
> import static org.junit.Assert.*;
> import org.apache.jackrabbit.util.Text;
> import org.junit.Test;
> public class TestEscaping
> {
>    @Test
>    public void testEscaping() throws Exception
>    {
>       // expect this as an escaped string (e.g. formerly escaped with jackrabbit 1.6)
>       String escaped = "nam%27e";
>       String unescaped = Text.unescapeIllegalJcrChars(escaped);
>       assertEquals(escaped, Text.escapeIllegalJcrChars(unescaped));
>    }
> }
> {code}
> This is a major problem when upgrading from 1.6.x to 2.2.9. The node names that were
escaped in jackrabbit 1.6 are not longer escaped and that breaks the backward compatibility.
I think the problem comes in with JCR-2198. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message