Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2010-05-19 08:35:09 -0400
committerPascal Rapicault2010-05-19 08:35:09 -0400
commit40c370942bb5325012d8427b4fd358da2c6c8c69 (patch)
treef5973ec74308f6c62820d424e2d8c6582dcd597c /bundles
parent169558d17643bbc8d83bd9f3453f7fb86e3956ac (diff)
downloadrt.equinox.p2-40c370942bb5325012d8427b4fd358da2c6c8c69.tar.gz
rt.equinox.p2-40c370942bb5325012d8427b4fd358da2c6c8c69.tar.xz
rt.equinox.p2-40c370942bb5325012d8427b4fd358da2c6c8c69.zip
Bug 256281 - [transport] Authentication credentials not cached
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java
index d45e858e3..0a9bb7e11 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, IBM Corporation and others.
+ * Copyright (c) 2009,2010 IBM Corporation and others.
* The code, documentation and other materials contained herein have been
* licensed under the Eclipse Public License - v 1.0 by the copyright holder
* listed above, as the Initial Contributor under such license. The text of
@@ -7,6 +7,7 @@
* Contributors:
* IBM Corporation - Initial API and implementation
* Cloudsmith Inc - Implementation
+ * Sonatype Inc - Ongoing development
******************************************************************************/
package org.eclipse.equinox.internal.p2.repository;
@@ -195,8 +196,8 @@ public class Credentials {
}
UIServices.AuthenticationInfo latest = restoreFromMemory(nodeName);
- if (latest != null && lastUsed != null)
- if (!(latest.getUserName().equals(lastUsed.getUserName()) && latest.getPassword().equals(lastUsed.getPassword())))
+ if (latest != null)
+ if (lastUsed == null || !(latest.getUserName().equals(lastUsed.getUserName()) && latest.getPassword().equals(lastUsed.getPassword())))
return latest;
// check if number of prompts have been exceeded for the host - if so

Back to the top