Replace 'indexOf()' expression with 'contains()'

Change-Id: Ida566a24d78174690b11d758c769b1d559b7fae9
This commit is contained in:
Matt Baker
2013-12-05 21:13:38 -07:00
parent 258f57aff5
commit c7dbfed9f0
5 changed files with 6 additions and 6 deletions

View File

@@ -53,7 +53,7 @@ public abstract class CherryPickDialog extends ActionDialog {
LinkedList<BranchSuggestion> suggestions =
new LinkedList<BranchSuggestion>();
for (final BranchInfo b : branches) {
if (b.ref().indexOf(request.getQuery()) >= 0) {
if (b.ref().contains(request.getQuery())) {
suggestions.add(new BranchSuggestion(b));
}
}

View File

@@ -76,7 +76,7 @@ public class MorphingTabPanel extends TabPanel {
public void setVisible(Widget w, boolean visible) {
if (visible) {
if (visibles.indexOf(w) == -1) {
if (!visibles.contains(w)) {
int origPos = widgets.indexOf(w);
/* Re-insert the widget right after the first visible widget found