Commit 7f395224 authored by Shimi Zhang's avatar Shimi Zhang Committed by Commit Bot

Fix error prone warnings

Since we switched to error prone to do static analysis, fixing warnings
introduced by my changes.

Bug: None
Change-Id: I9b4e2593f217b424658e344957f8f4aadff2d2cd
Reviewed-on: https://chromium-review.googlesource.com/777947Reviewed-by: default avatarBo <boliu@chromium.org>
Commit-Queue: Shimi Zhang <ctzsm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517882}
parent 078c1429
...@@ -108,10 +108,12 @@ public class SelectionIndicesConverter { ...@@ -108,10 +108,12 @@ public class SelectionIndicesConverter {
} }
if (end <= initialStartOffset) { if (end <= initialStartOffset) {
wordIndices[1] = -countWordsForward(end, initialStartOffset, breakIterator); wordIndices[1] =
-countWordsForward(/* start = */ end, initialStartOffset, breakIterator);
} else { } else {
// end > initialStartOffset // end > initialStartOffset
wordIndices[1] = countWordsBackward(end, initialStartOffset, breakIterator); wordIndices[1] =
countWordsBackward(/* start = */ end, initialStartOffset, breakIterator);
} }
return true; return true;
......
...@@ -55,7 +55,7 @@ public class SelectionPopupControllerTest { ...@@ -55,7 +55,7 @@ public class SelectionPopupControllerTest {
private static final String AMPHITHEATRE_FULL = "1600 Amphitheatre Parkway"; private static final String AMPHITHEATRE_FULL = "1600 Amphitheatre Parkway";
private static final String AMPHITHEATRE = "Amphitheatre"; private static final String AMPHITHEATRE = "Amphitheatre";
private class TestSelectionClient implements SelectionClient { private static class TestSelectionClient implements SelectionClient {
private SelectionClient.Result mResult; private SelectionClient.Result mResult;
private SelectionClient.ResultCallback mResultCallback; private SelectionClient.ResultCallback mResultCallback;
...@@ -94,7 +94,7 @@ public class SelectionPopupControllerTest { ...@@ -94,7 +94,7 @@ public class SelectionPopupControllerTest {
} }
} }
class SelectionClientOnlyReturnTrue extends TestSelectionClient { private static class SelectionClientOnlyReturnTrue extends TestSelectionClient {
@Override @Override
public boolean requestSelectionPopupUpdates(boolean shouldSuggest) { public boolean requestSelectionPopupUpdates(boolean shouldSuggest) {
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment