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

[jira] [Commented] (FELIX-6549) Service descriptor XMLs contain empty lines with JRE 11

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

Konrad Windszus commented on FELIX-6549:
----------------------------------------

There is a report for that at https://bugs.openjdk.org/browse/JDK-8262285, but seems this change is deliberate.

> Service descriptor XMLs contain empty lines with JRE 11
> -------------------------------------------------------
>
>                 Key: FELIX-6549
>                 URL: https://issues.apache.org/jira/browse/FELIX-6549
>             Project: Felix
>          Issue Type: Bug
>          Components: SCR Tooling
>    Affects Versions: scr bnd plugin 1.9.6
>            Reporter: Konrad Windszus
>            Priority: Major
>
> When the SCR Bnd Plugin is used with JRE 11 the service descriptor XMLs contain a lot of empty lines:
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.apache.jackrabbit.oak.composite.CrossMountReferenceValidatorProvider" configuration-policy="require" activate="activate">
>         
>     <property name="type" value="crossMountRefValidator"/>
>         
>     <property name="failOnDetection" type="Boolean" value="true"/>
>         
>     <service servicefactory="false">
>                 
>         <provide interface="org.apache.jackrabbit.oak.spi.commit.ValidatorProvider"/>
>                 
>         <provide interface="org.apache.jackrabbit.oak.spi.commit.EditorProvider"/>
>             
>     </service>
>         
>     <reference name="mountInfoProvider" interface="org.apache.jackrabbit.oak.spi.mount.MountInfoProvider" cardinality="1..1" policy="static" bind="bindMountInfoProvider" unbind="unbindMountInfoProvider"/>
>         
>     <implementation class="org.apache.jackrabbit.oak.composite.CrossMountReferenceValidatorProvider"/>
>     
> </scr:component>
> {code}
> With JRE 8 the XML looked like this with the same version of the Bnd SCR plugin
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.apache.jackrabbit.oak.composite.CrossMountReferenceValidatorProvider" configuration-policy="require" activate="activate">
>     <property name="type" value="crossMountRefValidator"/>
>     <property name="failOnDetection" type="Boolean" value="true"/>
>     <service servicefactory="false">
>         <provide interface="org.apache.jackrabbit.oak.spi.commit.ValidatorProvider"/>
>         <provide interface="org.apache.jackrabbit.oak.spi.commit.EditorProvider"/>
>     </service>
>     <reference name="mountInfoProvider" interface="org.apache.jackrabbit.oak.spi.mount.MountInfoProvider" cardinality="1..1" policy="static" bind="bindMountInfoProvider" unbind="unbindMountInfoProvider"/>
>     <implementation class="org.apache.jackrabbit.oak.composite.CrossMountReferenceValidatorProvider"/>
> </scr:component>
> {code}
> It seems that a different SAX {{Transformer}} is returned at https://github.com/apache/felix-dev/blob/28b4c77883b8dbdea06e723dc4e5a3eba7393f34/tools/org.apache.felix.scr.generator/src/main/java/org/apache/felix/scrplugin/xml/IOUtils.java#L70 which already emits the newlines due to the "INDENT" flag. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)