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/gitrepo | |
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/gitrepo')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/ManifestParser.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/ManifestParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/ManifestParser.java index 4ec45db4f1..929ffac114 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/ManifestParser.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/ManifestParser.java @@ -178,10 +178,7 @@ public class ManifestParser extends DefaultHandler { try { xr.parse(new InputSource(inputStream)); } catch (SAXException e) { - IOException error = new IOException( - RepoText.get().errorParsingManifestFile); - error.initCause(e); - throw error; + throw new IOException(RepoText.get().errorParsingManifestFile, e); } } |