NPE in HgShowConfigCommand: result of HgCommandService.execute may be null. [Reviewed by Maxim Shafirov]

This commit is contained in:
Kirill Likhodedov
2010-12-07 18:45:37 +03:00
parent 500f060fd3
commit 4dc28abb5b
@@ -40,6 +40,10 @@ public class HgShowConfigCommand {
HgCommandResult result =
HgCommandService.getInstance(project).execute(repo, "showconfig", null);
if (result == null) {
return Collections.emptyMap();
}
Map<String, String> options = new HashMap<String, String>();
for (String line : result.getOutputLines()) {
String[] option = StringUtils.splitPreserveAllTokens(line, '=');