[
https://issues.apache.org/jira/browse/FELIX-6549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17569844#comment-17569844
]
Konrad Windszus commented on FELIX-6549:
----------------------------------------
The easiest way to fix this would be to make
https://github.com/apache/felix-dev/blob/28b4c77883b8dbdea06e723dc4e5a3eba7393f34/tools/org.apache.felix.scr.generator/src/main/java/org/apache/felix/scrplugin/xml/IOUtils.java#L133
a noop with Java 9 and above.
> 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 generator 1.18.4, 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)