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

Bug 359148

Summary: NPE when AbsoluteFilePathBrowseActionHandler does not have any param
Product: z_Archived Reporter: Ling Hao <ling.hao>
Component: SapphireAssignee: Konstantin Komissarchik <konstantin>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: konstantin, ram.venkataswamy
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Ling Hao CLA 2011-09-27 17:38:54 EDT
In the GalleryEditor.sdef:
<action-handler>
    <action>Sapphire.Browse</action>
    <impl>AbsoluteFilePathBrowseActionHandler</impl>
    <param>
        <name>extensions</name>
        <value>jar,zip</value>
    </param>
</action-handler>

Remove the <param> block and see the following NPE:

java.lang.NullPointerException
at
org.eclipse.sapphire.ui.swt.renderer.actions.AbsoluteFilePathBrowseActionHandl
er.browse(AbsoluteFilePathBrowseActionHandler.java:111)
at
org.eclipse.sapphire.ui.SapphireBrowseActionHandler.run(SapphireBrowseActionHa
ndler.java:37)
at
org.eclipse.sapphire.ui.SapphireActionHandler.execute(SapphireActionHandler.ja
va:86) 

Note: this was originally Ram's bug 13031195. But that was fixed with adding <param>. Logged in 0.4 since NPE should be happen in this case.
Comment 1 Konstantin Komissarchik CLA 2011-09-27 19:13:06 EDT
Should be fixed in 0.3.1 release.
Comment 2 Konstantin Komissarchik CLA 2011-09-27 19:17:39 EDT
Fixed in 0.3.1 and 0.4 streams. Please verify.
Comment 3 Ram Venkataswamy CLA 2011-09-28 14:10:45 EDT
verified
Comment 4 Konstantin Komissarchik CLA 2011-09-28 14:26:28 EDT
Closing.