From 0c259eaf1db076837768512deb6c251c86e67941 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Tue, 19 Dec 2017 14:05:40 +0900 Subject: Replace explicit calls to initCause where possible Where the exception being thrown has a constructor that takes a Throwable, use that instead of instantiating the exception and then explicitly calling initCause. Change-Id: I06a0df407ba751a7af8c1c4a46f9e2714f13dbe3 Signed-off-by: David Pursehouse --- org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java') diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java index bbc964227f..0c54027c7f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java @@ -549,9 +549,7 @@ abstract class HttpAuthMethod { conn.setRequestProperty(HDR_AUTHORIZATION, getType().getSchemeName() + " " + Base64.encodeBytes(token)); //$NON-NLS-1$ } catch (GSSException e) { - IOException ioe = new IOException(); - ioe.initCause(e); - throw ioe; + throw new IOException(e); } } } -- cgit v1.2.3