-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch candidate for OSGi support #6
Conversation
- Modified pom.xml in order to generate OSGi manifest headers (using maven-bundle-plugin). - Patched TypeDescriptor.getType() method in order to use bundle classloader.
This looks pretty good to me. I'm not an OSGI user so I can't verify that the bundle works - but I assume it does? :) |
Awesome! Welcome to GitHub!
|
Yes Jonathan, it works, I tested with Felix 4.6.1. Now, ultimately, it would be nice to see if we can add an integration test Once remark: the TypeTools OSGi manifest is importing the package So, I think that in your documentation, you should mention that and say org.osgi.framework.system.packages.extra=sun.reflect So, I suggest to document: OSGi support: When using TypeTools in an OSGi environment, the For example, in Felix, configure the following in the config.properties org.osgi.framework.system.packages.extra=sun.reflect/Pierre On Wed, Apr 22, 2015 at 8:38 PM, Jonathan Halterman <
|
Patch candidate for OSGi support
Looks good. I don't think an integration test is necessary. Thanks for this! |
0.4.1 has been released. It should be in central shortly.. |
I changed the pom.xml in order to generate an OSGi bundle, using maven-bundle-plugin.
Also, while doing a real test under Felix, I realized that it was not working. I figured out that the TypeResolver class was doing a class.forName in order to load actual type classes, but we can't do this within an OSGi environment, and the bundle classloader has to be used.
So, I added a patch in TypeDescriptor.java, in order to use the bundle classloader of the lambda expression. It seems to work.
Please review, thanks.
PS: first time I'm using github ... hope my pull request is correct ...