mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
GitLogRecord: shortBuffer is unnecessary since Java 7u6
GitOrigin-RevId: 161497515e65e21a3e508cbe644cc34de7142f60
This commit is contained in:
committed by
intellij-monorepo-bot
parent
25dc0f385c
commit
5115a4f13f
@@ -42,7 +42,7 @@ class GitLogRecord {
|
||||
LOG.error("Missing value for option " + key + ", while executing " + myHandler);
|
||||
return "";
|
||||
}
|
||||
return shortBuffer(value);
|
||||
return value;
|
||||
}
|
||||
|
||||
// trivial access methods
|
||||
@@ -164,21 +164,17 @@ class GitLogRecord {
|
||||
final String POINTER = " -> "; // HEAD -> refs/heads/master in Git 2.4.3+
|
||||
if (item.contains(POINTER)) {
|
||||
List<String> parts = StringUtil.split(item, POINTER);
|
||||
result.addAll(ContainerUtil.map(parts, s -> shortBuffer(s.trim())));
|
||||
result.addAll(ContainerUtil.map(parts, String::trim));
|
||||
}
|
||||
else {
|
||||
int colon = item.indexOf(':'); // tags have the "tag:" prefix.
|
||||
result.add(shortBuffer(colon > 0 ? item.substring(colon + 1).trim() : item));
|
||||
String raw = colon > 0 ? item.substring(colon + 1).trim() : item;
|
||||
result.add(raw);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static String shortBuffer(@NotNull String raw) {
|
||||
return new String(raw);
|
||||
}
|
||||
|
||||
/**
|
||||
* for debugging purposes - see {@link GitUtil#parseTimestampWithNFEReport(String, git4idea.commands.GitHandler, String)}.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user