]> source.dussan.org Git - jgit.git/commit
Added check for null on DirCacheEntry in checkoutEntry method 24/170224/10
authorTudor Matrescu <mit.tudor@gmail.com>
Wed, 21 Oct 2020 09:41:40 +0000 (12:41 +0300)
committerTudor Matrescu <mit.tudor@gmail.com>
Thu, 3 Dec 2020 07:59:10 +0000 (02:59 -0500)
commitaa3a1ecd133628c4d9d211d2b227f96b5c3d9d8f
treef8fc30f5dc06cf6fc300bb43a45f85ea891eb838
parent9034c7d42349dc995c6215dfb55dcafb65d9e951
Added check for null on DirCacheEntry in checkoutEntry method

Observed the error when trying to force checkout from a branch
that had no changes on it. When the 'keep()' method from 'DirCacheCheckout'
method was called the 'DirCacheEntry e' was null and was passed like
this to the 'checkoutEntry()' method where the 'getObjectId()' is
being called on the 'e' object

Change-Id: If3a9b9e60064459d187c7db04eb4471a72c6cece
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTest.java
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java