diff options
author | DJ Houghton | 2009-10-14 18:26:50 +0000 |
---|---|---|
committer | DJ Houghton | 2009-10-14 18:26:50 +0000 |
commit | 1af156d1c5eea3fda654c0a15f17471360e2aa3f (patch) | |
tree | 231654071d89552cb1231942fc63b6ac593745eb /bundles/org.eclipse.equinox.p2.touchpoint.eclipse | |
parent | 8a8d47bfb09a2456e8e8addeaa3a2e6febdc64a1 (diff) | |
download | rt.equinox.p2-1af156d1c5eea3fda654c0a15f17471360e2aa3f.tar.gz rt.equinox.p2-1af156d1c5eea3fda654c0a15f17471360e2aa3f.tar.xz rt.equinox.p2-1af156d1c5eea3fda654c0a15f17471360e2aa3f.zip |
Bugzilla Bug 292268 - [touchpoint] Potential NPE in Eclipse touchpoint
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.touchpoint.eclipse')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java index a5e74bbe0..bbe7cd346 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java +++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java @@ -12,8 +12,6 @@ *******************************************************************************/ package org.eclipse.equinox.internal.p2.touchpoint.eclipse; -import org.eclipse.equinox.internal.provisional.p2.metadata.Version; - import java.io.*; import java.net.*; import java.util.*; @@ -255,7 +253,8 @@ public class Util { String name = profile.getProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME); if (name == null || name.length() == 0) name = "eclipse"; //$NON-NLS-1$ - return new File(getInstallFolder(profile), getLauncherName(name, getOSFromProfile(profile))); + String launcherName = getLauncherName(name, getOSFromProfile(profile)); + return launcherName == null ? null : new File(getInstallFolder(profile), launcherName); } /** @@ -264,8 +263,9 @@ public class Util { private static String getLauncherName(String name, String os) { if (os == null) { EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName()); - if (info != null) - os = info.getOS(); + if (info == null) + return null; + os = info.getOS(); } if (os.equals(org.eclipse.osgi.service.environment.Constants.OS_WIN32)) { |