Skip to content

Nullaway 0.12.8 regression #1249

Closed as duplicate
Closed as duplicate

Description

@sdeleuze

Hi, when trying to upgrade Spring Framework from NullAway 0.12.7 to 0.12.8, I get the following error even if I use the recommended Error Prone version 2.39.0. Same error happen with 2.41.0.

  /Users/sdeleuze/workspace/spring-framework/spring-web/src/main/java/org/springframework/http/client/SubscriberInputStream.java:332: error: An unhandled exception was thrown by the Error Prone static analysis plugin.
                                        this.available = Objects.requireNonNull(this.mapper.apply(buffer));
                                                       ^
       Please report this at https://github.com/google/error-prone/issues/new and include the following:
    
       error-prone version: 2.39.0
       BugPattern: NullAway
       Stack Trace:
       java.lang.ClassCastException: class com.sun.tools.javac.code.Type$TypeVar cannot be cast to class com.sun.tools.javac.code.Type$ArrayType (com.sun.tools.javac.code.Type$TypeVar and com.sun.tools.javac.code.Type$ArrayType are in module jdk.compiler of loader 'app')
        at com.uber.nullaway.generics.CheckIdenticalNullabilityVisitor.visitArrayType(CheckIdenticalNullabilityVisitor.java:94)
        at com.uber.nullaway.generics.CheckIdenticalNullabilityVisitor.visitArrayType(CheckIdenticalNullabilityVisitor.java:16)
        at jdk.compiler/com.sun.tools.javac.code.Type$ArrayType.accept(Type.java:1375)
        at com.uber.nullaway.generics.GenericsChecks.identicalTypeParameterNullability(GenericsChecks.java:615)
        at com.uber.nullaway.generics.GenericsChecks.subtypeParameterNullability(GenericsChecks.java:647)
        at com.uber.nullaway.generics.GenericsChecks.checkTypeParameterNullnessForAssignability(GenericsChecks.java:456)
        at com.uber.nullaway.NullAway.matchAssignment(NullAway.java:526)
        at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:509)

You should be able to reproduce with:

git clone https://github.com/sdeleuze/spring-framework.git
git checkout nullaway-0-12-8-regression
./gradlew build -x test

Activity

  1. added and removed on Aug 18, 2025
  2. msridhar commented on Aug 18, 2025

    @msridhar
    Contributor

    Reproduced; thanks for the report. I think this is a duplicate of #1238 which has been fixed on the master branch by #1240. @sdeleuze would it be helpful to you if we cut a bug-fix release for this crash?

  3. sdeleuze commented on Aug 18, 2025

    @sdeleuze
    Author

    Yep, it would be very useful if possible!

  4. msridhar commented on Aug 18, 2025

    @msridhar
    Contributor

    @sdeleuze we just cut NullAway 0.12.9 and your repro command succeeds with that release. Let us know if it doesn't work for you. Thanks!

  5. sdeleuze commented on Aug 19, 2025

    @sdeleuze
    Author

    NullAway 0.12.9 works as expected and allow Spring Framework green build, thanks!

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