diff options
author | Dave Borowitz <dborowitz@google.com> | 2016-05-03 16:18:52 -0400 |
---|---|---|
committer | Terry Parker <tparker@google.com> | 2016-05-03 14:40:15 -0700 |
commit | c9b00288fdc9a796c85434007d955c2df0e88096 (patch) | |
tree | de3be81a760152ad492f9ba270940d795d6cad02 /org.eclipse.jgit/src | |
parent | 0406290eb4598aa2e392e656f11781a053fce724 (diff) | |
download | jgit-c9b00288fdc9a796c85434007d955c2df0e88096.tar.gz jgit-c9b00288fdc9a796c85434007d955c2df0e88096.zip |
PersonIdent: Make appendSanitized public
Change-Id: I337c90fff3c013819a42a7622ac6bacc72828c07
Diffstat (limited to 'org.eclipse.jgit/src')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java index f352f39968..e08a98529d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java @@ -122,8 +122,9 @@ public class PersonIdent implements Serializable { * string builder to append to. * @param str * input string. + * @since 4.4 */ - private static void appendSanitized(StringBuilder r, String str) { + public static void appendSanitized(StringBuilder r, String str) { // Trim any whitespace less than \u0020 as in String#trim(). int i = 0; while (i < str.length() && str.charAt(i) <= ' ') { @@ -318,6 +319,9 @@ public class PersonIdent implements Serializable { return tzOffset; } + /** + * Hashcode is based only on the email address and timestamp. + */ public int hashCode() { int hc = getEmailAddress().hashCode(); hc *= 31; @@ -370,3 +374,4 @@ public class PersonIdent implements Serializable { return r.toString(); } } + |