Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non handled "[StringSplitter] Prefer Splitter to String.split" code error #904

Closed
marcinwiacek opened this issue Jan 18, 2018 · 0 comments
Closed
Assignees

Comments

@marcinwiacek
Copy link

Please answer these questions before submitting your issue. Thanks!

What version of Error Prone are you using? 2.2.0

Does this issue reproduce with the latest release? haven't checked

What did you do? ninja -C . chrome_public_apk

If possible, provide a recipe for reproducing the error.
A complete small program is good.

return channelId.substring(ChannelDefinitions.CHANNEL_ID_PREFIX_SITES.length())
.split(CHANNEL_ID_SEPARATOR)[0];

What did you expect to see?

"[StringSplitter] Prefer Splitter to String.split" (http://errorprone.info/bugpattern/StringSplitter)

What did you see instead?

I don't see warning "[StringSplitter] Prefer Splitter to String.split" (http://errorprone.info/bugpattern/StringSplitter) because of "[0]"

ronshapiro pushed a commit that referenced this issue Jan 22, 2018
Fixes #904

RELNOTES: N/A

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182597392
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants