[ 
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 (as the conversion from string to the target 
type fails). 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 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.



> Validate that DocView values for a specific type are correct serializations 
> (i.e. are a 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
>            Assignee: Konrad Windszus
>            Priority: Major
>             Fix For: 3.6.2
>
>
> 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 (as the conversion from string to the 
> target type fails). 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)

Reply via email to