diff options
Diffstat (limited to 'org.eclipse.help/src/org/eclipse/help/internal/HelpData.java')
-rw-r--r-- | org.eclipse.help/src/org/eclipse/help/internal/HelpData.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/HelpData.java b/org.eclipse.help/src/org/eclipse/help/internal/HelpData.java index d18c16103..909798061 100644 --- a/org.eclipse.help/src/org/eclipse/help/internal/HelpData.java +++ b/org.eclipse.help/src/org/eclipse/help/internal/HelpData.java @@ -152,7 +152,13 @@ public class HelpData { * Allow unit tests to override for providing test data. */ public InputStream getHelpDataFile(String filePath) throws IOException { - return Platform.getProduct().getDefiningBundle().getEntry(filePath).openStream(); + IProduct product = Platform.getProduct(); + Bundle definingBundle = product != null ? product.getDefiningBundle() : null; + URL entry = definingBundle != null ? definingBundle.getEntry(filePath) : null; + if(entry == null) { + throw new IOException("No entry to '"+filePath+"' could be found or caller does not have the appropriate permissions.");//$NON-NLS-1$ //$NON-NLS-2$ + } + return entry.openStream(); } /* |