You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2022/04/01 14:14:00 UTC

[jira] [Updated] (JCRVLT-623) Validate that DocView values for a specific type are valid (i.e. are string which can be converted back to the given type)

     [ https://issues.apache.org/jira/browse/JCRVLT-623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Konrad Windszus updated JCRVLT-623:
-----------------------------------
    Description: 
This came up in the context of SLING-11240. Sometimes DocView XML files contain invalid property values, like 

{code:xml}
test="{Long}1.0"
{code}

Those should be detected by the {{jackrabbit-docviewparser}} validator as they can never be applied to a JCR node. Currently the exception is only thrown during the actual import of those files, but not during parsing.

Either the exception could be generated from the validator implementation or whenever such an invalid string value is being detected in the {{DocViewProperty2.parse(...)}} method, but I am not sure how big the overhead is of always calling https://github.com/apache/jackrabbit/blob/ed3124e5fe223dada33ce6ddf53bc666063c3f2f/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/ValueHelper.java#L779.


  was:
This came up in the context of SLING-11240. Sometimes DocView XML files contain invalid property values, like 

{code:xml}
test="{Long}1.0"
{code}

Those should be detected by the {{jackrabbit-docviewparser}} validator.



> Validate that DocView values for a specific type are valid (i.e. are string which can be converted back to the given type)
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JCRVLT-623
>                 URL: https://issues.apache.org/jira/browse/JCRVLT-623
>             Project: Jackrabbit FileVault
>          Issue Type: Improvement
>    Affects Versions: 3.6.0
>            Reporter: Konrad Windszus
>            Priority: Major
>
> This came up in the context of SLING-11240. Sometimes DocView XML files contain invalid property values, like 
> {code:xml}
> test="{Long}1.0"
> {code}
> Those should be detected by the {{jackrabbit-docviewparser}} validator as they can never be applied to a JCR node. Currently the exception is only thrown during the actual import of those files, but not during parsing.
> Either the exception could be generated from the validator implementation or whenever such an invalid string value is being detected in the {{DocViewProperty2.parse(...)}} method, but I am not sure how big the overhead is of always calling https://github.com/apache/jackrabbit/blob/ed3124e5fe223dada33ce6ddf53bc666063c3f2f/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/ValueHelper.java#L779.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)