Skip to content

Bump minimum Error Prone version supported to 2.36.0 #1396

Closed

Description

@msridhar

(Updated from original description based on a comment below)

The release date of 2.36.0 was Nov 18, 2024, so more than a year ago at this point. We've tended to support even older versions of Error Prone, so this would be a change. The motivation would be to add full support for switch expressions (#1402); we currently do not warn on certain possible NPEs with such expressions. Unfortunately, if we bump our minimum EP version to 2.36.0, NullAway would no longer run on previous versions (since NullAway would implement the BugChecker.SwitchExpressionTreeMatcher interface, which doesn't exist in previous Error Prone versions).

If anyone has any concerns about bumping the minimum support Error Prone version to 2.36.0 please comment here.

Activity

  1. coderabbitai commented on Dec 23, 2025

    @coderabbitai
    Contributor

    📝 CodeRabbit Plan Mode

    Generate an implementation plan and prompts that you can use with your favorite coding agent.

    • Create Plan
    Examples

    🔗 Similar Issues

    Related Issues

    🔗 Related PRs

    #1239 - Update to Error Prone 2.41.0 [merged]
    #1299 - Update to Error Prone 2.42.0 [merged]
    #1401 - Update to Error Prone 2.45.0 [merged]

    👤 Suggested Assignees

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. added a commit that references this issue on Dec 23, 2025
  3. msridhar commented on Dec 26, 2025

    @msridhar
    ContributorAuthor

    A summary of possible cleanups enabled by bumping the minimum supported Error Prone version is below. Given the extra possible simplification in NullAway::getSymbolForMethodInvocation I say we go to 2.25.0 at a minimum.

    Also, given #1402 we might just want to bump to 2.36.0, so we can properly check for NPEs due to unboxing in switch expressions.

    Main code

    • nullaway/src/main/java/com/uber/nullaway/ASTHelpersBackports.java
      • isStatic(Symbol): remove once minimum EP is 2.16.0+ and use ASTHelpers.isStatic directly.
      • getEnclosedElements(Symbol): remove once minimum EP is 2.20.0+ and call ASTHelpers.getEnclosedElements.
      • hasDirectAnnotationWithSimpleName(Symbol, String): remove once minimum EP is 2.24.0+ and call ASTHelpers.hasDirectAnnotationWithSimpleName.
    • nullaway/src/main/java/com/uber/nullaway/NullAway.java
      • getSymbolForMethodInvocation workaround using baseSymbol(): remove once requiring EP release after 2.24.1 (commit e5a6d0d8...).

    Test code

    • guava-recent-unit-tests/src/test/java/com/uber/nullaway/guava/NullAwayGuavaParametricNullnessTests.java
      • Annotated packages list includes com.google.common because EP 2.14.0 doesn't read @NullMarked from package-info.java; remove when minimum EP is bumped.
  4. changed the title [-]Bump minimum Error Prone version supported to 2.24.0[/-] [+]Bump minimum Error Prone version supported to 2.25.0, possibly 2.36.0[/+] on Dec 26, 2025
  5. pinned this issue on Dec 26, 2025
  6. changed the title [-]Bump minimum Error Prone version supported to 2.25.0, possibly 2.36.0[/-] [+]Bump minimum Error Prone version supported to 2.36.0[/+] on Dec 26, 2025
  7. msridhar commented on Dec 26, 2025

    @msridhar
    ContributorAuthor

    If anyone has any concerns about bumping the minimum support Error Prone version to 2.36.0 (to get full support for switch expressions) please comment here. The release date was Nov 18, 2024, so more than a year ago at this point. Note that NullAway would probably still work on older Error Prone versions for code that doesn't use switch expressions, but we would stop testing it so eventually it might break.

  8. added a commit that references this issue on Jan 13, 2026
    0b4156b
  9. msridhar commented on Jan 17, 2026

    @msridhar
    ContributorAuthor

    This change will be included in NullAway 0.13.0

  10. unpinned this issue on Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions