kwin commented on PR #725:
URL: https://github.com/apache/commons-parent/pull/725#issuecomment-6058431907

   Please look at 
https://docs.osgi.org/specification/osgi.core/7.0.0/framework.module.html#framework.module-execution.environment
   
   > However, a bundle always loads classes in java.* packages via parent 
delegation. See [Parent 
Delegation](https://docs.osgi.org/specification/osgi.core/7.0.0/framework.module.html#framework.module.parentdelegation).
 Therefore, a bundle is not required to import a java.* package to have 
visibility to the classes in the package, if the package is present in the 
current runtime. It only needs to import a java.* package to have the 
resolution process ensure the package is available from the execution 
environment. This can avoid a NoClassDefFoundError during execution of the 
bundle due to a missing java.* package required by the bundle.
   
   The only drawback is that potentially the bundle will fail at runtime 
instead of at resolution time when executed in a trimmed down JRE not exposing 
all relevant packages.
   
   We are talking about Felix 6 
(https://mvnrepository.com/artifact/org.apache.felix/org.apache.felix.framework/6.0.5),
 released in 2021 not yet supporting this properly 
(https://issues.apache.org/jira/browse/FELIX-5843).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to