From 40c370942bb5325012d8427b4fd358da2c6c8c69 Mon Sep 17 00:00:00 2001 From: Pascal Rapicault Date: Wed, 19 May 2010 12:35:09 +0000 Subject: Bug 256281 - [transport] Authentication credentials not cached --- .../org/eclipse/equinox/internal/p2/repository/Credentials.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bundles/org.eclipse.equinox.p2.repository') 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 -- cgit v1.2.3