Author: yradtsevich
Date: 2012-08-02 06:57:34 -0400 (Thu, 02 Aug 2012)
New Revision: 42832
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/util/ManifestUtil.java
Log:
https://issues.jboss.org/browse/JBIDE-12383 : BrowserSim: NPE and program exit when
opening About menu from standalone BrowserSim
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/util/ManifestUtil.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/util/ManifestUtil.java 2012-08-01
17:40:28 UTC (rev 42831)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/util/ManifestUtil.java 2012-08-02
10:57:34 UTC (rev 42832)
@@ -50,7 +50,7 @@
if (version == null) {
// If Manifest Version is not in jar
URL browserSimBaseUrl = BrowserSim.class.getClassLoader().getResource(".");
//$NON-NLS-1$
- if ("file".equals(browserSimBaseUrl.getProtocol())) { //$NON-NLS-1$
+ if (browserSimBaseUrl != null &&
"file".equals(browserSimBaseUrl.getProtocol())) { //$NON-NLS-1$
File binDir = new File(browserSimBaseUrl.getFile());
File browsersimDir = binDir.getParentFile();
File manifestFile = new File(browsersimDir, JarFile.MANIFEST_NAME);