(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()); } } $ bazel build :hello ERROR: example/myproject/BUILD:29:1: Java compilation in rule '//example/myproject:hello' ShortSet.java:6: 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 http://errorprone.info/bugpattern/CollectionIncompatibleType) 1 error
not be run; please add @Test annotation public void testExceptionMessage() { ^ (see http://errorprone.info/bugpattern/JUnit4TestNotRun) Did you mean '@Test'?
default charset, which can result in e.g. non-ASCII characters being silently replaced with '?' in many environments br = new BufferedReader(new InputStreamReader(in)); ^ (see http://errorprone.info/bugpattern/DefaultCharset) Did you mean 'br = new BufferedReader(new InputStreamReader(in, UTF_8));' or 'br = new BufferedReader(new InputStreamReader(in, Charset.defaultCharset()));'?
time and space performance obj.setId(new Short(idValue)); ^ (see http://errorprone.info/bugpattern/BoxedPrimitiveConstructor) Did you mean 'obj.setId(Short.valueOf(idValue));'?
expected @Override boolean contains(Object object); ^ (see http://errorprone.info/bugpattern/MissingOverride) Did you mean '@Override boolean contains(Object object);'?
add a `// fall through` comment if it was deliberate case ADD_ALL_OBJECTS: collection.addAll(Collections.singletonList(new AllJavaTypes())); break; ^ (see http://errorprone.info/bugpattern/FallThrough)
an exception masks bugs Realm.getInstance(configB); // Tries to open with key 2. ^ (see http://errorprone.info/bugpattern/MissingFail) Did you mean 'Realm.getInstance(configB);'?
.greaterThanOrEqualTo(AllTypes.FIELD_FLOAT, 50.234567f).findAll(); ^ (see http://errorprone.info/bugpattern/FloatingPointLiteralPrecision) Did you mean '.greaterThanOrEqualTo(AllTypes.FIELD_FLOAT, 50.234566f).findAll();'?