From fe2cef58f42b3f8a914bcf379d848acc37842934 Mon Sep 17 00:00:00 2001 From: David McKnight Date: Fri, 12 Apr 2013 15:38:21 -0400 Subject: [PATCH] [396143] Fix second time validation --- .../RSEDefaultNewConnectionWizardMainPage.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizardMainPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizardMainPage.java index bf3673cd0c6..0bb49e12c73 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizardMainPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizardMainPage.java @@ -14,6 +14,7 @@ * Uwe Stieber (Wind River) - Reworked new connection wizard extension point. * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType * Uwe Stieber (Wind River) - Fix stack overflow in canFlipToNextPage() and getNextPage() + * Mohamed Hussein (Mentor Graphics) - [396143] Fix second time validation ********************************************************************************/ package org.eclipse.rse.ui.wizards.newconnection; @@ -147,9 +148,12 @@ public class RSEDefaultNewConnectionWizardMainPage extends WizardPage implements // this is done because the main page may have input that is not valid, but can // only be verified when next is pressed since it requires a long running operation if (!formVerificationGateKeeper) { - formVerificationGateKeeper = true; - if (!getSystemConnectionForm().verify(true)) return null; - formVerificationGateKeeper = false; + try { + formVerificationGateKeeper = true; + if (!getSystemConnectionForm().verify(true)) return null; + } finally { + formVerificationGateKeeper = false; + } } RSEDefaultNewConnectionWizard newConnWizard = getWizard() instanceof RSEDefaultNewConnectionWizard ? (RSEDefaultNewConnectionWizard)getWizard() : null;