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

Bug 311273

Summary: NPE in product export when ExecutionEnvironment is selected
Product: [Eclipse Project] PDE Reporter: Michael Mangeng <mm>
Component: UIAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ankur_sharma, curtis.windatt.public, mlippert
Version: 3.6Flags: ankur_sharma: review+
Target Milestone: 3.6 RC1   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Fix none

Description Michael Mangeng CLA 2010-05-01 03:17:59 EDT
Build Identifier: 3.6M7 (I20100429-1549)

Hi all!

i get a NPE when i start a product export in the product editor.
java.lang.NullPointerException
at org.eclipse.pde.internal.core.exports.ProductExportOperation.createBuildPropertiesFile(ProductExportOperation.java:194)
at org.eclipse.pde.internal.core.exports.ProductExportOperation.run(ProductExportOperation.java:105)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

the "bad" line is:
if (config[0].equals("macosx") && vm.getPath().startsWith(MAC_JAVA_FRAMEWORK)) { //$NON-NLS-1$
continue;
}

i discovered that it only failes when i have no executionenvironment selected. if i select e.g. JavaSE-1.6 it works fine.



Reproducible: Always

Steps to Reproduce:
1. create a product definition file
2. fill mandatory fields - let the field execenv emptyt
3. start expor
Comment 1 Curtis Windatt CLA 2010-05-03 12:02:54 EDT
Created attachment 166800 [details]
Fix

The fix from bug 307269 should have put the mac vm test inside the null check.
Comment 2 Curtis Windatt CLA 2010-05-03 12:03:45 EDT
Ankur, please review the fix.
Comment 3 Curtis Windatt CLA 2010-05-05 10:50:11 EDT
Pinging Ankur, please review/apply.
Comment 4 Ankur Sharma CLA 2010-05-05 17:11:08 EDT
The patch works good. Tested using RCP Delta Pack  N20100504-2124
Comment 5 Curtis Windatt CLA 2010-05-05 17:15:07 EDT
Fixed in HEAD.
Comment 6 Martin Lippert CLA 2010-05-09 08:40:15 EDT
*** Bug 312180 has been marked as a duplicate of this bug. ***
Comment 7 Torkild Resheim CLA 2010-05-14 13:09:23 EDT
Seeing the same thing. Eagerly awaiting RC1 :-)