From 353fe4089775e795567bb1bf0cabe7b6e7c8be6d Mon Sep 17 00:00:00 2001 From: Alena Laskavaia Date: Thu, 4 Feb 2016 13:02:58 -0500 Subject: [PATCH] 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 --- .../ui/internal/commands/ConfigureActiveLaunchHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/ConfigureActiveLaunchHandler.java b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/ConfigureActiveLaunchHandler.java index 09d2d166a02..df7cd0cebc1 100644 --- a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/ConfigureActiveLaunchHandler.java +++ b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/ConfigureActiveLaunchHandler.java @@ -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