Skip to content

Commit d3ba1f7

Browse files
committed
fix some issues according to comments
1 parent 61f7c7e commit d3ba1f7

File tree

1 file changed

+6
-5
lines changed
  • PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.azureexplorer/src/com/microsoft/azuretools/azureexplorer/forms

1 file changed

+6
-5
lines changed

PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.azureexplorer/src/com/microsoft/azuretools/azureexplorer/forms/AddNewClusterForm.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@
1111
import org.eclipse.swt.widgets.Label;
1212
import org.eclipse.swt.widgets.Shell;
1313
import org.eclipse.swt.widgets.Text;
14-
import org.eclipse.ui.PartInitException;
1514
import org.eclipse.ui.PlatformUI;
15+
import org.eclipse.ui.browser.IWebBrowser;
1616

17-
import java.net.MalformedURLException;
1817
import java.net.URL;
1918

2019
import com.microsoft.azure.hdinsight.common.ClusterManagerEx;
@@ -142,10 +141,12 @@ protected Control createDialogArea(Composite parent) {
142141
passwordField.setToolTipText("The password of the HDInsight cluster user provided.\n\n Press the F1 key or click the '?'(Help) button to get more details.");
143142

144143
container.addHelpListener(new HelpListener() {
145-
@Override public void helpRequested(HelpEvent e) {
144+
@Override public void helpRequested(HelpEvent e) {
146145
try {
147-
PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(new URL("https://go.microsoft.com/fwlink/?linkid=866472"));
148-
} catch (PartInitException | MalformedURLException e1) {
146+
IWebBrowser webBrowser = PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser();
147+
if (webBrowser != null)
148+
webBrowser.openURL(new URL("https://go.microsoft.com/fwlink/?linkid=866472"));
149+
} catch (Exception e1) {
149150
}
150151
}
151152
});

0 commit comments

Comments
 (0)