| Summary: | [FileDialog] IllegalAccessError when pressing on cancel button | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Ivan Furnadjiev <ivan> |
| Component: | Incubator | Assignee: | Project Inbox <rap.incubator-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P1 | ||
| Version: | 1.5 | ||
| Target Milestone: | 1.5 M1 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Ivan Furnadjiev
With the fix for bug 351585 a protected field "shell" in introduced in org.eclipse.swt.widgets.Dialog. There is a field "shell" in the FileDialog too. For some reason, direct access to the Dialog#shell field inside a selection listener throws IllegalAccessError. Moving the call in the private method FileDialog#closeShell fixes the problem. Changes are in CVS HEAD. Well, this is a tricky problem. Here's the reason: 1) The inner class is not a subclass of Dialog, therefore it does not have access to protected fields of Dialog. So, but why does it compile then? 2) Since the inner class is in the same package as FileDialog and Dialog, it can access the protected fields of Dialog anyway. But now comes OSGi. 3) In OSGi, different bundles have a different class loader. As an effect, package private access does not work anymore. |