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.Account;
|
||||||
import com.google.gerrit.reviewdb.client.RefNames;
|
import com.google.gerrit.reviewdb.client.RefNames;
|
||||||
import com.google.gerrit.server.git.DestinationList;
|
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.ValidationError;
|
||||||
import com.google.gerrit.server.git.VersionedMetaData;
|
import com.google.gerrit.server.git.VersionedMetaData;
|
||||||
|
|
||||||
@ -61,7 +62,7 @@ public class VersionedAccountDestinations extends VersionedMetaData {
|
|||||||
String path = p.path;
|
String path = p.path;
|
||||||
if (path.startsWith(prefix)) {
|
if (path.startsWith(prefix)) {
|
||||||
String label = path.substring(prefix.length());
|
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);
|
destinations.parseLabel(label, readUTF8(path), errors);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,12 +32,12 @@ public class TabFile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Parser TRIM = new Parser() {
|
public static Parser TRIM = new Parser() {
|
||||||
|
@Override
|
||||||
public String parse(String str) {
|
public String parse(String str) {
|
||||||
return str.trim();
|
return str.trim();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
protected static class Row {
|
protected static class Row {
|
||||||
public String left;
|
public String left;
|
||||||
public String right;
|
public String right;
|
||||||
@ -50,7 +50,7 @@ public class TabFile {
|
|||||||
|
|
||||||
protected static List<Row> parse(String text, String filename, Parser left,
|
protected static List<Row> parse(String text, String filename, Parser left,
|
||||||
Parser right, ValidationError.Sink errors) throws IOException {
|
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));
|
BufferedReader br = new BufferedReader(new StringReader(text));
|
||||||
String s;
|
String s;
|
||||||
for (int lineNumber = 1; (s = br.readLine()) != null; lineNumber++) {
|
for (int lineNumber = 1; (s = br.readLine()) != null; lineNumber++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user