| Summary: | [launcher] Add mechanism for ignoring user specified config.ini values | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | DJ Houghton <dj.houghton> | ||||||||
| Component: | Launcher | Assignee: | DJ Houghton <dj.houghton> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | john.arthorne, tjwatson | ||||||||
| Version: | 3.7 | ||||||||||
| Target Milestone: | 3.7 M4 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||||
| Whiteboard: | |||||||||||
| Bug Depends on: | |||||||||||
| Bug Blocks: | 330611 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
DJ Houghton
Created attachment 183124 [details]
patch
DJ, when we discussed this approach there was a question on whether the *.override.user properties should show up in the merged configuration (destination). The patch appears to not place the *.override.user properties into the destination. Is that the intention? I thought you were leaning towards including the *.override.user props in the destination properties. Hmm... yeah I forgot about that. I'll change it. My argument at the time was that it will be easier to debug down the road if we have customer problems and we receive a system properties dump. yeah, the other argument to keep the *.override.user properties is in case someone defined their own property that ended with .override.user. The current patch would ignore them altogether. Why would someone do that?? Serves them right! ;-) I think another change to the patch should be to always let the command-line args win. Tom, what do you think? With the current patch: - user calls exe with -Dfoo=bar - user config.ini has no entry for foo - shared config has entry foo=anotherBar and foo.override.user=true In this case the result will be foo=anotherBar. (In reply to comment #6) > I think another change to the patch should be to always let the command-line > args win. Tom, what do you think? > > With the current patch: > - user calls exe with -Dfoo=bar > - user config.ini has no entry for foo > - shared config has entry foo=anotherBar and foo.override.user=true > > In this case the result will be foo=anotherBar. Yes, I think -D options should win. Created attachment 183174 [details]
patch
Updated patch which keeps track of all the keys in the System properties before we start our modifications so we can check later to ensure we don't overwrite any values set on the command-line.
Created attachment 183238 [details]
Alternate patch
This patch avoids taking a snapshot of system property keys by passing the userConfiguration properties object to the mergeProperties for the override case (null is passed for the non-override case instead of false).
Comment on attachment 183174 [details]
patch
Ok, your patch is good. Thanks Tom.
I went ahead and released the latest patch to HEAD to get more testing before M4 is final. set wrong milestone, sorry for the spam. |