[
https://issues.apache.org/jira/browse/FELIX-5967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pierre De Rop resolved FELIX-5967.
----------------------------------
Resolution: Fixed
Fixed in revision revision 1844108.
The fluent service properties have been deprecated , and currently only work
using java8, and will be removed in next version.
> DM does not support java9+
> --------------------------
>
> Key: FELIX-5967
> URL: https://issues.apache.org/jira/browse/FELIX-5967
> Project: Felix
> Issue Type: Improvement
> Affects Versions: org.apache.felix.dependencymanager-r8
> Reporter: Pierre De Rop
> Assignee: Pierre De Rop
> Priority: Major
>
> Dependency Manager can't be built/used on java9+ (9,10,11), because of the
> following issues:
> 1) for configuration types, when we parse interface "default methods", the
> way we are parsing does not work in java 9+, and a patch must be applied.
> See [1].
> 2) for dm-lambda, the way to parse the lambda parameter names for "fluent"
> service properties (which requires the -parameters javac option) does not
> work in java 9+.
> For example, the following does not work
> {code:java}
> compnent(comp -> comp.impl(Foo.class).provides(FooService.class, property ->
> "service property value"));{code}
> So, the "property" lambda parameter name can't be parsed in Java9+. This is
> likely because starting from java9, the -parameters option is not generating
> anymore the metadata for the lambda parameter names (see [2]). For the
> moment, the fluent service properties willl work only using java8, but not
> anymore on java9+, and the most reasonable thing is to deprecate the usage of
> fluent service properties, meaning that instead of:
> {code:java}
> compnent(comp -> comp.impl(Foo.class).provides(FooService.class, property ->
> "service property value"));{code}
> you then must replace by:
> {code:java}
> compnent(comp -> comp.impl(Foo.class).provides(FooService.class,
> "property","service property value"));{code}
> So, the fluent service properties must be commented as in restriction if
> java9+ is used. No need to bump the dm-lambda bundle version, becaue it still
> works using java8.
> 3) the gradle version needs to be updated, and for java11 support, the
> "--no-daemon" option must be used when building.
> [1]
> [https://dzone.com/articles/correct-reflective-access-to-interface-default-methods]
> [2]https://bugs.openjdk.java.net/browse/JDK-8138729
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)