# HG changeset patch # Parent c9c228f4baf228794a15a2b8ce02551712462bd7 # User Jesse Glick # Date 1361977932 18000 #226796: introduced ConnectionBuilder.clearRejectedAuthentication. diff --git a/hudson/src/org/netbeans/modules/hudson/api/ConnectionBuilder.java b/hudson/src/org/netbeans/modules/hudson/api/ConnectionBuilder.java --- a/hudson/src/org/netbeans/modules/hudson/api/ConnectionBuilder.java +++ b/hudson/src/org/netbeans/modules/hudson/api/ConnectionBuilder.java @@ -446,4 +446,13 @@ } } + /** + * Clears list of servers for which we are not checking for authentication any more. + * Normally when login fails that server is blacklisted so that you are not pestered to log in over and over. + * But sometimes you want to explicitly try again, and should not need to restart the IDE. + */ + public static void clearRejectedAuthentication() { + authenticationRejected.clear(); + } + } diff --git a/hudson/src/org/netbeans/modules/hudson/impl/HudsonInstanceImpl.java b/hudson/src/org/netbeans/modules/hudson/impl/HudsonInstanceImpl.java --- a/hudson/src/org/netbeans/modules/hudson/impl/HudsonInstanceImpl.java +++ b/hudson/src/org/netbeans/modules/hudson/impl/HudsonInstanceImpl.java @@ -62,6 +62,7 @@ import java.util.prefs.Preferences; import org.netbeans.api.progress.ProgressHandle; import org.netbeans.api.progress.ProgressHandleFactory; +import org.netbeans.modules.hudson.api.ConnectionBuilder; import org.netbeans.modules.hudson.api.HudsonChangeAdapter; import org.netbeans.modules.hudson.api.HudsonChangeListener; import org.netbeans.modules.hudson.api.HudsonInstance; @@ -364,6 +365,10 @@ handle.set(handleObject); handle.get().start(); + + if (authentication) { + ConnectionBuilder.clearRejectedAuthentication(); + } synchThread.set(Thread.currentThread()); try { diff --git a/hudson/src/org/netbeans/modules/hudson/ui/actions/AddInstanceAction.java b/hudson/src/org/netbeans/modules/hudson/ui/actions/AddInstanceAction.java --- a/hudson/src/org/netbeans/modules/hudson/ui/actions/AddInstanceAction.java +++ b/hudson/src/org/netbeans/modules/hudson/ui/actions/AddInstanceAction.java @@ -46,6 +46,7 @@ import java.awt.event.ActionEvent; import javax.swing.AbstractAction; +import org.netbeans.modules.hudson.api.ConnectionBuilder; import org.netbeans.modules.hudson.ui.wizard.InstanceDialog; import org.openide.util.NbBundle; @@ -59,6 +60,7 @@ } public void actionPerformed(ActionEvent e) { + ConnectionBuilder.clearRejectedAuthentication(); new InstanceDialog().show(); }