git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[EGIT PATCH] Throw created exception

From
Robin Rosenberg <robin.rosenberg@dewire.com>
Date
Jan 27, 2009, 22:11 UTC
Message-ID
<1233094281-21621-1-git-send-email-robin.rosenberg@dewire.com>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../org/spearce/jgit/lib/UnpackedObjectLoader.java |    4 ++--
 1 files changed, 2 insertions(+), 2 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 0560c3a..f2cae87 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/UnpackedObjectLoader.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/UnpackedObjectLoader.java
@@ -89,7 +89,7 @@ public UnpackedObjectLoader(final Repository db, final AnyObjectId id)
 
 	/**
 	 * Construct an ObjectLoader from a loose object's compressed form.
-	 * 
+	 *
 	 * @param compressed
 	 *            entire content of the loose object file.
 	 * @throws CorruptObjectException
@@ -187,7 +187,7 @@ private void decompress(final AnyObjectId id, final Inflater inf, int p)
 			throw coe;
 		}
 		if (p != objectSize)
-			new CorruptObjectException(id, "incorrect length");
+			throw new CorruptObjectException(id, "incorrect length");
 	}
 
 	public int getType() {
-- 
1.6.1.285.g35d8b
Message 1 of 1 in “Throw created exception”
  1. Throw created exceptionRobin Rosenberg, Jan 27, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.