summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2020-06-05 14:46:08 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2020-06-05 14:48:15 +0900
commitf4f5d448b691c06688cb3636dc2294308b1a433f (patch)
tree7e00aa25c27e97ca5bda735ff2aa49b1b1a209b7 /org.eclipse.jgit
parentdac6801b47ef7924d6b265800816da1b571e6d70 (diff)
downloadjgit-f4f5d448b691c06688cb3636dc2294308b1a433f.tar.gz
jgit-f4f5d448b691c06688cb3636dc2294308b1a433f.zip
ObjectDirectoryInserter: Remove redundant 'throws' declarations
ObjectWritingException and FileNotFoundException are subclasses of IOException, which is already declared. Error does not need to be explicitly declared. Change-Id: I879820a33e10ec3a7ef676adc9c9148d2b3c4b27 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java
index c908e6a244..2d2401b5b4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java
@@ -14,7 +14,6 @@ package org.eclipse.jgit.internal.storage.file;
import java.io.EOFException;
import java.io.File;
-import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FilterOutputStream;
import java.io.IOException;
@@ -116,7 +115,7 @@ class ObjectDirectoryInserter extends ObjectInserter {
private ObjectId insertOneObject(
File tmp, ObjectId id, boolean createDuplicate)
- throws IOException, ObjectWritingException {
+ throws IOException {
switch (db.insertUnpackedObject(tmp, id, createDuplicate)) {
case INSERTED:
case EXISTS_PACKED:
@@ -165,8 +164,7 @@ class ObjectDirectoryInserter extends ObjectInserter {
@SuppressWarnings("resource" /* java 7 */)
private File toTemp(final SHA1 md, final int type, long len,
- final InputStream is) throws IOException, FileNotFoundException,
- Error {
+ final InputStream is) throws IOException {
boolean delete = true;
File tmp = newTempFile();
try {
@@ -205,7 +203,7 @@ class ObjectDirectoryInserter extends ObjectInserter {
@SuppressWarnings("resource" /* java 7 */)
private File toTemp(final int type, final byte[] buf, final int pos,
- final int len) throws IOException, FileNotFoundException {
+ final int len) throws IOException {
boolean delete = true;
File tmp = newTempFile();
try {