| Summary: | NPE when opening compare editor from first changeset in synchronize view | ||
|---|---|---|---|
| Product: | [Technology] EGit | Reporter: | Matthias Sohn <matthias.sohn> |
| Component: | UI | Assignee: | Dariusz Luksza <dariusz.luksza> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | caniszczyk, dariusz.luksza, remy.suen, stefan.lay |
| Version: | unspecified | ||
| Target Milestone: | 0.9.0-M2 | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
| Bug Depends on: | 322935 | ||
| Bug Blocks: | |||
|
Description
Matthias Sohn
I've investigate it and it appears that this NPE occurs for all files that are associated with oldest commit that is included in change set. *** Bug 322920 has been marked as a duplicate of this bug. *** From my point of view this look like a bug in JGit. For some strange reasons JGit lost some data in RevCommit object. From my investigations appears that sometime: revCommit.getParrent(0).getAuthorIdent() throws NPE but calling: revCommit.getParrent(0).getId() on same object return commit SHA-1 Quick fix for this seems to be re-parsing revCommit object, so I've add this to GitCommiModel constructor. Check does all baseCommit's has author indent and it appears to be working ... but while calling Compare View NPE still occur. Even that all baseCommit's was re-parsed in GitModelObject constructor. Finally, the true quick fix for this would be replacing simple getBaseCommit() in GitModelBlob.getRight() with RevWalk.parseCommit(getBaseCommit()). With this approach NPE doesn't occur any more but this is rather workaround then true fix. (In reply to comment #3) > From my point of view this look like a bug in JGit. For some strange reasons > JGit lost some data in RevCommit object. From my investigations appears that > sometime: > revCommit.getParrent(0).getAuthorIdent() > throws NPE but calling: > revCommit.getParrent(0).getId() > on same object return commit SHA-1 > > Quick fix for this seems to be re-parsing revCommit object, so I've add this to > GitCommiModel constructor. Check does all baseCommit's has author indent and it > appears to be working ... but while calling Compare View NPE still occur. Even > that all baseCommit's was re-parsed in GitModelObject constructor. > > Finally, the true quick fix for this would be replacing simple getBaseCommit() > in GitModelBlob.getRight() with RevWalk.parseCommit(getBaseCommit()). With this > approach NPE doesn't occur any more but this is rather workaround then true > fix. Send an email to jgit-dev and file a bug against JGit. This patch should fix this: http://egit.eclipse.org/r/1339 Fixed with ff88637c69af6e114c3d8c722681f655943dfe23 Thanks Dariusz! *** Bug 322498 has been marked as a duplicate of this bug. *** |