LocalComments: Use equals instead of == to compare String values

As reported by FindBugs:

  This code compares java.lang.String objects for reference equality
  using the == or != operators. Unless both strings are either
  constants in a source file, or have been interned using the
  String.intern() method, the same string value may be represented
  by two different String objects. Consider using the equals(Object)
  method instead.

Change-Id: Ifc54f7b3fb128284dad1b6b0d8278ecb69ed4c54
This commit is contained in:
David Pursehouse 2015-12-18 18:09:30 +09:00
parent bd765c74f8
commit 1f7cdcd8da
1 changed files with 1 additions and 1 deletions

View File

@ -182,7 +182,7 @@ public class LocalComments {
PatchSet.Id psId =
new PatchSet.Id(changeId, Integer.parseInt(elements[offset + 1]));
path = atob(elements[offset + 2]);
side = (Side.PARENT.toString() == elements[offset + 3]) ? Side.PARENT
side = (Side.PARENT.toString().equals(elements[offset + 3])) ? Side.PARENT
: Side.REVISION;
range = null;
if (elements[offset + 4].startsWith("R")) {