| Summary: | [target] NPE thrown by a location containing .war file that isn't a bundle | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Ankur Sharma <ankur_sharma> | ||||
| Component: | UI | Assignee: | Ankur Sharma <ankur_sharma> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | curtis.windatt.public | ||||
| Version: | 3.8 | ||||||
| Target Milestone: | 3.8 M5 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 355890 | ||||||
| Bug Blocks: | 367796 | ||||||
| Attachments: |
|
||||||
|
Description
Ankur Sharma
Another way to generate same stack trace 1. Put a war file in a directory 2. try to add this as directory location to a target 3. NPE throws as soon next is pressed I don't get this NPE, but I am encountering problems where the target platform complains about a missing bundle if I replace a .jar bundle with a .war file. Any updates here Ankur? Created attachment 208802 [details]
Patch
The problem is of course when reading the files and creating bundles (objects) out of them. A .war file does have a Manifest file, but there is no sysmbolic name, hence the missing entry creates NPE later on. Since, a war file is not a valid bundle (in this case), an exception should be thrown.
To fix this, we need to add the check that if no plugin.xml was found and nor the symbolic-name then the exception should be thrown. Attaching the patch for the same.
So the problem exists when the target has a war file that isn't a bundle. The fix should be backported to wherever bug 355890 ends up. Patch fixes the NPE. If a symbolic name is added to the war file, but no other headers, PDE still handles it as a bundle correctly. Pushed the fix to master. Verified in I20120123-1800 This change did surface 368753 which will be fixed for M6 |