[JGIT PATCH 1/5] Remove throws IOException from UnpackedObjectLoader.getCachedBytes
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Apr 23, 2009, 03:36 UTC
- Message-ID
- <1240457783-21434-2-git-send-email-spearce@spearce.org>
- In-Reply-To
- <1240457783-21434-1-git-send-email-spearce@spearce.org>
The UnpackedObjectLoader always fully materializes itself during the object's constructor. Thus the cached bytes are always ready on any invocation of getCachedBytes(), and this method will never fail.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org> --- .../org/spearce/jgit/lib/UnpackedObjectLoader.java | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/UnpackedObjectLoader.java b/org.spearce.jgit/src/org/spearce/jgit/lib/UnpackedObjectLoader.java index 7552b42..1352b72 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/lib/UnpackedObjectLoader.java +++ b/org.spearce.jgit/src/org/spearce/jgit/lib/UnpackedObjectLoader.java @@ -201,7 +201,7 @@ public long getSize() { } @Override - public byte[] getCachedBytes() throws IOException { + public byte[] getCachedBytes() { return bytes; }
-- 1.6.3.rc1.205.g37f8