Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 313115

Summary: NPE in browser.custom.editor.editors.WorkspaceChangeListener
Product: [Modeling] MoDisco Reporter: Nicolas Bros <nicolas.bros>
Component: InfrastructureAssignee: Nicolas Bros <nicolas.bros>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: gdupe, hugo.bruneliere, modisco.web-inbox
Version: 0.8.0Flags: nicolas.bros: helios+
hugo.bruneliere: review+
Target Milestone: 0.8.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
stacktrace
none
patch none

Description Nicolas Bros CLA 2010-05-17 07:57:17 EDT
Created attachment 168715 [details]
stacktrace

see attached stacktrace
Comment 1 Nicolas Bros CLA 2010-05-17 08:00:50 EDT
This happens when deleting a project from the workspace while a workspace customization is open in the uiCustom editor.
Comment 2 Nicolas Bros CLA 2010-05-17 08:27:52 EDT
Created attachment 168717 [details]
patch

Apparently, getLocation() returns null for a workspace file that is deleted, and this is what caused the NPE.

This patch fixes the problem by comparing workspace-relative paths instead of absolute locations.
Comment 3 Hugo Bruneliere CLA 2010-05-17 09:43:52 EDT
Hi Nicolas,

You can go ahead with this patch.

Regards,

Hugo
Comment 4 Nicolas Bros CLA 2010-05-17 10:01:56 EDT
Thanks! I have committed it to branch 0_8_0.
Comment 5 Hugo Bruneliere CLA 2010-10-04 13:05:26 EDT
The patch has been successfully applied.