| Summary: | Use BundleContext.getProperty() instead of System.getProperty() when running in OSGi | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Michal Tkacz <Michal.Tkacz> | ||||
| Component: | cdo.net4j | Assignee: | Eike Stepper <stepper> | ||||
| Status: | CLOSED FIXED | QA Contact: | Eike Stepper <stepper> | ||||
| Severity: | enhancement | ||||||
| Priority: | P3 | ||||||
| Version: | 3.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Michal Tkacz
Created attachment 167890 [details]
Patch that makes Net4j use BundleContext.getProperty() when used in OSGi
Here's a proposal of a patch for org.eclipse.net4j.util. The patch was made against HEAD but can also be applied to R2_0_maintenance after excluding unmatched changes.
The main part are the changes to AbstractPlatform and OSGiPlatform. But to support properties like org.eclipse.net4j.util.io.tmpdir (which I consider less important) I had to make the two getProperty methods public and push them to OMPlatform interface as well.
There might be other places using System.getProperty() outside org.eclipse.net4j.util which honestly I haven't checked.
Good catch, Michal. Thank you ;-) Committed to HEAD Michal, please confirm that: 1) The number of lines that you changed is smaller than 250. 2) You are the only author of these changed lines. 3) You apply the EPL to these changed lines. (In reply to comment #3) > Michal, please confirm that: > > 1) The number of lines that you changed is smaller than 250. > 2) You are the only author of these changed lines. > 3) You apply the EPL to these changed lines. I confirm all three points. Comment on attachment 167890 [details]
Patch that makes Net4j use BundleContext.getProperty() when used in OSGi
Thank you!
Available in 3.0 GA: http://download.eclipse.org/modeling/emf/cdo/updates/3.0-releases/ |