Snap for 14371165 from efe8015695a1b1f52203cd0d734c3bf2e93dff13 to 26Q2-release

Change-Id: I0ca142f08ebc9b776a33a7227209fac0e426f5c1
tree: abb07d1c990b7f313b8a08153edeb36e6d90e372
  1. .github/
  2. .idea/
  3. annotation/
  4. annotations/
  5. check_api/
  6. core/
  7. docgen/
  8. docgen_processor/
  9. docs/
  10. error_prone/
  11. examples/
  12. refaster/
  13. soong/
  14. test_helpers/
  15. type_annotations/
  16. util/
  17. .gitattributes
  18. .gitignore
  19. Android.bp
  20. appveyor.yml
  21. AUTHORS
  22. bnd.bnd
  23. CONTRIBUTING.md
  24. COPYING
  25. KEYS.txt
  26. LICENSE
  27. METADATA
  28. MODULE_LICENSE_APACHE2
  29. OWNERS
  30. pom.xml
  31. README.md
README.md

Error Prone

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

Getting Started

Our documentation is at errorprone.info.

Error Prone works with Bazel, Maven, Ant, and Gradle. See our installation instructions for details.

Developing Error Prone

Developing and building Error Prone is documented on the wiki.

Links