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

Neil Bartlett commented on FELIX-5512:
--------------------------------------

I've just been informed that the OSGi 1.1 function API has added the "throws 
Exception".

Which means it not a function! Sigh. But this is not the place to have that 
argument. Closing.

> Converter uses wrong/incompatible OSGi Function interface
> ---------------------------------------------------------
>
>                 Key: FELIX-5512
>                 URL: https://issues.apache.org/jira/browse/FELIX-5512
>             Project: Felix
>          Issue Type: Bug
>          Components: Converter
>            Reporter: Neil Bartlett
>
> The converter project includes a source copy of the OSGi Function API, 
> {{org.osgi.util.function}}. Unfortunately this API is incompatible with the 
> official OSGi Function API.
> {{Function#apply}} is not permitted to throw checked exceptions (see OSGi R6 
> Compendium, section 705.11.2.1). However the source copy in this project 
> declares the {{apply}} method with {{throws Exception}}. Unfortunately this 
> means that code in the project will not compile against the official API, for 
> example one of the lambdas in ConverterImpl wants to throw 
> ClassNotFoundException.
> This may not be a problem in an OSGi deployment if the function API is 
> embedded in the bundle. But if you use converter as a JAR in a flat classpath 
> application then it could conflict with the API JAR.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to