Compare string objects with .equals method rather than ==
Change-Id: I6dfcd9e84e3d3519a34f27b2f24196359717b72e
This commit is contained in:
@@ -306,7 +306,7 @@ public class PublishCommentScreen extends AccountScreen implements
|
|||||||
|
|
||||||
if (lastState != null && patchSetId.equals(lastState.patchSetId)
|
if (lastState != null && patchSetId.equals(lastState.patchSetId)
|
||||||
&& lastState.approvals.containsKey(label.name())) {
|
&& lastState.approvals.containsKey(label.name())) {
|
||||||
b.setValue(lastState.approvals.get(label.name()) == value);
|
b.setValue(lastState.approvals.get(label.name()).equals(value));
|
||||||
} else {
|
} else {
|
||||||
b.setValue(b.parseValue() == (prior != null ? prior : 0));
|
b.setValue(b.parseValue() == (prior != null ? prior : 0));
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public abstract class Screen extends View {
|
|||||||
headerText.setText(text);
|
headerText.setText(text);
|
||||||
header.setVisible(true);
|
header.setVisible(true);
|
||||||
}
|
}
|
||||||
if (windowTitle == null || windowTitle == old) {
|
if (windowTitle == null || windowTitle.equals(old)) {
|
||||||
setWindowTitle(text);
|
setWindowTitle(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -96,7 +96,7 @@ public class Section {
|
|||||||
final boolean nullIfDefault) {
|
final boolean nullIfDefault) {
|
||||||
final String ov = get(name);
|
final String ov = get(name);
|
||||||
String nv = ui.readString(ov != null ? ov : dv, "%s", title);
|
String nv = ui.readString(ov != null ? ov : dv, "%s", title);
|
||||||
if (nullIfDefault && nv == dv) {
|
if (nullIfDefault && nv.equals(dv)) {
|
||||||
nv = null;
|
nv = null;
|
||||||
}
|
}
|
||||||
if (!eq(ov, nv)) {
|
if (!eq(ov, nv)) {
|
||||||
|
Reference in New Issue
Block a user