Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352984 - CommitCommand setCommitter() and setAuthor() methods don't handle null values
Summary: CommitCommand setCommitter() and setAuthor() methods don't handle null values
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 1.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 2.2-M1   Edit
Assignee: Matthias Sohn CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 393054
  Show dependency tree
 
Reported: 2011-07-25 05:30 EDT by Piotr Janik CLA
Modified: 2012-10-29 10:42 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Janik CLA 2011-07-25 05:30:02 EDT
Build Identifier: 

setCommitter(String name, String email) doc:
"Sets the committer for this commit. If no committer is explicitly specified because this method is never called or called with null value then the committer will be deduced from config info in repository, with current time."
setAuthor(String name, String email) doc:
"Sets the author for this commit. If no author is explicitly specified because this method is never called or called with null value then the author will be set to the committer."

However, passing null values results in committer/author name and email set to "null".

Reproducible: Always
Comment 1 Robin Stocker CLA 2012-10-13 12:43:36 EDT
The other setAuthor/setCommitter methods behave as documented, but the ones with separate name and e-mail arguments don't.

Pushed a change to fix the documentation and explicitly disallow null arguments to PersonIdent:

https://git.eclipse.org/r/8191
Comment 2 Shawn Pearce CLA 2012-10-25 17:19:50 EDT
Committed 6dadc801bdd8e2715e7351f1279ef3b3d59763cc