[MGNLSCH-30] Execution of CommandJob can leave uncleaned MgnlContext Created: 01/Oct/12 Updated: 04/Oct/12 Resolved: 04/Oct/12 |
|
| Status: | Closed |
| Project: | Scheduler |
| Component/s: | None |
| Affects Version/s: | 1.5 |
| Fix Version/s: | 1.5.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Milan Divilek | Assignee: | Milan Divilek |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: |
| Description |
|
info.magnolia.module.scheduler.CommandJob.execute(JobExecutionContext) is doing MgnlContext.setInstance(new SimpleContext(Components.getComponent(SystemContext.class))). Then also do the reset of MgnlContext. But the reset may not happen when we call "return;" in the method. MgnlContext.setInstance and MgnlContext cleanup should be wrapped in try-finally. |
| Comments |
| Comment by Jan Haderka [ 01/Oct/12 ] |
|
why is there a try/finally with inner try/catch? Should not that be just one try/catch/finally block? |