]> source.dussan.org Git - jgit.git/commit
Throw IncorrectObjectTypeException on bad type hints 88/988/1
authorShawn O. Pearce <spearce@spearce.org>
Mon, 28 Jun 2010 17:37:08 +0000 (10:37 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Mon, 28 Jun 2010 18:47:25 +0000 (11:47 -0700)
commit9ba7bd4df452a1d005fbf770141076e901ad61d6
tree15b173ec10dec86a9387eee67cf762c8e0032117
parenta45728d7a4fe1b83953ba38ec980caa6a3f1d3c4
Throw IncorrectObjectTypeException on bad type hints

If the type hint isn't OBJ_ANY and it doesn't match the actual type
observed from the object store, define the reader to throw back an
IncorrectObjectTypeException.  This way the caller doesn't have to
perform this check itself before it evaluates the object data, and
we can simplify quite a few call sites.

Change-Id: I9f0dfa033857f439c94245361fcae515bc0a6533
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCursor.java