diff options
author | Pascal Rapicault | 2010-05-19 12:35:09 +0000 |
---|---|---|
committer | Pascal Rapicault | 2010-05-19 12:35:09 +0000 |
commit | 40c370942bb5325012d8427b4fd358da2c6c8c69 (patch) | |
tree | f5973ec74308f6c62820d424e2d8c6582dcd597c /bundles | |
parent | 169558d17643bbc8d83bd9f3453f7fb86e3956ac (diff) | |
download | rt.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.java | 7 |
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 |