Replace 'indexOf()' expression with 'contains()'
Change-Id: Ida566a24d78174690b11d758c769b1d559b7fae9
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user