ObjectId: Convert StringIndexOutOfBounds to IllegalArgumentException
commit2e225cfcff96dcb668695bd9bbf076d377cb981e
authorShawn O. Pearce <spearce@spearce.org>
Tue, 30 Sep 2008 07:47:51 +0000 (30 00:47 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Fri, 3 Oct 2008 06:22:55 +0000 (3 08:22 +0200)
treed3a826a813a25f070237bc1ea160ed77120083d1
parenta0a472a898a26cf5ad6ae6b84fa3705350b2abb7
ObjectId: Convert StringIndexOutOfBounds to IllegalArgumentException

If parsing an ObjectId fromString fails because the string is too short
we don't want to throw StringIndexOutOfBoundsException with a trace that
leads back to the error handling code; instead we should throw what the
caller expects us to throw, which is IllegalArgumentException.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit/src/org/spearce/jgit/lib/MutableObjectId.java