| Summary: | [Help][Context] NPE on ContextFile | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Angel Vera <arvera> |
| Component: | User Assistance | Assignee: | platform-ua-inbox <platform-ua-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | cgold |
| Version: | 3.6 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Angel Vera
Can you attach a stack trace? Are you still seeing the problem, if so can you include a stack trace? Sorry I would be hard for me to provide a stacktrace at this time. Is it possible to just do a null check and print something more useful? The constructor for ContextFile() is only called from one place so I was able to determine that the only way file could be null would be if in the extension point declaration for the context is missing a file attribute. I verified that if I changed the code to set file to null the NPE you saw would occur. Omitting the file attribute in a <context> element in plugin.xml causes an error at build time. The only way I could think that this situation could occur would be to modify plugin.xml outside of the build environment. If I add a null pointer check to hashCode() an NPE will just thrown later when attempting to open the file. My inclination is to close this bug as WONTFIX since it represents a situation that would only occur if the build tools were bypassed when creating the plug-in and the extension does not match the schema, in which case the exception would give a clue as to how to fix the problem. I understand your assessment. |