]> source.dussan.org Git - jgit.git/commit
Throw InvalidObjectIdException from ObjectId.fromString("tooshort") 44/51144/3
authorJonathan Nieder <jrn@google.com>
Tue, 30 Jun 2015 21:42:39 +0000 (14:42 -0700)
committerJonathan Nieder <jrn@google.com>
Mon, 6 Jul 2015 19:41:06 +0000 (12:41 -0700)
commit761f070866f224b4c9f4abed6e1231518677e848
tree8c3754b300d1f1d1edb04a64285feffa5905fb9e
parent0c7ad12c767d34ab90505c405ad6f0b70ee670ec
Throw InvalidObjectIdException from ObjectId.fromString("tooshort")

ObjectId.fromString already throws InvalidObjectIdException for most
malformed object ids, but for this kind it previously threw
IllegalArgumentException.  Since InvalidObjectIdException is a child of
IllegalArgumentException, callers that catch IllegalArgumentException
will continue to work.

Change-Id: I24e1422d51607c86a1cb816a495703279e461f01
Signed-off-by: Jonathan Nieder <jrn@google.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectIdTest.java
org.eclipse.jgit/src/org/eclipse/jgit/errors/InvalidObjectIdException.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectId.java