-
Notifications
You must be signed in to change notification settings - Fork 1
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
Upgrade to v2.27.0 #86
Commits on Oct 19, 2023
-
Add parens to avoid generating
!this == obj
.Obviously we could do even better by generating `this != obj`. But in practice, all the code that contains this check is buggy and needs to be more substantially rewritten. So our goal here is just to avoid generating invalid Java. (credit to emcmanus@ for catching this bug) PiperOrigin-RevId: 574798017
Configuration menu - View commit details
-
Copy full SHA for 31cc82f - Browse repository at this point
Copy the full SHA 31cc82fView commit details -
Improve OperatorPrecedence docs
google#4153 PiperOrigin-RevId: 574883084
Configuration menu - View commit details
-
Copy full SHA for 1b41065 - Browse repository at this point
Copy the full SHA 1b41065View commit details -
Extend
SuperEqualsIsObjectEquals
to coverhashCode
, renaming it t……o "`SuperCallToObjectMethod`." ...as suggested by @Marcono1234 in google#4147 (comment). Also, add docs. PiperOrigin-RevId: 574898389
Configuration menu - View commit details
-
Copy full SHA for fb06f25 - Browse repository at this point
Copy the full SHA fb06f25View commit details -
(pointed out [by @Stephan202](google#4155 (comment))) PiperOrigin-RevId: 575004527
Configuration menu - View commit details
-
Copy full SHA for 747227a - Browse repository at this point
Copy the full SHA 747227aView commit details
Commits on Oct 24, 2023
-
JUnit4TestNotRun: add a heuristic that if the name contains underscor…
…es, it's surely a test. Or a style violation, of course. PiperOrigin-RevId: 576120741
Configuration menu - View commit details
-
Copy full SHA for 661a915 - Browse repository at this point
Copy the full SHA 661a915View commit details
Commits on Oct 25, 2023
-
Update Checker Framework dataflow and dependencies
I'm taking over from copybara and merging this into one CL, since there were some breaking changes. PiperOrigin-RevId: 576589485
Configuration menu - View commit details
-
Copy full SHA for c57fd56 - Browse repository at this point
Copy the full SHA c57fd56View commit details
Commits on Oct 26, 2023
-
Add more Guava types to ModifiedButNotUsed.
PiperOrigin-RevId: 576849175
Configuration menu - View commit details
-
Copy full SHA for bc4b01b - Browse repository at this point
Copy the full SHA bc4b01bView commit details -
Drop the period from the MemberName diagnostic, given we're concatena…
…ting something onto it in some paths. PiperOrigin-RevId: 576864540
Configuration menu - View commit details
-
Copy full SHA for 5152f11 - Browse repository at this point
Copy the full SHA 5152f11View commit details
Commits on Oct 30, 2023
-
Typo fixed in ClosingStandardOutputStreams.md
**A typo has been fixed.** Fixes google#4166 COPYBARA_INTEGRATE_REVIEW=google#4166 from khalid586:master 010e48a PiperOrigin-RevId: 577858113
Configuration menu - View commit details
-
Copy full SHA for 1991070 - Browse repository at this point
Copy the full SHA 1991070View commit details
Commits on Nov 1, 2023
-
PUBLIC: Add a test demonstrating b/308614050 (bug with parameter cast…
…ing). PiperOrigin-RevId: 578507433
Configuration menu - View commit details
-
Copy full SHA for a63bf9f - Browse repository at this point
Copy the full SHA a63bf9fView commit details
Commits on Nov 2, 2023
-
UnnecessaryBoxedAssignment: avoid CCE on method reference
Fixes google#4157 COPYBARA_INTEGRATE_REVIEW=google#4157 from PicnicSupermarket:sschroevers/avoid-CCE-in-UnnecessaryBoxedAssignment 73dc358 PiperOrigin-RevId: 578808258
Configuration menu - View commit details
-
Copy full SHA for bd43f40 - Browse repository at this point
Copy the full SHA bd43f40View commit details -
ASTHelpersSuggestions: don't suggest ASTHelpers inside ASTHelpers
PiperOrigin-RevId: 578989135
Configuration menu - View commit details
-
Copy full SHA for c83ba54 - Browse repository at this point
Copy the full SHA c83ba54View commit details
Commits on Nov 3, 2023
-
Include some more attractive-nuisance runners in TestParametersNotIni…
…tialized. We can't only include TestParameterInjector, because other frameworks are adopting its annotation for injecting parameters. But these are other parameterising frameworks you _might_ guess would work with @TestParameter, but don't. PiperOrigin-RevId: 579143309
Configuration menu - View commit details
-
Copy full SHA for 09a9aa6 - Browse repository at this point
Copy the full SHA 09a9aa6View commit details -
Update
NullnessAnnotation
s API to use annotation mirrors and trees ……instead of strings PiperOrigin-RevId: 579319948
Configuration menu - View commit details
-
Copy full SHA for 99bfc0b - Browse repository at this point
Copy the full SHA 99bfc0bView commit details
Commits on Nov 4, 2023
-
Handle annotations on inner types in `MoreAnnotations.getDeclarationA…
…ndTypeAttributes` PiperOrigin-RevId: 579345191
Configuration menu - View commit details
-
Copy full SHA for 5123cd5 - Browse repository at this point
Copy the full SHA 5123cd5View commit details
Commits on Nov 6, 2023
-
No-op tidying of TruthSelfEquals before I start altering it.
PiperOrigin-RevId: 579780936
Configuration menu - View commit details
-
Copy full SHA for 93770e3 - Browse repository at this point
Copy the full SHA 93770e3View commit details
Commits on Nov 7, 2023
-
Remove an unnecessary suppression
Follow-up to google@c83ba54 PiperOrigin-RevId: 580124237
Configuration menu - View commit details
-
Copy full SHA for af227ac - Browse repository at this point
Copy the full SHA af227acView commit details -
Improve AnnotationPosition diagnostics to only mention the annotation…
…s that are being moved PiperOrigin-RevId: 580185539
Configuration menu - View commit details
-
Copy full SHA for 0149a77 - Browse repository at this point
Copy the full SHA 0149a77View commit details -
Discourage all nullness annotations in
NullablePrimitive
and `Nulla……blePrimitiveArray`, not just `@Nullable` PiperOrigin-RevId: 580206745
Configuration menu - View commit details
-
Copy full SHA for 18d5cdf - Browse repository at this point
Copy the full SHA 18d5cdfView commit details -
Use
SuppressibleTreePathScanner
instead of rolling our own.This is already covered by tests, such as `negativeCases_suppressionForMethodTreeBased()`. (`SuppressibleTreePathScanner` might actually correct some edge cases somewhere, even.) PiperOrigin-RevId: 580260707
Configuration menu - View commit details
-
Copy full SHA for 46122d1 - Browse repository at this point
Copy the full SHA 46122d1View commit details -
Discourage nullness annotations on wildcards and type parameters them…
…selves PiperOrigin-RevId: 580288274
Configuration menu - View commit details
-
Copy full SHA for 29f4602 - Browse repository at this point
Copy the full SHA 29f4602View commit details -
Discourage multiple nullness annotations
PiperOrigin-RevId: 580315454
Configuration menu - View commit details
-
Copy full SHA for dfba048 - Browse repository at this point
Copy the full SHA dfba048View commit details
Commits on Nov 8, 2023
-
Loosen the restrictions in TruthSelfEquals to allow anything called `…
…assertThat`, not just the Truth ones. That way, we catch `ProtoTruth` too. PiperOrigin-RevId: 580504931
Configuration menu - View commit details
-
Copy full SHA for 962f5d1 - Browse repository at this point
Copy the full SHA 962f5d1View commit details -
Handle
containsExactlyElementsIn
, etc in TruthSelfEquals.Flume: unknown commit PiperOrigin-RevId: 580526558
Configuration menu - View commit details
-
Copy full SHA for 6eaf51d - Browse repository at this point
Copy the full SHA 6eaf51dView commit details -
Fix
BugChecker.isSuppressed
to actually look only at the current tree.And warn about a similar pitfall in the already deprecated `ASTHelpers.getAnnotation`. And add some tests, which show that we already had this right for `SuppressibleTreePathScanner` and for the automatic `BugChecker` behavior (from unknown commit), just not for manual `isSuppressed` calls. Add a couple TODOs about: - the kinds of trees on which suppressions are valid - whether the non-deprecated `BugChecker.isSuppressed(Symbol, VisitorState)` might be a footgun. Compare: - https://github.com/google/error-prone/blob/18d5cdf10ec1cc798a588d5c48a9e02a8888c6a1/check_api/src/main/java/com/google/errorprone/scanner/Scanner.java#L91 - https://github.com/google/error-prone/blob/18d5cdf10ec1cc798a588d5c48a9e02a8888c6a1/core/src/main/java/com/google/errorprone/refaster/RefasterSuppressionHelper.java#L43 PiperOrigin-RevId: 580619965
Configuration menu - View commit details
-
Copy full SHA for 5ce8792 - Browse repository at this point
Copy the full SHA 5ce8792View commit details
Commits on Nov 9, 2023
-
Move the AlmostJavadoc finding to point at the Javadoc.
PiperOrigin-RevId: 580878430
Configuration menu - View commit details
-
Copy full SHA for 492b882 - Browse repository at this point
Copy the full SHA 492b882View commit details
Commits on Nov 10, 2023
-
Prefer the Immutable graph types over the interfaces.
PiperOrigin-RevId: 581190037
Configuration menu - View commit details
-
Copy full SHA for 5854742 - Browse repository at this point
Copy the full SHA 5854742View commit details -
Complain about
@param foo: blah
.The colon winds up appearing in the generated docs in the summary. PiperOrigin-RevId: 581238725
Configuration menu - View commit details
-
Copy full SHA for 58aa646 - Browse repository at this point
Copy the full SHA 58aa646View commit details
Commits on Nov 13, 2023
-
Introduce ConstantExpressions to TruthSelfEquals, which lets us catch…
… stuff like `assertThat(fooProto.getField()).isEqualTo(fooProto.getField());` But avoids massively over-matching on expressions which _aren't_ known to be pure. Flume: unknown commit PiperOrigin-RevId: 581934324
Configuration menu - View commit details
-
Copy full SHA for 67b339b - Browse repository at this point
Copy the full SHA 67b339bView commit details
Commits on Nov 14, 2023
-
Correct my claims about Kotlin's handling of annotations on wildcards.
I did some testing and some digging in the Kotlin issue tracker ([1](https://youtrack.jetbrains.com/issue/KT-40498/Nullability-annotations-on-Java-wildcard-itself), [2](https://youtrack.jetbrains.com/issue/KT-53836/In-type-parameter-declarations-recognize-JSpecify-annotations-only-on-bounds#focus=Comments-27-6427080.0-0)), and everything I found suggests that Kotlin ignores annotations on wildcards entirely. This actually provides an even better case for the NullableWildcard check. PiperOrigin-RevId: 582331851
Configuration menu - View commit details
-
Copy full SHA for 5c5d9ab - Browse repository at this point
Copy the full SHA 5c5d9abView commit details
Commits on Nov 16, 2023
-
Remove the EqualsTester fix from TruthSelfEquals.
I think the suggestion to use EqualsTester is great (so belongs in a description), but the fix is almost always bad, for two reasons: 1) It's often just _wrong_; lots of these are bugs, not equals testing 2) Even when it's right, it's very incomplete. You'd want to factor some of the unequal cases into equality groups and go from there. PiperOrigin-RevId: 583047109
Configuration menu - View commit details
-
Copy full SHA for 0b70afc - Browse repository at this point
Copy the full SHA 0b70afcView commit details -
Update
ASTHelpers.hasDirectAnnotationWithSimpleName
to handle `TYPE……_USE` annotations on field types and method return types This allows `ProvidesNull` to handle `TYPE_USE` `@Nullable` annotations. Startblock: unknown commit is submitted PiperOrigin-RevId: 583055698
Configuration menu - View commit details
-
Copy full SHA for aa6e3e7 - Browse repository at this point
Copy the full SHA aa6e3e7View commit details
Commits on Nov 17, 2023
-
- https://errorprone.info/bugpattern/NullableWildcard - https://errorprone.info/bugpattern/NullableTypeParameter - https://errorprone.info/bugpattern/ExtendsObject (The actual parenthetical in the title is fine; the problem is under "The problem.') PiperOrigin-RevId: 583397840
Configuration menu - View commit details
-
Copy full SHA for 7684e85 - Browse repository at this point
Copy the full SHA 7684e85View commit details
Commits on Nov 20, 2023
-
Remove the underscore heuristic flag.
PiperOrigin-RevId: 583995107
Configuration menu - View commit details
-
Copy full SHA for b0b0b67 - Browse repository at this point
Copy the full SHA b0b0b67View commit details -
TruthSelfEquals: handle junit assertions
PiperOrigin-RevId: 584063431
Configuration menu - View commit details
-
Copy full SHA for 6a23848 - Browse repository at this point
Copy the full SHA 6a23848View commit details
Commits on Nov 21, 2023
-
UnusedVariable: flag parameters in _effectively_ private methods, not…
… just private methods. PiperOrigin-RevId: 584277317
Configuration menu - View commit details
-
Copy full SHA for 88a224c - Browse repository at this point
Copy the full SHA 88a224cView commit details
Commits on Nov 23, 2023
-
Rip out the
ThreadSafeChecker:CheckElementUsage
flag.Which is now enabled. PiperOrigin-RevId: 584850701
Configuration menu - View commit details
-
Copy full SHA for 83d2ed5 - Browse repository at this point
Copy the full SHA 83d2ed5View commit details
Commits on Nov 24, 2023
-
Don't peer at the identifiers on the LHS of assignments in AlreadyChe…
…cked. You need really weird circumstances to trigger this. Note the `if (false)` in the test, which renders `a` effectively final despite it having an assignment. PiperOrigin-RevId: 585087842
Configuration menu - View commit details
-
Copy full SHA for 5395af4 - Browse repository at this point
Copy the full SHA 5395af4View commit details
Commits on Nov 27, 2023
-
PiperOrigin-RevId: 585729692
Configuration menu - View commit details
-
Copy full SHA for 7acf133 - Browse repository at this point
Copy the full SHA 7acf133View commit details
Commits on Dec 4, 2023
-
Check specific functional interface types (which would otherwise be u…
…nchecked) for parameter usage. PiperOrigin-RevId: 587714550
Configuration menu - View commit details
-
Copy full SHA for 4be12bc - Browse repository at this point
Copy the full SHA 4be12bcView commit details
Commits on Dec 5, 2023
-
Fix a typo in the "Finally" bugpattern docs.
PiperOrigin-RevId: 587898768
Configuration menu - View commit details
-
Copy full SHA for e5df30c - Browse repository at this point
Copy the full SHA e5df30cView commit details
Commits on Dec 7, 2023
-
Import eisop/checker-framework from GitHub.
#MIGRATION_3P_JAVA_SRC_CHECKER_FRAMEWORK_DATAFLOW__DEFAULT_SERVICE - c9b1e103fbe5ea1a3fc5d8e52a16c9982ed0bc76 Prep for next release by Werner Dietl <wdietl@gmail.com> - 4f53c5bf42e357682104fd3cbf4878457d1d0e0d Extract version variable and update version (google#630) by Werner Dietl <wdietl@gmail.com> - 3c4dad383006e706dc102d4d835298e1e1e12114 Do not use `thisValue` when it is the NullType (google#636) by Werner Dietl <wdietl@gmail.com> - d7f9dabf1240e40484ce2b3c1c6e9feecaabe29c Generalize improvement of initialization type frames (google#642) by Florian Lanzinger <lanzinger@kit.edu> - a7b753565fe9843d5e5f1ade6564bab68fa266e9 Update dependency commons-io:commons-io to v2.15.1 (google#643) by renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> - 3ed0c114c3d686eadc803207640487e86d1d086e Update dependency gradle to v8.5 (google#644) by renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> - 5c59bff87210b78a7fc7f8cd7b7372d2d7e60981 Update dependency com.amazonaws:aws-java-sdk-bom to v1.12... by renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> - 2170fdab53832a3b9016f200a78189c76298f87e Update dependency com.diffplug.spotless:spotless-plugin-g... by renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> - 8eb212555daec5323fd1f1af786092cbbbeef8a0 Update dependency io.github.classgraph:classgraph to v4.8... by renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> - 4c08ea3751b40620d20eb05ca85ead9a42f500f9 Update dependency org.checkerframework:stubparser to v3.2... by renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> - 2dee1c3763640e4bec88bc0b8a11a9f6bad1a5ea Warn about redundant null cases in switch statements and ... by Aosen Xiong <82676488+Ao-senXiong@users.noreply.github.com> - 780fef9e0225761ba44000091a2f024a6ffbdecb typetools/checker-framework 3.41.0 release (google#650) by Werner Dietl <wdietl@gmail.com> - 9c804e41ed0f506713ac50224d2a63f2d2568dc2 Consistently spell it `JUnit` by Werner Dietl <wdietl@gmail.com> - 9ad831a2432ad5cbf6bb1a99dff4121f4a6dc4e3 Add missing import to stub file by Werner Dietl <wdietl@gmail.com> - 28f6b0fc670596c5943ca93e01b480429ef0a907 Remove warnings about junit-assertions.astub that do not ... by Werner Dietl <wdietl@gmail.com> - a4c50adad5e36bc746cfabddba41b5f661da54d5 Formatting tweak by Werner Dietl <wdietl@gmail.com> - 66bb90d7431427ed39f67d7a9899f93d430220c1 Make error keys consistent by Werner Dietl <wdietl@gmail.com> - 6be13eba81909bedc263c6b1a9d4c3583af556b7 Simplify code, suppress Optional Checker FP, code consist... by Werner Dietl <wdietl@gmail.com> - 011fbb759104d1277700a9e7893f435af00a5f90 Code comment formatting by Werner Dietl <wdietl@gmail.com> - 5b60183f3d3934dcb205adfb77c729399687c9bc Fix formatting by Werner Dietl <wdietl@gmail.com> - 13f7887e1941d0b6b18a9a9c85088e42fbb56c13 Fix error keys and warning texts by Werner Dietl <wdietl@gmail.com> - 084ca4b52ab4d067a93ae32ea04c892ec36bf72a Fix terminology and use EISOP website by Werner Dietl <wdietl@gmail.com> - f62005ea47ffe9bae7561d51ed9a0a2bed4f89c0 Skip try-with-resources test on Java 8 by Werner Dietl <wdietl@gmail.com> - 97af13821ff7ed86c6b5f3740799a28d2a054608 Add a note by Werner Dietl <wdietl@gmail.com> - c2df6d6cc48878b92970c568e5388ddafa60b60f Prep for release by Werner Dietl <wdietl@gmail.com> - c08538fbc8e167a931cbe405614b52663a8e67be new release 3.41.0-eisop1 by Werner Dietl <wdietl@gmail.com> PiperOrigin-RevId: 588812139
Configuration menu - View commit details
-
Copy full SHA for 336323a - Browse repository at this point
Copy the full SHA 336323aView commit details
Commits on Dec 8, 2023
-
AutoValueFinalMethods: support method-level suppression.
And streamify the implementation a bit. PiperOrigin-RevId: 589088083
Configuration menu - View commit details
-
Copy full SHA for ac52ca9 - Browse repository at this point
Copy the full SHA ac52ca9View commit details -
WellKnownThreadSafety: Add common PKIX types to known thread-safe list.
PiperOrigin-RevId: 589128835
Configuration menu - View commit details
-
Copy full SHA for aadfdc3 - Browse repository at this point
Copy the full SHA aadfdc3View commit details
Commits on Dec 14, 2023
-
Don't report NonFinalStaticField findings for fields modified in `@Be…
…foreClass` methods PiperOrigin-RevId: 590890283
Configuration menu - View commit details
-
Copy full SHA for d78dd6d - Browse repository at this point
Copy the full SHA d78dd6dView commit details -
Do not flag unused parameters on _abstract_ methods.
I think this was introduced in google@88a224c, where we suddenly start considering some _effectively_ private abstract methods. PiperOrigin-RevId: 590895990
Configuration menu - View commit details
-
Copy full SHA for affa37a - Browse repository at this point
Copy the full SHA affa37aView commit details -
Descend into VariableTrees when looking for variables to check.
I think this `return null`'d on the assumption that a `VariableTree` can't contain more variables to check... but of course it can, with anonymous classes etc. PiperOrigin-RevId: 590929955
Configuration menu - View commit details
-
Copy full SHA for da7be27 - Browse repository at this point
Copy the full SHA da7be27View commit details
Commits on Dec 15, 2023
-
Handle Joiner.on(...) in AbstractToString.
Not yet handling the Iterable overload; that's a bit more involved given the lack of prior art. PiperOrigin-RevId: 591205788
Configuration menu - View commit details
-
Copy full SHA for 654d1db - Browse repository at this point
Copy the full SHA 654d1dbView commit details -
Automated rollback of commit 654d1db.
*** Reason for rollback *** That did not handle varargs well: specifically array arguments in a varargs position. I'll fix and roll forward. *** Original change description *** Handle Joiner.on(...) in AbstractToString. Not yet handling the Iterable overload; that's a bit more involved given the lack of prior art. *** PiperOrigin-RevId: 591308763
Configuration menu - View commit details
-
Copy full SHA for d272dfa - Browse repository at this point
Copy the full SHA d272dfaView commit details
Commits on Dec 18, 2023
-
Document that javadoc shouldn't appear between annotations and the do…
…cumented element PiperOrigin-RevId: 591893421
Configuration menu - View commit details
-
Copy full SHA for 21c190a - Browse repository at this point
Copy the full SHA 21c190aView commit details
Commits on Dec 28, 2023
-
Actually test that
hasExtraParameterForEnclosingInstance
works.It does, but I got confused in google#4225. PiperOrigin-RevId: 594123682
Configuration menu - View commit details
-
Copy full SHA for 5fa727a - Browse repository at this point
Copy the full SHA 5fa727aView commit details
Commits on Dec 29, 2023
-
Update
CanIgnoreReturnValueSuggester
summary.PiperOrigin-RevId: 594339474
Configuration menu - View commit details
-
Copy full SHA for 63cf192 - Browse repository at this point
Copy the full SHA 63cf192View commit details
Commits on Jan 2, 2024
-
Reflow a comment that didn't appreciate being formatted in unknown co…
…mmit PiperOrigin-RevId: 595108607
Configuration menu - View commit details
-
Copy full SHA for fd21bc9 - Browse repository at this point
Copy the full SHA fd21bc9View commit details
Commits on Jan 3, 2024
-
Update a few checks (and a class of tests, with AbstractToString) to …
…handle #formatted. There are some ERROR-level checks under AbstractToString, but I think #formatted can't be used in the depot yet? PiperOrigin-RevId: 595389167
Configuration menu - View commit details
-
Copy full SHA for 58a9e80 - Browse repository at this point
Copy the full SHA 58a9e80View commit details -
Add an assertion to try to help debug google#4225
PiperOrigin-RevId: 595414757
Configuration menu - View commit details
-
Copy full SHA for 2bd7859 - Browse repository at this point
Copy the full SHA 2bd7859View commit details -
Add a tests for Dagger
Component.Builder
s and `Subcomponent.Builder……`s to `CanIgnoreReturnValueSuggesterTest`. #checkreturnvalue PiperOrigin-RevId: 595426409
Configuration menu - View commit details
-
Copy full SHA for 4ef5e53 - Browse repository at this point
Copy the full SHA 4ef5e53View commit details -
Don't fire
CanIgnoreReturnValueSuggester
on Dagger `@Component.Buil……der` or `@Subcomponent.Builder` methods (they will soon be treated as implicitly ignorable via a custom rule). #checkreturnvalue PiperOrigin-RevId: 595454660
Configuration menu - View commit details
-
Copy full SHA for 25b8dc2 - Browse repository at this point
Copy the full SHA 25b8dc2View commit details -
Treat Dagger
@Component.Builder
and@Subcomponent.Builder
setter ……methods as ignorable. #checkreturnvalue PiperOrigin-RevId: 595505398
Configuration menu - View commit details
-
Copy full SHA for cb1dc06 - Browse repository at this point
Copy the full SHA cb1dc06View commit details
Commits on Jan 4, 2024
-
Improve fixes for
StatementSwitchToExpressionSwitch
If a case contains a single block statement, skip past the braces of the block statement. Enables fixes like: ``` case 0 -> System.out.println("0"); ``` Instead of: ``` case 0 -> { { System.out.println("0"); break; } } ``` Fixes google#4222 PiperOrigin-RevId: 595703319
Configuration menu - View commit details
-
Copy full SHA for d7de122 - Browse repository at this point
Copy the full SHA d7de122View commit details -
PiperOrigin-RevId: 595809096
Configuration menu - View commit details
-
Copy full SHA for 34141a8 - Browse repository at this point
Copy the full SHA 34141a8View commit details
Commits on Jan 5, 2024
-
Fixes google#4242 PiperOrigin-RevId: 595991339
Configuration menu - View commit details
-
Copy full SHA for db3e9ad - Browse repository at this point
Copy the full SHA db3e9adView commit details -
Prompted by google#4242 (`mvn org.codehaus.mojo:versions-maven-plugin:2.16.2:{update-properties,use-latest-releases} -DgenerateBackupPoms=false -f third_party/java_src/error_prone/project/pom.xml -Dexcludes=org.hamcrest:hamcrest-core,org.hamcrest:hamcrest-library,com.google.inject.extensions:guice-assistedinject,com.google.inject.extensions:guice-servlet,com.google.inject.extensions:guice-testlib`. Without the exclusions, I got test errors. The Hamcrest ones might be related to API changes? The Guice ones might be related to getting out of sync with `guice.version`, which the `mvn` command does not update?) PiperOrigin-RevId: 596010863
Configuration menu - View commit details
-
Copy full SHA for 654b1d9 - Browse repository at this point
Copy the full SHA 654b1d9View commit details
Commits on Jan 8, 2024
-
Introduce JUnitIncompatibleType, a JUnit analogue of TruthIncompatibl…
…eType PiperOrigin-RevId: 596602361
Configuration menu - View commit details
-
Copy full SHA for 43e3bd1 - Browse repository at this point
Copy the full SHA 43e3bd1View commit details
Commits on Jan 11, 2024
-
Don't fire CanIgnoreReturnValueSuggester on overrides in anonymous me…
…thods. PiperOrigin-RevId: 597548436
Configuration menu - View commit details
-
Copy full SHA for 817b442 - Browse repository at this point
Copy the full SHA 817b442View commit details -
Remove incorrect statement from BugPattern index doc
google#4248 Fixes google#4249 COPYBARA_INTEGRATE_REVIEW=google#4249 from elkkhan:doc-remove-bugpattern-examples-statement 8c7cf54 PiperOrigin-RevId: 597571000
Configuration menu - View commit details
-
Copy full SHA for 5a68588 - Browse repository at this point
Copy the full SHA 5a68588View commit details
Commits on Jan 12, 2024
-
Add support for specifying badEnclosingTypes for
BadImport
via flagsFollowing the discussions in google#2236, this PR introduces the `BadImport:BadEnclosingTypes` flag to disallow nested types of specified enclosing type. This PR also takes the flag into account in `UnnecessarilyFullyQualified` to suggest importing `EnclosingType.NestedType` when possible. For instance, when `-XepOpt:BadImport:BadEnclosingTypes=org.immutables.value.Value` is set, it would suggest the following: ```java final class Test { @org.immutables.value.Value.Immutable abstract class AbstractType {} } ``` -> ```java final class Test { @Value.Immutable abstract class AbstractType {} } ``` Also, it won't require suppressing `UnnecessarilyFullyQualified` in the example in google#2236. ```java import org.springframework.beans.factory.annotation.Value; final class Test { Demo(@value("some.property") String property) {} @org.immutables.value.Value.Immutable abstract class AbstractType {} } ``` Closes google#2236. Fixes google#4228 COPYBARA_INTEGRATE_REVIEW=google#4228 from hisener:halil.sener/bad-import-bad-enclosing-types 67aa36d PiperOrigin-RevId: 597798125
Configuration menu - View commit details
-
Copy full SHA for bd0ba3f - Browse repository at this point
Copy the full SHA bd0ba3fView commit details
Commits on Jan 17, 2024
-
Generalise ProtoRedundantSet to handle autovalues too.
PiperOrigin-RevId: 599119407
Configuration menu - View commit details
-
Copy full SHA for 2cbed19 - Browse repository at this point
Copy the full SHA 2cbed19View commit details
Commits on Jan 22, 2024
-
Do not report
NonFinalStaticField
findings for fields modified in `……@BeforeAll` methods Analogous to google#4215. Resolves google#4239. Fixes google#4251 COPYBARA_INTEGRATE_REVIEW=google#4251 from DataDog:halil.sener/4239-non-final-static-field-junit-5-before-all 8a109a8 PiperOrigin-RevId: 600484897
Configuration menu - View commit details
-
Copy full SHA for 4165ecd - Browse repository at this point
Copy the full SHA 4165ecdView commit details
Commits on Jan 25, 2024
-
Work around a javac end position bug for empty statements
See https://bugs.openjdk.org/browse/JDK-8324736 Fixes google#4245 PiperOrigin-RevId: 601554857
Configuration menu - View commit details
-
Copy full SHA for 0be7a89 - Browse repository at this point
Copy the full SHA 0be7a89View commit details
Commits on Jan 26, 2024
-
Resolve a couple of lingering @ResultIgnorabilityUnspecified in EP.
PiperOrigin-RevId: 601751926
Configuration menu - View commit details
-
Copy full SHA for 417b935 - Browse repository at this point
Copy the full SHA 417b935View commit details -
Fix a crash in
UnnecessaryStringBuilder
Fixes external google#4195 PiperOrigin-RevId: 601777043
Configuration menu - View commit details
-
Copy full SHA for 7d1ae83 - Browse repository at this point
Copy the full SHA 7d1ae83View commit details -
Optionally recommend against static import of
Truth8.assertThat
.The methods there will be moving into the main `Truth` class. Users will have various options for how to migrate, but one option involves avoiding static imports. We will provide more instructions as part of our Truth releases. (See, e.g., [the release notes for Truth 1.3.0](https://github.com/google/truth/releases/tag/v1.3.0).) Rough outline of the option that involves avoiding static imports: - The problem with adding `Truth8.assertThat(OptionalInt)` (or a similar overload) to `Truth` is that anyone who static imports both `Truth.assertThat` and `Truth8.assertThat` will see ambiguity errors if they use that method. - The solution is to stop using static import for `Truth8.assertThat`. Once all its static imports are gone, we can add the new methods to `Truth` without breaking anyone, and then we can migrate users. - Avoiding static import for `Truth8.assertThat` would be tough to swallow for the most common types, `Stream` and `Optional`. Luckily, I found an alternative approach that works for those, as discussed in the linked release notes. (That approach works for those types because they're generic types.) PiperOrigin-RevId: 601863378
Configuration menu - View commit details
-
Copy full SHA for 6a75fc1 - Browse repository at this point
Copy the full SHA 6a75fc1View commit details
Commits on Jan 27, 2024
-
Add more documentation for LenientFormatStringValidation
PiperOrigin-RevId: 601904095
Configuration menu - View commit details
-
Copy full SHA for ec9d69a - Browse repository at this point
Copy the full SHA ec9d69aView commit details
Commits on Jan 29, 2024
-
Exempt methods annotated with @StartBundle or @FinishBundle since the…
…y are called reflectively by the Apache Beam framework. https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/transforms/DoFn.html PiperOrigin-RevId: 602412808
Configuration menu - View commit details
-
Copy full SHA for 95e66ac - Browse repository at this point
Copy the full SHA 95e66acView commit details
Commits on Jan 30, 2024
-
https://github.com/google/truth/releases/tag/v1.3.0 PiperOrigin-RevId: 602804747
Configuration menu - View commit details
-
Copy full SHA for f5df283 - Browse repository at this point
Copy the full SHA f5df283View commit details -
PiperOrigin-RevId: 602812366
Configuration menu - View commit details
-
Copy full SHA for e45f6b7 - Browse repository at this point
Copy the full SHA e45f6b7View commit details -
PiperOrigin-RevId: 602812834
Configuration menu - View commit details
-
Copy full SHA for e6e2706 - Browse repository at this point
Copy the full SHA e6e2706View commit details
Commits on Jan 31, 2024
-
Migrate usages of
Truth8.assertThat
to equivalent usages of `Truth.……assertThat`. The `Truth8` methods will be hidden in the future. All callers will use `Truth`. To make that migration possible, upgrade Truth to 1.3.0. (progress toward google/truth#746) PiperOrigin-RevId: 603108718
Configuration menu - View commit details
-
Copy full SHA for 4eb812d - Browse repository at this point
Copy the full SHA 4eb812dView commit details
Commits on Feb 1, 2024
-
Add some known thread safe types to[]
Tested: TAP for global presubmit queue [] PiperOrigin-RevId: 603189890
Configuration menu - View commit details
-
Copy full SHA for d7cc8bb - Browse repository at this point
Copy the full SHA d7cc8bbView commit details -
Return the "real"
Symbol
instead of sometimes aSymbol
whose `own……er` is a subclass. We accomplish this by calling `baseSymbol()` on the initial `Symbol`. (We likely should do this in more places in Error Prone, including the location in `ASTHelpers.getSymbol` that I've flagged and perhaps anywhere else that we directly access `tree.sym`.) Thanks to @msridhar for links to relevant JDK discussions, notably [JDK-8293890](https://bugs.openjdk.org/browse/JDK-8293890). Effects: - This change definitely helps with [static imports](uber/NullAway#764), as demonstrated in a new test in `ParameterNameTest`, which fails before this change. (I didn't actually look into why the test fails before. Maybe the "fake" `Symbol` lacks the parameter names of the original?) - I didn't check whether it helps with [`someSerializable.equals`](uber/NullAway#897). It seems likely to, but _shrug_ for now. - I had expected this to help with the `TestCase.fail` handling in `ReturnMissingNullable`, but it turns out that I'm wrong on multiple levels. I updated its comments and tests accordingly: - `TestCase.fail` _does_ exist as a declared method nowadays; it's not merely inherited from `Assert`. I must have been looking at [quite an old version](junit-team/junit4@dde798f#diff-f9834c0e0ef1d54e1757e221b7b4248c2ba8e0de41d2f0fadac5927b906edd85R226). - The problem there comes not from the need for `ASTHelpers.getSymbol` to use `baseSymbol()` but instead for the need for `MethodMatchState.ownerType` to look at the actual `owner` instead of the type of the receiver tree. (If it started to do that, it would then benefit from this change to produce the correct `owner`.) I added a link to the appropriate bug there. PiperOrigin-RevId: 603374262
Configuration menu - View commit details
-
Copy full SHA for e5a6d0d - Browse repository at this point
Copy the full SHA e5a6d0dView commit details
Commits on Feb 3, 2024
-
Remove references to
-XepOpt:Android:Java8Libs
PiperOrigin-RevId: 603821511
Configuration menu - View commit details
-
Copy full SHA for 20562d0 - Browse repository at this point
Copy the full SHA 20562d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41fbd95 - Browse repository at this point
Copy the full SHA 41fbd95View commit details
Commits on Feb 5, 2024
-
Update Truth to [1.4.0](https://github.com/google/truth/releases/tag/…
…v1.4.0). PiperOrigin-RevId: 604375179
Configuration menu - View commit details
-
Copy full SHA for a36ed6f - Browse repository at this point
Copy the full SHA a36ed6fView commit details -
Add another AndroidJdkLibsChecker regression test
PiperOrigin-RevId: 604449600
Configuration menu - View commit details
-
Copy full SHA for 618d488 - Browse repository at this point
Copy the full SHA 618d488View commit details
Commits on Feb 6, 2024
-
This PR fixes a few typos I spotted in the documentation of the project. Fixes google#4224 COPYBARA_INTEGRATE_REVIEW=google#4224 from deining:fix-typos 25978d6 PiperOrigin-RevId: 604736232
Configuration menu - View commit details
-
Copy full SHA for 5f20325 - Browse repository at this point
Copy the full SHA 5f20325View commit details -
Rollforward of google@654d1db: Handle Joiner.on(...) in AbstractToStr…
…ing. Not yet handling the Iterable overload; that's a bit more involved given the lack of prior art. Handily there was a 'isInVarargsPosition' _right there_. PiperOrigin-RevId: 604758974
Configuration menu - View commit details
-
Copy full SHA for 0bd7432 - Browse repository at this point
Copy the full SHA 0bd7432View commit details
Commits on Feb 7, 2024
-
PiperOrigin-RevId: 605025464
Configuration menu - View commit details
-
Copy full SHA for 3ff139f - Browse repository at this point
Copy the full SHA 3ff139fView commit details -
ErrorProne: Update TestParameterInjector version
This is to unblock unknown commit PiperOrigin-RevId: 605082043
Configuration menu - View commit details
-
Copy full SHA for 68badf0 - Browse repository at this point
Copy the full SHA 68badf0View commit details
Commits on Feb 8, 2024
-
PiperOrigin-RevId: 605217009
Configuration menu - View commit details
-
Copy full SHA for b799927 - Browse repository at this point
Copy the full SHA b799927View commit details
Commits on Feb 12, 2024
-
PiperOrigin-RevId: 606334307
Configuration menu - View commit details
-
Copy full SHA for 32312a2 - Browse repository at this point
Copy the full SHA 32312a2View commit details
Commits on Feb 14, 2024
-
Drop diagnostics that are reported inside ErrorProneTokens
javac's tokenize now emits some diagnostics (including the `text-blocks` lint warnings), and this can result in ErrorProneTokens causing bogus diagnostics to be logged. PiperOrigin-RevId: 607014734
Configuration menu - View commit details
-
Copy full SHA for a1f4fa7 - Browse repository at this point
Copy the full SHA a1f4fa7View commit details -
Add a test case demonstrating a
CanIgnoreReturnValueSuggester
bug.PiperOrigin-RevId: 607088772
Configuration menu - View commit details
-
Copy full SHA for 4f060e1 - Browse repository at this point
Copy the full SHA 4f060e1View commit details -
Add some known thread safe types to[]
These types are already in [] TAP train ticket - [] PiperOrigin-RevId: 607088877
Configuration menu - View commit details
-
Copy full SHA for ae3a19f - Browse repository at this point
Copy the full SHA ae3a19fView commit details
Commits on Feb 20, 2024
-
Add a check for comparing
System.console()
to nullSee https://bugs.openjdk.org/browse/JDK-8309155 PiperOrigin-RevId: 608688611
Configuration menu - View commit details
-
Copy full SHA for 404a34b - Browse repository at this point
Copy the full SHA 404a34bView commit details
Commits on Feb 21, 2024
-
ErrorProne check to flag calls to Enum.ordinal().
TESTED: unknown commit PiperOrigin-RevId: 608797794
Configuration menu - View commit details
-
Copy full SHA for 1eda7f8 - Browse repository at this point
Copy the full SHA 1eda7f8View commit details -
Add an
@Ignore
d unit test for a JUnitIncompatibleType CCEgoogle#4291 PiperOrigin-RevId: 609002759
Configuration menu - View commit details
-
Copy full SHA for 2afe510 - Browse repository at this point
Copy the full SHA 2afe510View commit details -
PiperOrigin-RevId: 609097523
Configuration menu - View commit details
-
Copy full SHA for 19a0731 - Browse repository at this point
Copy the full SHA 19a0731View commit details
Commits on Feb 22, 2024
-
ModifiedButNotUsed: exempt unused-prefixes.
PiperOrigin-RevId: 609364784
Configuration menu - View commit details
-
Copy full SHA for 0565b72 - Browse repository at this point
Copy the full SHA 0565b72View commit details -
Some small behavior-preserving refactoring of CanIgnoreReturnValueSug…
…gester PiperOrigin-RevId: 609382750
Configuration menu - View commit details
-
Copy full SHA for 3108612 - Browse repository at this point
Copy the full SHA 3108612View commit details -
Stop suggesting
@CanIgnoreReturnValue
on Builder methods that retur……n useful values By limiting our eagerness to annotate eligible Builder methods to only the `abstract` methods. We don't suggest annotating abstract/overridable methods with @cirv in general, but for Builders, we choose to do so, since we expect that the only reasonable override of the method involves returning "this" or similar. PiperOrigin-RevId: 609396324
Configuration menu - View commit details
-
Copy full SHA for e3725d2 - Browse repository at this point
Copy the full SHA e3725d2View commit details -
Fix handling of default cases in arrow switches
And consolidate some reflective workarounds for switch API changes. Fixes google#4266 PiperOrigin-RevId: 609484284
Configuration menu - View commit details
-
Copy full SHA for f768b0b - Browse repository at this point
Copy the full SHA f768b0bView commit details
Commits on Feb 23, 2024
-
Move the EnumOrdinal.md doc to the right place (it got overwritten by…
… automation). Also, add a comment about manually providing an index if you need a stable one. PiperOrigin-RevId: 609531242
Configuration menu - View commit details
-
Copy full SHA for f3dbb09 - Browse repository at this point
Copy the full SHA f3dbb09View commit details
Commits on Feb 26, 2024
-
Fix some mistakes in the EnumOrdinal examples
PiperOrigin-RevId: 610431336
Configuration menu - View commit details
-
Copy full SHA for 297019c - Browse repository at this point
Copy the full SHA 297019cView commit details -
ImpossibleNullComparison: emit empty fixes.
There's a subtle logic error here: empty fixes are meant to be emitted, there's just no fix. PiperOrigin-RevId: 610434295
Configuration menu - View commit details
-
Copy full SHA for af37d35 - Browse repository at this point
Copy the full SHA af37d35View commit details -
Recommend using
var
forvar unused = ...;
and `var thrown = asser……tThrows(MyException.class, () -> ...);` PiperOrigin-RevId: 610457244
Configuration menu - View commit details
-
Copy full SHA for ad513d5 - Browse repository at this point
Copy the full SHA ad513d5View commit details
Commits on Mar 5, 2024
-
Increase year range on
Date
usages.PiperOrigin-RevId: 612829610
Configuration menu - View commit details
-
Copy full SHA for 3292632 - Browse repository at this point
Copy the full SHA 3292632View commit details -
Ignore disabled checks passed to
-XepPatchChecks
Rather than throwing an `NoSuchElementException`. Fixes google#3908. Fixes google#4028 COPYBARA_INTEGRATE_REVIEW=google#4028 from PicnicSupermarket:gdejong/remove-disabled-checks 3a75f22 PiperOrigin-RevId: 612956455
Configuration menu - View commit details
-
Copy full SHA for 9da2d55 - Browse repository at this point
Copy the full SHA 9da2d55View commit details
Commits on Mar 8, 2024
-
feat: add jpms definition for
annotations
## Summary Minimal set of changes to ship a `module-info.java`, and support JVM 1.8 for the `annotations` module only. ### Reasoning It costs almost nothing to support _only_ the annotations on JVM 1.8, for projects which transitively include `error-prone-annotations`, which can happen via a simple dependency on something like Guava. But, it would be ideal to [ship a `module-info.java`](google#2649), so `annotations` is now a `Multi-Release` JAR, with a `module-info.class` in `META-INF/versions/9`. I am working downstream to [support JPMS in Guava](google/guava#2970), and this PR will be necessary for that to eventually land (without hackery). [Checker Framework recently merged their support](typetools/checker-framework#6326) which means Error Prone is one of the last things on the classpath for Guava without a `module-info.java` definition. Automatic Modules also aren't the answer because they cannot be used with `jlink`. Such dependencies must be processed by tools like Moditect before they can be used in fully modular Java builds. Because Error Prone Annotations is a dependency in Guava, and is itself very popular, many projects need Error Prone to adopt JPMS so they can ship their own code with modular Java support. There may be libraries out there that depend on the annotations _and not the compiler_, who wish to ship a MRJAR and retain JVM 1.8 support (Guava). ### Non-release version number change One wrinkle here is that the Maven project version [is used unconditionally](https://github.com/apache/maven-compiler-plugin/blob/74cfc72acae4f55708bca189b2170167e83df6b3/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java#L304-L305) [as the `--module-version`][0]; however, [`HEAD-SNAPSHOT` is not a valid module identifier](https://lists.apache.org/thread/qtghq13qgjoc4pn6ovsdxgnjnm4ozv4d). This leaves only a few choices to support JPMS through recent (`3.8.x+`) Maven Compiler plugin versions: - `HEAD-SNAPSHOT` needs to become `1.0-HEAD-SNAPSHOT`, and then it is a valid `--module-version` - Or, Maven Compiler Plugin needs to ship a bugfix and Error Prone will need to wait for a release (if a bugfix ships at all) I understand this can be a breaking change somewhere within Google, but I don't see a way around this without resorting to severe build hacks. I've gotten it to build anyway by building the `module-info.java` only in a separate Maven project, and then copying it into the JAR at the last moment, but there are serious issues with that route so I suggest it be abandoned in favor of a version string change during dev, if possible. ## Changelog - feat: add `module-info` to `annotations` module - feat: ship `annotations` as a `Multi-Release` JAR - feat: support `1.8` through latest JDK for `annotations` module - fix: remove automatic module definition from `annotations` module - fix: `HEAD-SNAPSHOT` → `1.0-HEAD-SNAPSHOT`, because of a Maven Compiler Plugin issue [precluding use as a module version][0] Fixes and closes google#2649 [0]: https://issues.apache.org/jira/browse/MCOMPILER-579 Fixes google#4311 COPYBARA_INTEGRATE_REVIEW=google#4311 from sgammon:feat/jpms d209b0c PiperOrigin-RevId: 614026439
Configuration menu - View commit details
-
Copy full SHA for 0e95364 - Browse repository at this point
Copy the full SHA 0e95364View commit details
Commits on Mar 9, 2024
-
Add the 'compile' goal for 'compile-java9'
google#4314 (comment) Fixes google#4314 COPYBARA_INTEGRATE_REVIEW=google#4314 from cushon:module 604430d PiperOrigin-RevId: 614276837
Configuration menu - View commit details
-
Copy full SHA for ea5ef6d - Browse repository at this point
Copy the full SHA ea5ef6dView commit details
Commits on Mar 12, 2024
-
fix: module name →
com.google.errorprone.annotations
## Summary Fixes the module name: ~~`com.google.errorprone.annotation`~~ → `com.google.errorprone.annotations`. Amends the OSGi build not to include `Automatic-Module-Name` in the `MANIFEST.MF` for the `annotations` project. ## Changelog - fix: name in `module-info.java` for `annotations` module - fix: don't emit `Automatic-Module-Name` in `annotations` module - chore: preserve all other aspects of OSGi and JAR builds Relates to [discussion](google#4311 (comment)) in google#4311. Double checked for correct JAR structure; see [these screenshots](google#4311 (comment)). cc / @cushon @ben-manes Fixes google#4317 COPYBARA_INTEGRATE_REVIEW=google#4317 from sgammon:fix/module-name bc52c58 PiperOrigin-RevId: 615114274
Configuration menu - View commit details
-
Copy full SHA for 9d99ee7 - Browse repository at this point
Copy the full SHA 9d99ee7View commit details
Commits on Mar 13, 2024
-
Initial implementation of a check for class initialization deadlocks
google#2062 PiperOrigin-RevId: 615515920
Configuration menu - View commit details
-
Copy full SHA for 1d99484 - Browse repository at this point
Copy the full SHA 1d99484View commit details
Commits on Mar 14, 2024
-
Don't check interfaces for class initialization cycles
Circular initialization causes deadlocks for non-interface classes because of the requirement that super classes be initialized first, but that doesn't apply to interfaces, only concrete classes. google#2062 PiperOrigin-RevId: 615642376
Configuration menu - View commit details
-
Copy full SHA for 1b576a7 - Browse repository at this point
Copy the full SHA 1b576a7View commit details -
Add heuristics for classes with private constructors/factories, and f…
…or non-static inner classes google#2062 PiperOrigin-RevId: 615879331
Configuration menu - View commit details
-
Copy full SHA for ddbeec3 - Browse repository at this point
Copy the full SHA ddbeec3View commit details
Commits on Mar 15, 2024
-
Tighten the AlmostJavadoc heuristic for HTML tags.
PiperOrigin-RevId: 616116744
Configuration menu - View commit details
-
Copy full SHA for 7f9c6a1 - Browse repository at this point
Copy the full SHA 7f9c6a1View commit details
Commits on Mar 18, 2024
-
ImpossibleNullComparison: match on all primitives.
PiperOrigin-RevId: 616822108
Configuration menu - View commit details
-
Copy full SHA for c2a1a7c - Browse repository at this point
Copy the full SHA c2a1a7cView commit details -
Treat builder setter methods inside `@dagger.producers.ProductionComp…
…onent.Builder` and `@dagger.producers.ProductionSubcomponent.Builder` as ignorable. #checkreturnvalue PiperOrigin-RevId: 616946969
Configuration menu - View commit details
-
Copy full SHA for 1b36127 - Browse repository at this point
Copy the full SHA 1b36127View commit details
Commits on Mar 19, 2024
-
Detect multiple
set
s on the same proto oneof.PiperOrigin-RevId: 617130971
Configuration menu - View commit details
-
Copy full SHA for 0d2f5e5 - Browse repository at this point
Copy the full SHA 0d2f5e5View commit details -
Document some suggested fixes for ClassInitializationDeadlock
google#2062 PiperOrigin-RevId: 617293200
Configuration menu - View commit details
-
Copy full SHA for 0cb0873 - Browse repository at this point
Copy the full SHA 0cb0873View commit details -
Fix MultipleNullnessAnnotations's ability to read type annotations fr…
…om type variable uses For whatever reason, the type annotations cannot be accessed using the `Tree`s for the corresponding AST node for those types (`getType(methodTree.getReturnType())` and `getType(variableTree.getType())`. Fixes google#4320 PiperOrigin-RevId: 617311880
Configuration menu - View commit details
-
Copy full SHA for 449618c - Browse repository at this point
Copy the full SHA 449618cView commit details -
ClassInitializationDeadlock: improve handling of classes that can't b…
…e initialized outside the current compilation unit Consider all classes in the super type hierarchy between the subclass and containing superclass, to catch deadlocks where an intermediate supertype can be instantiated. This also fixes an NPE with an existing check for the direct super type. google#2062 PiperOrigin-RevId: 617314919
Configuration menu - View commit details
-
Copy full SHA for e5f0814 - Browse repository at this point
Copy the full SHA e5f0814View commit details
Commits on Mar 20, 2024
-
Rip out
TestParametersNotInitialized:MoreRunners
flag.PiperOrigin-RevId: 617515136
Configuration menu - View commit details
-
Copy full SHA for ec13312 - Browse repository at this point
Copy the full SHA ec13312View commit details -
When an inlined method refers to method arguments in the true or false
branch of a conditional statement, refuse to allow it to be inlined. Before calling the method in question, the caller has definitely executed the expressions that yield the values passed to the method. However, after inlining the body of the method into the callsite, one of the two expressions will no longer be executed, leading to a subtle behavior change if the un-executed expression was side-effecting. PiperOrigin-RevId: 617624766
Configuration menu - View commit details
-
Copy full SHA for 437293d - Browse repository at this point
Copy the full SHA 437293dView commit details
Commits on Mar 21, 2024
-
Rip out
ImmutableNullComparison:EmitEmptyFixes
.PiperOrigin-RevId: 617789741
Configuration menu - View commit details
-
Copy full SHA for 58473c5 - Browse repository at this point
Copy the full SHA 58473c5View commit details
Commits on Mar 22, 2024
-
Fix a typo in
SuggestedFix.checkNotSyntheticConstructor
PiperOrigin-RevId: 618176103
Configuration menu - View commit details
-
Copy full SHA for 5840b4d - Browse repository at this point
Copy the full SHA 5840b4dView commit details
Commits on Mar 25, 2024
-
Rename TruthSelfEquals to a more sensible name.
PiperOrigin-RevId: 618828938
Configuration menu - View commit details
-
Copy full SHA for 9d5491d - Browse repository at this point
Copy the full SHA 9d5491dView commit details -
Handle exhaustive switches on sealed types in MissingDefault
PiperOrigin-RevId: 618889679
Configuration menu - View commit details
-
Copy full SHA for cd6a504 - Browse repository at this point
Copy the full SHA cd6a504View commit details -
Fix a crash in NonCanonicalType with type annotations
Fixes google#4343 PiperOrigin-RevId: 618890911
Configuration menu - View commit details
-
Copy full SHA for af9dad8 - Browse repository at this point
Copy the full SHA af9dad8View commit details
Commits on Mar 26, 2024
-
Tidy some SuggestedFix usages.
I added a `toBuilder` method to avoid the `SuggestedFix.builder().merge(x)` dance, and made use of the newer static `merge` method in a few places. PiperOrigin-RevId: 619220321
Configuration menu - View commit details
-
Copy full SHA for 527171c - Browse repository at this point
Copy the full SHA 527171cView commit details -
Remove mutable state from ThreadSafety.
Ironically, this is stopping the class being thread-safe. PiperOrigin-RevId: 619256145
Configuration menu - View commit details
-
Copy full SHA for 29d9335 - Browse repository at this point
Copy the full SHA 29d9335View commit details
Commits on Mar 27, 2024
-
Yoda conditions: consider static fields which are in
SHOUTY_CASE
to…… be constant. Motivated by `Boolean.TRUE`, but that seemed a bit special-casey. PiperOrigin-RevId: 619497318
Configuration menu - View commit details
-
Copy full SHA for 9b2c2a9 - Browse repository at this point
Copy the full SHA 9b2c2a9View commit details -
Fix an ArrayToString false positive for the varargs overload of `Join…
…er.join(Object, Object, Object...)` google#4233 (review) PiperOrigin-RevId: 619537499
Configuration menu - View commit details
-
Copy full SHA for ed4b61d - Browse repository at this point
Copy the full SHA ed4b61dView commit details
Commits on Mar 28, 2024
-
Prepare RedundantSetterCall for becoming an ERROR.
PiperOrigin-RevId: 620003152
Configuration menu - View commit details
-
Copy full SHA for 48ec7d9 - Browse repository at this point
Copy the full SHA 48ec7d9View commit details
Commits on Apr 2, 2024
-
Wrangle
MixedArrayDimensions
to be an error internally, but not ext……ernally. I added the third_party exemption proactively, and had to hardcode _one last annoying exemption_. PiperOrigin-RevId: 621130845
Configuration menu - View commit details
-
Copy full SHA for 474a4ac - Browse repository at this point
Copy the full SHA 474a4acView commit details -
Handle unqualified instance method names in refaster
Previously unqualified methods names were being handled using logic intended for local variables, which failed to match them. Unqualified instance method names are relatively rare in templates. The motivating example was a template intended to match on an anonymous class creation, where code in the class called a method from a superclass by its simple name. PiperOrigin-RevId: 621197168
Configuration menu - View commit details
-
Copy full SHA for e4c9409 - Browse repository at this point
Copy the full SHA e4c9409View commit details -
Warn about returning a null
Table
, too.PiperOrigin-RevId: 621206548
Configuration menu - View commit details
-
Copy full SHA for 0c12a77 - Browse repository at this point
Copy the full SHA 0c12a77View commit details -
Drop text about 'legacy methods' From RestrictedApi methods
PiperOrigin-RevId: 621319804
Configuration menu - View commit details
-
Copy full SHA for 4ce508b - Browse repository at this point
Copy the full SHA 4ce508bView commit details
Commits on Apr 4, 2024
-
Add
@snippet
as a known inline tag.Fixes external google#4308. PiperOrigin-RevId: 621845649
Configuration menu - View commit details
-
Copy full SHA for 200eb43 - Browse repository at this point
Copy the full SHA 200eb43View commit details
Commits on Apr 5, 2024
-
Allow
CONST_CASE != null
in YodaConditionFollow-up to google@9b2c2a9 PiperOrigin-RevId: 622020333
Configuration menu - View commit details
-
Copy full SHA for 23547ac - Browse repository at this point
Copy the full SHA 23547acView commit details
Commits on Apr 15, 2024
-
Don't suggest
ImmutableSet
ifImmutableList
is unused.PiperOrigin-RevId: 624898303
Configuration menu - View commit details
-
Copy full SHA for 53d787c - Browse repository at this point
Copy the full SHA 53d787cView commit details -
NearbyCallers: scan the body of expression lambdas.
PiperOrigin-RevId: 624922054
Configuration menu - View commit details
-
Copy full SHA for 5a7b8d9 - Browse repository at this point
Copy the full SHA 5a7b8d9View commit details
Commits on Apr 16, 2024
-
Fix a crash in JUnitIncompatibleType
Fixes google#4291 PiperOrigin-RevId: 625359890
Configuration menu - View commit details
-
Copy full SHA for a6ab21a - Browse repository at this point
Copy the full SHA a6ab21aView commit details
Commits on Apr 18, 2024
-
Correction to UseCorrectAssertInTests.
Contrary to the current text, blaze test actually does enable asserts, in both dbg and opt modes. I've verified this by running a JUnit test containing "assert false" with "blaze test -c opt" and "blaze test -c dbg". My tests use a java_library BUILD rule that includes all the *Test.java files, and a GenTestRules to create the actual test targets. PiperOrigin-RevId: 626049936
Configuration menu - View commit details
-
Copy full SHA for 9d66272 - Browse repository at this point
Copy the full SHA 9d66272View commit details -
PiperOrigin-RevId: 626072465
Configuration menu - View commit details
-
Copy full SHA for 07c1a7c - Browse repository at this point
Copy the full SHA 07c1a7cView commit details
Commits on Apr 23, 2024
-
Encourage when/thenReturn over doReturn/when.
I've been very over-conservative about the heuristics on what to avoid, but nonetheless here's a huge sample flume: unknown commit PiperOrigin-RevId: 627396784
Configuration menu - View commit details
-
Copy full SHA for 92c106d - Browse repository at this point
Copy the full SHA 92c106dView commit details
Commits on Apr 24, 2024
-
Fix for a crash in RedundantSetterCall.
[] PiperOrigin-RevId: 627663284
Configuration menu - View commit details
-
Copy full SHA for 3ee6f41 - Browse repository at this point
Copy the full SHA 3ee6f41View commit details -
VoidUsed
: flagVoid
variables being _used_, where they can simply…… be replaced with a literal `null`. Findings here (unknown commit) before I fixed the bug with assignments. PiperOrigin-RevId: 627676095
Configuration menu - View commit details
-
Copy full SHA for f289d9e - Browse repository at this point
Copy the full SHA f289d9eView commit details -
Remove a very literal change-detector test, and move the comment to t…
…he production code (which seems more discoverable). PiperOrigin-RevId: 627693317
Configuration menu - View commit details
-
Copy full SHA for fd9b826 - Browse repository at this point
Copy the full SHA fd9b826View commit details
Commits on Apr 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ebe0a01 - Browse repository at this point
Copy the full SHA ebe0a01View commit details -
Configuration menu - View commit details
-
Copy full SHA for bd85693 - Browse repository at this point
Copy the full SHA bd85693View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e3b69e - Browse repository at this point
Copy the full SHA 5e3b69eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 883d2da - Browse repository at this point
Copy the full SHA 883d2daView commit details