Browse Source

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>
tags/v5.8.0.202006091008-r
David Pursehouse 4 years ago
parent
commit
f4f5d448b6

+ 3
- 5
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java View File



import java.io.EOFException; import java.io.EOFException;
import java.io.File; import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.FilterOutputStream; import java.io.FilterOutputStream;
import java.io.IOException; import java.io.IOException;


private ObjectId insertOneObject( private ObjectId insertOneObject(
File tmp, ObjectId id, boolean createDuplicate) File tmp, ObjectId id, boolean createDuplicate)
throws IOException, ObjectWritingException {
throws IOException {
switch (db.insertUnpackedObject(tmp, id, createDuplicate)) { switch (db.insertUnpackedObject(tmp, id, createDuplicate)) {
case INSERTED: case INSERTED:
case EXISTS_PACKED: case EXISTS_PACKED:


@SuppressWarnings("resource" /* java 7 */) @SuppressWarnings("resource" /* java 7 */)
private File toTemp(final SHA1 md, final int type, long len, 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; boolean delete = true;
File tmp = newTempFile(); File tmp = newTempFile();
try { try {


@SuppressWarnings("resource" /* java 7 */) @SuppressWarnings("resource" /* java 7 */)
private File toTemp(final int type, final byte[] buf, final int pos, 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; boolean delete = true;
File tmp = newTempFile(); File tmp = newTempFile();
try { try {

Loading…
Cancel
Save