Fix Repository.resolve() to not throw runtime exceptions
commit427360f8c2e46d7919d26e13837e57bf18e6ae73
authorMarek Zawirski <marek.zawirski@gmail.com>
Sun, 17 Aug 2008 20:43:44 +0000 (17 22:43 +0200)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Thu, 21 Aug 2008 19:19:39 +0000 (21 21:19 +0200)
tree26bf81eebfea7e989eae54b67d421958b068f356
parent7adedc3e2a97a309f8113dfe34da6c8c257f2c06
Fix Repository.resolve() to not throw runtime exceptions

resolve() was throwing undocumented runtime exceptions.
ArrayIndexOutOfBoundsException was thrown when it couldn't find commit's
parents and NumberFormatException when it couldn't parse parents number.

Now it returns null when it can't find appropriate commit's parents
and (already checked) RevisionSyntaxException when it can't parse number.

Signed-off-by: Marek Zawirski <marek.zawirski@gmail.com>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java