[
https://issues.apache.org/jira/browse/GROOVY-10881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17679649#comment-17679649
]
Roy Teeuwen commented on GROOVY-10881:
--------------------------------------
I have tested out the 3.x branch and indeed like [~nicolas.dutertry] stated
this works perfectly. It seems to be that during the refactoring of the entire
build gradle files from 3.x to 4.x something went wrong.
This part is what went missing:
{code:java}
Require-Capability: osgi.extender;filter:="(osgi.extender=osgi.service
loader.registrar)",osgi.extender;filter:="(osgi.extender=osgi.service
loader.processor)",osgi.serviceloader;filter:="(osgi.serviceloader=or
g.apache.groovy.json.FastStringServiceFactory)";cardinality:=multiple
,osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
Provide-Capability: osgi.serviceloader;osgi.serviceloader="org.apache.
groovy.json.FastStringServiceFactory"
{code}
I have tried to debug the code but I'm used to maven instead of gradle so it is
really hard for me to make any sense out of it. I could find that in the groovy
3.x branch it was done by the gradle/assemble.gradle, but I can still find
references to the serviceloader in the new version, namely in
groovy/org.apache.groovy-library.gradle, but it is not being executed :/
Is there any of you willing to have a look at it if they can fix this? [~paulk]
[~emilles]
> FastStringUtils does not work in an OSGi environment
> ----------------------------------------------------
>
> Key: GROOVY-10881
> URL: https://issues.apache.org/jira/browse/GROOVY-10881
> Project: Groovy
> Issue Type: Bug
> Components: JSON
> Reporter: Roy Teeuwen
> Priority: Major
> Attachments: groovy-json-example.zip
>
>
> Using the FastStringUtils does not work in an OSGi environment. The
> FastStringUtils will be called by the classloader of another bundle, making
> the code at
> https://github.com/apache/groovy/blob/master/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/FastStringUtils.java#L39
> not find the default service loader.
> To counter this, I'd like to propose to at least fall back to the
> DefaultFastStringService when no FastStringServiceFactory is found
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)