diff options
author | Michael Rennie | 2009-05-04 18:32:33 +0000 |
---|---|---|
committer | Michael Rennie | 2009-05-04 18:32:33 +0000 |
commit | 49805e6bee7dd4a5c4753414be34d0691e649ad2 (patch) | |
tree | 616868f91ff4c5096dc3ccf3888aaa72b31173bd /org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java | |
parent | e8442decf6712b949826c2a6c045638259ceb8f0 (diff) | |
download | eclipse.platform.debug-49805e6bee7dd4a5c4753414be34d0691e649ad2.tar.gz eclipse.platform.debug-49805e6bee7dd4a5c4753414be34d0691e649ad2.tar.xz eclipse.platform.debug-49805e6bee7dd4a5c4753414be34d0691e649ad2.zip |
Bug 273498 Launch history generation could be more robust
Diffstat (limited to 'org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java')
-rw-r--r-- | org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java index f620b2314..141f43e12 100644 --- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java +++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java @@ -199,8 +199,7 @@ public class LaunchConfiguration extends PlatformObject implements ILaunchConfig Exception ex = null; try { Element root = null; - DocumentBuilder parser = - DocumentBuilderFactory.newInstance().newDocumentBuilder(); + DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder(); parser.setErrorHandler(new DefaultHandler()); StringReader reader = new StringReader(memento); InputSource source = new InputSource(reader); @@ -210,14 +209,13 @@ public class LaunchConfiguration extends PlatformObject implements ILaunchConfig String path = root.getAttribute(IConfigurationElementConstants.PATH); String message = null; - if (path == null) { + if (path == null || IInternalDebugCoreConstants.EMPTY_STRING.equals(path)) { message = DebugCoreMessages.LaunchConfiguration_18; - } else if (localString == null) { + } else if (localString == null || IInternalDebugCoreConstants.EMPTY_STRING.equals(localString)) { message = DebugCoreMessages.LaunchConfiguration_19; } if (message != null) { - IStatus s = newStatus(message, DebugException.INTERNAL_ERROR, null); - throw new CoreException(s); + throw new CoreException(newStatus(message, DebugException.INTERNAL_ERROR, null)); } |