Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-01-15 07:53:08 +0000
committerspingel2010-01-15 07:53:08 +0000
commit883995173986ce431e991dd095ab783bfbd5905b (patch)
tree7ffd336594c562ceed8546af50256e4badc9d324 /org.eclipse.mylyn.trac.core
parent7fbbf44cb49143e90faecc72505f891ba507924c (diff)
downloadorg.eclipse.mylyn.tasks-883995173986ce431e991dd095ab783bfbd5905b.tar.gz
org.eclipse.mylyn.tasks-883995173986ce431e991dd095ab783bfbd5905b.tar.xz
org.eclipse.mylyn.tasks-883995173986ce431e991dd095ab783bfbd5905b.zip
REOPENED - bug 296894: [releng] fix failing tests for 3.4
https://bugs.eclipse.org/bugs/show_bug.cgi?id=296894
Diffstat (limited to 'org.eclipse.mylyn.trac.core')
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracXmlRpcClient.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracXmlRpcClient.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracXmlRpcClient.java
index d724032b8..b561ec663 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracXmlRpcClient.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracXmlRpcClient.java
@@ -389,7 +389,8 @@ public class TracXmlRpcClient extends AbstractTracClient implements ITracWikiCli
private Object call(IProgressMonitor monitor, String method, Object... parameters) throws TracException {
monitor = Policy.monitorFor(monitor);
- while (true) {
+ TracException lastException = null;
+ for (int attempt = 0; attempt < 3; attempt++) {
if (!probed) {
try {
probeAuthenticationScheme(monitor);
@@ -407,22 +408,28 @@ public class TracXmlRpcClient extends AbstractTracClient implements ITracWikiCli
try {
location.requestCredentials(AuthenticationType.REPOSITORY, null, monitor);
} catch (UnsupportedRequestException ignored) {
- throw e;
+ lastException = e;
}
} catch (TracPermissionDeniedException e) {
try {
location.requestCredentials(AuthenticationType.REPOSITORY, null, monitor);
} catch (UnsupportedRequestException ignored) {
- throw e;
+ lastException = e;
}
} catch (TracProxyAuthenticationException e) {
try {
location.requestCredentials(AuthenticationType.PROXY, null, monitor);
} catch (UnsupportedRequestException ignored) {
- throw e;
+ lastException = e;
}
}
}
+ if (lastException != null) {
+ throw lastException;
+ } else {
+ // this path should never be reached
+ throw new IllegalStateException();
+ }
}
private Object[] multicall(IProgressMonitor monitor, Map<String, Object>... calls) throws TracException {

Back to the top