diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2017-12-19 14:05:40 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2017-12-20 08:02:34 +0900 |
commit | 0c259eaf1db076837768512deb6c251c86e67941 (patch) | |
tree | c4c6626d60acf0614cfd99fc7faa714acfec204c /org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java | |
parent | 19864c6c02906addcc52b9caee97ec8e6bba0fe8 (diff) | |
download | jgit-0c259eaf1db076837768512deb6c251c86e67941.tar.gz jgit-0c259eaf1db076837768512deb6c251c86e67941.zip |
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 <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java | 4 |
1 files changed, 1 insertions, 3 deletions
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); } } } |