| commit | 5902c721a61cd73fe588f88b4a7c6d30b9bd4503 | [log] [tgz] |
|---|---|---|
| author | cpovirk <cpovirk@google.com> | Mon Dec 29 20:40:26 2025 |
| committer | Error Prone Team <error-prone-team+copybara@google.com> | Mon Dec 29 20:41:48 2025 |
| tree | 1a57159fa6553b2d50a6712772cdd42f4acfdb07 | |
| parent | c6b550e9abc52b6ac2729a34544cc5ed9cc33c62 [diff] |
Remove the backslashes that are suppressing a final newline in test data. They're harmless enough, but they're not accomplishing anything, either, and when I see a trailing backslash, I expect it to be serving some purpose. PiperOrigin-RevId: 850133461
Error Prone is a static analysis tool for Java that catches common programming mistakes at compile-time.
public class ShortSet { public static void main (String[] args) { Set<Short> s = new HashSet<>(); for (short i = 0; i < 100; i++) { s.add(i); s.remove(i - 1); } System.out.println(s.size()); } }
error: [CollectionIncompatibleType] Argument 'i - 1' should not be passed to this method;
its type int is not compatible with its collection's type argument Short
s.remove(i - 1);
^
(see https://errorprone.info/bugpattern/CollectionIncompatibleType)
1 error
Our documentation is at errorprone.info.
Error Prone works with Bazel, Maven, Ant, and Gradle. See our installation instructions for details.
Developing and building Error Prone is documented on the wiki.