| Summary: | WorkbenchColors should not be disposed | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Igor Pavlenko <dopperst> | ||||||
| Component: | Workbench | Assignee: | Project Inbox <rap-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | ||||||||
| Version: | 1.2 | ||||||||
| Target Milestone: | 1.3 M1 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Instead of synchronizing the access I think we should remove the whole story of reallocating colors. This makes no sense in RAP as we don't allocate real resources. Created attachment 143811 [details]
patch
As suggested, I'd rather go the path to remove the whole color-preallocation story as this is not needed in RAP (and will not even be needed in case of color constructors). This also simplifies and lightens the workbench startup instead of adding another case that needs proper synchronization.
Applied patch from comment #2 to CVS HEAD and added a small comment. |
Created attachment 140941 [details] Patch to fix the bug Look at the org.eclipse.ui.internal.WorkbenchColors. There is an error that sometimes causes NPE in my application. There is a static array. It is used to store (for what?) some resources (of type Color). This class should be reimplemented with some additional synchronization. Or, alternatively, it is possible not to dispose resources (and not to reassign array variable with null value). I fix it with the second approach.