Fix Repository.resolve() to not throw runtime exceptions
commitfc7626f59b352d002485c908ccf8dba99dfa822d
authorMarek Zawirski <marek.zawirski@gmail.com>
Sat, 16 Aug 2008 13:27:15 +0000 (16 15:27 +0200)
committerMarek Zawirski <marek.zawirski@gmail.com>
Sat, 16 Aug 2008 13:27:15 +0000 (16 15:27 +0200)
treeaea6491b9e07ecc96eee7586bc8cdc7990dae1ec
parentd704d5e747c2b011a840934caa27defa3fb32d82
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>
org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java