Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347774 - NPE in RawParseUtils.author for deleted file
Summary: NPE in RawParseUtils.author for deleted file
Status: CLOSED DUPLICATE of bug 358869
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-31 08:32 EDT by ákos tajti CLA
Modified: 2013-04-19 04:39 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ákos tajti CLA 2011-05-31 08:32:47 EDT
Build Identifier: 

I have a method that simply walks through the RevCommits in a repo. For each commit, I call the getAuthorIdent() method. In some cases it throws a NPE:

Caused by: java.lang.NullPointerException
	at org.eclipse.jgit.util.RawParseUtils.author(RawParseUtils.java:560)
	at org.eclipse.jgit.revwalk.RevCommit.getAuthorIdent(RevCommit.java:338)

Reproducible: Always
Comment 1 ákos tajti CLA 2011-05-31 09:31:01 EDT
I executed git show and git cat-file on a commit that causes exception: 

E:\without-fork>git show 40e3d63c8857d2dd386dc23b73bfa95e2245a813
commit 40e3d63c8857d2dd386dc23b73bfa95e2245a813
Author: akostajti <akos.tajti@intland.com>
Date:   Tue May 31 15:22:11 2011 +0200

    fourth commit

diff --git a/root.txt b/root.txt
new file mode 100644
index 0000000..39af58f
--- /dev/null
+++ b/root.txt
@@ -0,0 +1 @@
+root filr^M

E:\without-fork>git cat-file commit 40e3d63c8857d2dd386dc23b73bfa95e2245a813
tree a463d3c682fcfbaa43f94b48a72d433d2745ef59
parent ce554b9b7b58c4eedb7f537ec484909264ad56c1
author akostajti <akos.tajti@intland.com> 1306848131 +0200
committer akostajti <akos.tajti@intland.com> 1306848131 +0200

fourth commit
Comment 2 Markus Keller CLA 2011-09-28 09:12:21 EDT
Looks like this causes bug 358869 in EGit.
Comment 3 Robin Rosenberg CLA 2013-04-19 04:39:45 EDT

*** This bug has been marked as a duplicate of bug 358869 ***