Package com.google.gerrit.server.notedb
Class RevisionNote<T>
java.lang.Object
com.google.gerrit.server.notedb.RevisionNote<T>
- Direct Known Subclasses:
RobotCommentsRevisionNote
Data stored in a note, parsed on demand. The data type to parse into is a generic list of type T.
The source of the data is a array of raw bytes
-
Constructor Summary
ConstructorsConstructorDescriptionRevisionNote
(org.eclipse.jgit.lib.ObjectReader reader, org.eclipse.jgit.lib.ObjectId noteId) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
com.google.common.collect.ImmutableList<T>
byte[]
getRaw()
void
parse()
Reads the raw data, and delegates parsing to theparse(byte[], int)
method.parse
(byte[] raw, int offset) protected static void
trimLeadingEmptyLines
(byte[] bytes, org.eclipse.jgit.util.MutableInteger p)
-
Constructor Details
-
RevisionNote
public RevisionNote(org.eclipse.jgit.lib.ObjectReader reader, org.eclipse.jgit.lib.ObjectId noteId)
-
-
Method Details
-
trimLeadingEmptyLines
protected static void trimLeadingEmptyLines(byte[] bytes, org.eclipse.jgit.util.MutableInteger p) -
getRaw
public byte[] getRaw() -
getOnlyEntity
-
getEntities
-
parse
Reads the raw data, and delegates parsing to theparse(byte[], int)
method.- Throws:
IOException
org.eclipse.jgit.errors.ConfigInvalidException
-
parse
protected abstract List<T> parse(byte[] raw, int offset) throws IOException, org.eclipse.jgit.errors.ConfigInvalidException - Throws:
IOException
org.eclipse.jgit.errors.ConfigInvalidException
-
checkParsed
protected void checkParsed()
-