PatchScriptBuilder: Remove unnecessary else-clauses

Change-Id: Ia6fca30672cacbb9fd36e05fe1e36fb41b2492e6
This commit is contained in:
David Pursehouse
2019-10-31 22:14:55 +09:00
parent b0ae5468d1
commit 80adda3603

View File

@@ -522,7 +522,7 @@ class PatchScriptBuilder {
MimeUtil2.UNKNOWN_MIME_TYPE, MimeUtil2.UNKNOWN_MIME_TYPE,
DisplayMethod.NONE, DisplayMethod.NONE,
false); false);
} else { }
Text src = Text src =
isCommitMsg isCommitMsg
? Text.forCommit(reader, within) ? Text.forCommit(reader, within)
@@ -547,7 +547,6 @@ class PatchScriptBuilder {
displayMethod, displayMethod,
false); false);
} }
} else {
final TreeWalk tw = find(path, within); final TreeWalk tw = find(path, within);
ObjectId id = tw != null ? tw.getObjectId(0) : ObjectId.zeroId(); ObjectId id = tw != null ? tw.getObjectId(0) : ObjectId.zeroId();
FileMode mode = tw != null ? tw.getFileMode(0) : FileMode.MISSING; FileMode mode = tw != null ? tw.getFileMode(0) : FileMode.MISSING;
@@ -584,7 +583,6 @@ class PatchScriptBuilder {
} }
} }
return createSide(path, id, mode, srcContent, src, mimeType, displayMethod, reuse); return createSide(path, id, mode, srcContent, src, mimeType, displayMethod, reuse);
}
} catch (IOException err) { } catch (IOException err) {
throw new IOException("Cannot read " + within.name() + ":" + path, err); throw new IOException("Cannot read " + within.name() + ":" + path, err);
} }