Example usage for org.eclipse.jgit.util RawParseUtils parsePersonIdent

List of usage examples for org.eclipse.jgit.util RawParseUtils parsePersonIdent

Introduction

In this page you can find the example usage for org.eclipse.jgit.util RawParseUtils parsePersonIdent.

Prototype

public static PersonIdent parsePersonIdent(byte[] raw, int nameB) 

Source Link

Document

Parse a name line (e.g.

Usage

From source file:com.google.gerrit.server.notedb.CommentsInNotesUtil.java

License:Apache License

private static Account.Id parseAuthor(byte[] note, MutableInteger curr, Change.Id changeId, Charset enc)
        throws ConfigInvalidException {
    checkHeaderLineFormat(note, curr, AUTHOR, enc, changeId);
    int startOfAccountId = RawParseUtils.endOfFooterLineKey(note, curr.value) + 2;
    PersonIdent ident = RawParseUtils.parsePersonIdent(note, startOfAccountId);
    Account.Id aId = parseIdent(ident, changeId);
    curr.value = RawParseUtils.nextLF(note, curr.value);
    return checkResult(aId, "comment author", changeId);
}