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

Konrad Windszus edited comment on SLING-11240 at 4/1/22 11:32 AM:
------------------------------------------------------------------

The DocViewProperty2 does not perform type coercion. When applying to a Node it 
relies on 
https://developer.adobe.com/experience-manager/reference-materials/spec/jsr170/javadocs/jcr-2.0/javax/jcr/Node.html#setProperty(java.lang.String,%20java.lang.String,%20int)
 for doing the conversion. As this is implementation specific, there is nothing 
which can be done here by FileVault just with JCR API IMO. Feel free to raise 
an issue in FileVault with a PR if you disagree. Actually I am pretty sure that 
Long an „2.0“ is accepted by Apache Oak (compare with 


was (Author: kwin):
The DocViewProperty2 does not perform type coercion. When applying to a Node it 
relies on 
https://developer.adobe.com/experience-manager/reference-materials/spec/jsr170/javadocs/jcr-2.0/javax/jcr/Node.html#setProperty(java.lang.String,%20java.lang.String,%20int)
 for doing the conversion. As this is implementation specific, there is nothing 
which can be done here by FileVault just with JCR API IMO. Feel free to raise 
an issue in FileVault with a PR if you disagree. Actually I am pretty sure that 
Long an „2.0“ is accepted by Apache Oak

> Content packages with invalid Long properties cause index definition 
> extraction to fail
> ---------------------------------------------------------------------------------------
>
>                 Key: SLING-11240
>                 URL: https://issues.apache.org/jira/browse/SLING-11240
>             Project: Sling
>          Issue Type: Bug
>          Components: Feature Model
>    Affects Versions: Content-Package to Feature Model Converter 1.1.14
>            Reporter: Robert Munteanu
>            Assignee: Robert Munteanu
>            Priority: Major
>             Fix For: Content-Package to Feature Model Converter 1.1.16
>
>
> Certain content packages contain invalid attribute definitions, such as
> {noformat}
> ...
>   <jcrTitle jcr:primaryType="nt:unstructured" name="jcr:content/jcr:title" 
> boost="{Long}2.0" />
> ...
> {noformat}
> Although the intention is clear - a boot value of 2 - parsing fails
> {noformat}
> java.lang.NumberFormatException: For input string: "2.0"
>       at 
> java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
>       at java.base/java.lang.Long.parseLong(Long.java:692)
>       at java.base/java.lang.Long.parseLong(Long.java:817)
>       at 
> org.apache.sling.feature.cpconverter.index.IndexDefinitionsJsonWriter.lambda$write$2(IndexDefinitionsJsonWriter.java:94)
>       at 
> org.apache.sling.feature.cpconverter.index.IndexDefinitionsJsonWriter.write(IndexDefinitionsJsonWriter.java:143)
>       at 
> org.apache.sling.feature.cpconverter.index.IndexDefinitionsJsonWriter.write(IndexDefinitionsJsonWriter.java:94)
>       at 
> org.apache.sling.feature.cpconverter.index.IndexDefinitionsJsonWriter.write(IndexDefinitionsJsonWriter.java:134)
>       at 
> org.apache.sling.feature.cpconverter.index.IndexDefinitionsJsonWriter.write(IndexDefinitionsJsonWriter.java:134)
>       at 
> org.apache.sling.feature.cpconverter.index.IndexDefinitionsJsonWriter.write(IndexDefinitionsJsonWriter.java:134)
>       at 
> org.apache.sling.feature.cpconverter.index.IndexDefinitionsJsonWriter.write(IndexDefinitionsJsonWriter.java:134)
>       at 
> org.apache.sling.feature.cpconverter.index.IndexDefinitionsJsonWriter.writeAsJson(IndexDefinitionsJsonWriter.java:69)
>       at 
> org.apache.sling.feature.cpconverter.index.DefaultIndexManager.addRepoinitExtension(DefaultIndexManager.java:38)
>       at 
> org.apache.sling.feature.cpconverter.ContentPackage2FeatureModelConverter.secondPass(ContentPackage2FeatureModelConverter.java:331)
>       at 
> org.apache.sling.feature.cpconverter.ContentPackage2FeatureModelConverter.convert(ContentPackage2FeatureModelConverter.java:266){noformat}



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

Reply via email to