diff options
author | Sarika Sinha | 2016-05-06 02:57:16 +0000 |
---|---|---|
committer | Sarika Sinha | 2016-05-06 12:51:31 +0000 |
commit | 59ebb61484af6371b211e05af63fa9eceddbc218 (patch) | |
tree | 3ca6d2296e379d1330e1df9b976e29d1f697430c | |
parent | 195733aaa797df98ff894f84628865246d799da1 (diff) | |
download | eclipse.platform.debug-59ebb61484af6371b211e05af63fa9eceddbc218.tar.gz eclipse.platform.debug-59ebb61484af6371b211e05af63fa9eceddbc218.tar.xz eclipse.platform.debug-59ebb61484af6371b211e05af63fa9eceddbc218.zip |
Bug 470366 - NullPointerException inI20160508-2000I20160507-1500I20160506-2000I20160506-1030
LaunchConfigurationTabGroupViewer.verifyName()
Change-Id: I9a133e04a3bbc4a225e3bd2a26b86879f625b873
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java index 142ea3a00..f4f60cedd 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2014, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -1310,11 +1310,13 @@ public class LaunchConfigurationTabGroupViewer { Set<String> reservednames = ((LaunchConfigurationsDialog) getLaunchConfigurationDialog()).getReservedNameSet(); if (mgr.isExistingLaunchConfigurationName(currentName) || (reservednames != null ? reservednames.contains(currentName) : false)) { ILaunchConfiguration config = ((LaunchManager)mgr).findLaunchConfiguration(currentName); - //config cannot be null at this location since the manager knows the name conflicts + // config can be null if name matches to unsaved + // configuration created in Properties dialog + String configTypeName = config != null ? config.getType().getName() : fOriginal.getType().getName(); throw new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), 0, - NLS.bind(LaunchConfigurationsMessages.LaunchConfigurationDialog_Launch_configuration_already_exists_with_this_name_12, config.getType().getName()), + NLS.bind(LaunchConfigurationsMessages.LaunchConfigurationDialog_Launch_configuration_already_exists_with_this_name_12, configTypeName), null)); } } |