Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311273 - NPE in product export when ExecutionEnvironment is selected
Summary: NPE in product export when ExecutionEnvironment is selected
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.6 RC1   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 312180 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-05-01 03:17 EDT by Michael Mangeng CLA
Modified: 2010-05-14 13:09 EDT (History)
3 users (show)

See Also:
ankur_sharma: review+


Attachments
Fix (1.24 KB, patch)
2010-05-03 12:02 EDT, Curtis Windatt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 :-)