Merge branch 'stable-2.14'

* stable-2.14:
  InlineEdit: Fix comparison against edit revision

Change-Id: Ibaa9f554e310a1accf072f3b12a1b6691dfefcfa
This commit is contained in:
David Pursehouse 2017-08-02 07:51:27 +02:00
commit 960f3b7c00
2 changed files with 2 additions and 6 deletions

View File

@ -51,11 +51,7 @@ public class DiffObject {
return new DiffObject(true);
}
try {
return new DiffObject(new PatchSet.Id(changeId, Integer.parseInt(str)));
} catch (NumberFormatException e) {
return null;
}
return new DiffObject(Dispatcher.toPsId(changeId, str));
}
/** Create a DiffObject that represents the parent of a 1-parent patch set. */

View File

@ -466,7 +466,7 @@ public class Dispatcher {
}
}
private static PatchSet.Id toPsId(Change.Id id, String psIdStr) {
public static PatchSet.Id toPsId(Change.Id id, String psIdStr) {
return new PatchSet.Id(id, psIdStr.equals("edit") ? 0 : Integer.parseInt(psIdStr));
}