f2prateek / rx-preferences

Reactive SharedPreferences for Android
http://f2prateek.com/2015/10/05/rx-preferences/
Apache License 2.0
1.54k stars 132 forks source link

Fix usage of String.split #115

Closed f2prateek closed 6 years ago

f2prateek commented 6 years ago

The build currently fails with this error:

/Users/prateek/dev/src/github.com/f2prateek/rx-preferences/rx-preferences/src/test/java/com/f2prateek/rx/preferences2/PointPreferenceConverter.java:7: warning: [StringSplitter] String.split(String) has surprising behavior
    String[] parts = serialized.split(",");
                                     ^
    (see http://errorprone.info/bugpattern/StringSplitter)
  Did you mean 'String[] parts = serialized.split(",", -1);'?
error: warnings found and -Werror specified
1 error

This fixes the usage of String.split as recommended by http://errorprone.info/bugpattern/StringSplitter.

NightlyNexus commented 6 years ago

Whoops, I should pin the Error Prone version. That was my myopic change.