Skip to content

Grabbit fails sync when node name contains '$' sign #213

@dbugrimov

Description

@dbugrimov

Syncing DAM Assets I came across an issue when Grabbit throws an exception meeting '$' sign in a node name.

Code with issue:
/src/main/groovy/com/twcable/grabbit/jcr/DefaultProtoNodeDecorator.groovy
Line 58: createFrom(childNode, childNode.getName().replaceFirst(Pattern.quote(innerProtoNode.name), getName())).writeToJcr(session)

when getName() returns a node name with '$' sign in it, replaceFirst treats it as a capturing group reference in the replacement string and throws an exception

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions