1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-10 18:45:26 +02:00

launchbar: fixed unsafe cast

- instead of doing method check and then casting without check, just do
a instance check which would gurantee the result and won't rely on that
method

Change-Id: I153f3113d15d6b145e41ee8c3d48cfe0a5c296d8
This commit is contained in:
Alena Laskavaia 2016-02-04 13:02:58 -05:00
parent 2b940d6fea
commit 353fe40897

View file

@ -136,7 +136,7 @@ public class ConfigureActiveLaunchHandler extends AbstractHandler {
ILaunchGroup group = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(configType,
mode.getIdentifier());
ILaunchConfiguration config = manager.getLaunchConfiguration(desc, target);
if (config.isWorkingCopy() && ((ILaunchConfigurationWorkingCopy) config).isDirty()) {
if (config instanceof ILaunchConfigurationWorkingCopy && ((ILaunchConfigurationWorkingCopy) config).isDirty()) {
config = ((ILaunchConfigurationWorkingCopy) config).doSave();
}
// open real eclipse launch configurations dialog