sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Parvulescu (JIRA)" <>
Subject [jira] [Updated] (SLING-2502) Incorrect escaping of property names in JcrModifiablePropertyMap on save
Date Mon, 04 Jun 2012 19:18:23 GMT


Alex Parvulescu updated SLING-2502:

    Attachment: SLING-2502.patch

I'm taking a stab at this: I'm introducing a new set that only contains the new properties.
I'm assuming that the existing properties don't really need to be escaped again, as they passed
the check before.
See also [0]:
Once the node exists, its name just needs to be passed around, but no escaping should happen
for accessing the node, since it will already be in the right form

This will fix a part of the problem: it handles updating properties that contain ":" like
jcr:title, jcr:lastModified and friends.
It doesn't however, handle adding properties that fall into this category.

Minor issue:
Not sure yet why the #clear() method re-initializes the changedProperties set:         

Attaching proposed patch.

> Incorrect escaping of property names in JcrModifiablePropertyMap on save
> ------------------------------------------------------------------------
>                 Key: SLING-2502
>                 URL:
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR
>    Affects Versions: JCR Resource 2.1.0
>            Reporter: Alex Parvulescu
>         Attachments: SLING-2502.patch
> This follows SLING-2425 where there was a change in the way JCR properties are escaped
before being persited.
> The regression happens for properties that have ":" in the name.
> For example: jcr:title after the #save() call will turn into jcr%3Atitle so the node
will end up with a brand new property, instead of having the old jcr:title updated.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message