Merge changes Ifafc51bd,I5bec2ed4
* changes: TabFile: Fix Eclipse warnings and code style VersionedAccountDestinations: Access createLoggerSink statically
This commit is contained in:
commit
7539527136
@ -17,6 +17,7 @@ package com.google.gerrit.server.account;
|
||||
import com.google.gerrit.reviewdb.client.Account;
|
||||
import com.google.gerrit.reviewdb.client.RefNames;
|
||||
import com.google.gerrit.server.git.DestinationList;
|
||||
import com.google.gerrit.server.git.TabFile;
|
||||
import com.google.gerrit.server.git.ValidationError;
|
||||
import com.google.gerrit.server.git.VersionedMetaData;
|
||||
|
||||
@ -61,7 +62,7 @@ public class VersionedAccountDestinations extends VersionedMetaData {
|
||||
String path = p.path;
|
||||
if (path.startsWith(prefix)) {
|
||||
String label = path.substring(prefix.length());
|
||||
ValidationError.Sink errors = destinations.createLoggerSink(path, log);
|
||||
ValidationError.Sink errors = TabFile.createLoggerSink(path, log);
|
||||
destinations.parseLabel(label, readUTF8(path), errors);
|
||||
}
|
||||
}
|
||||
|
@ -32,11 +32,11 @@ public class TabFile {
|
||||
}
|
||||
|
||||
public static Parser TRIM = new Parser() {
|
||||
public String parse(String str) {
|
||||
return str.trim();
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public String parse(String str) {
|
||||
return str.trim();
|
||||
}
|
||||
};
|
||||
|
||||
protected static class Row {
|
||||
public String left;
|
||||
@ -50,7 +50,7 @@ public class TabFile {
|
||||
|
||||
protected static List<Row> parse(String text, String filename, Parser left,
|
||||
Parser right, ValidationError.Sink errors) throws IOException {
|
||||
List<Row> rows = new ArrayList<Row>();
|
||||
List<Row> rows = new ArrayList<>();
|
||||
BufferedReader br = new BufferedReader(new StringReader(text));
|
||||
String s;
|
||||
for (int lineNumber = 1; (s = br.readLine()) != null; lineNumber++) {
|
||||
|
Loading…
Reference in New Issue
Block a user