Skip to content

[CI] Fix failing Spring framework tests #1605

Description

@subhramit

The following failures are currently noted in CI runs:

/tmp/spring-framework/spring-web/src/main/java/org/springframework/web/util/UriComponents.java:351: error: [NullAway] incompatible types: Iterator<@Nullable Object> cannot be converted to Iterator<Object>

			this.valueIterator = Arrays.asList(uriVariableValues).iterator();
> Task :spring-web:compileJava
			                   ^
    (see http://t.uber.com/nullaway )
1 error


> Task :spring-web:compileJava FAILED
gradle/actions: Writing build results to /home/runner/work/_temp/.gradle-actions/build-results/__run_4-1781200640577.json

[Incubating] Problems report is available at: file:///tmp/spring-framework/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
75 actionable tasks: 43 executed, 32 from cache

* What went wrong:
Execution failed for task ':spring-web:compileJava' (registered by plugin class 'org.gradle.api.plugins.JavaBasePlugin').
> Compilation failed; see the compiler output below.
  /tmp/spring-framework/spring-web/src/main/java/org/springframework/web/util/UriComponents.java:351: error: [NullAway] incompatible types: Iterator<@Nullable Object> cannot be converted to Iterator<Object>
  			this.valueIterator = Arrays.asList(uriVariableValues).iterator();
  			                   ^
      (see http://t.uber.com/nullaway )
  1 error

(taken from https://github.com/uber/NullAway/actions/runs/27324825986/job/80868514610)

and

/tmp/spring-boot/core/spring-boot-test/src/main/java/org/springframework/boot/test/context/assertj/ApplicationContextAssert.java:290: error: [NullAway] incompatible types: ObjectAssert<@Nullable T> cannot be converted to AbstractObjectAssert<?, T> (ObjectAssert<@Nullable T> is a subtype of AbstractObjectAssert<ObjectAssert<@Nullable T>, @Nullable T>)
> Task :core:spring-boot-test:compileJava
		return assertThat(bean).as("Bean of type <%s> from <%s>", type, getApplicationContext());
		                          ^
    (see http://t.uber.com/nullaway )
/tmp/spring-boot/core/spring-boot-test/src/main/java/org/springframework/boot/test/context/assertj/ApplicationContextAssert.java:343: error: [NullAway] incompatible types: ObjectAssert<@Nullable Object> cannot be converted to AbstractObjectAssert<?, Object> (ObjectAssert<@Nullable Object> is a subtype of AbstractObjectAssert<ObjectAssert<@Nullable Object>, @Nullable Object>)
		return assertThat(bean).as("Bean of name <%s> from <%s>", name, getApplicationContext());
		                          ^
    (see http://t.uber.com/nullaway )
/tmp/spring-boot/core/spring-boot-test/src/main/java/org/springframework/boot/test/context/assertj/ApplicationContextAssert.java:376: error: [NullAway] incompatible types: ObjectAssert<@Nullable T> cannot be converted to AbstractObjectAssert<?, T> (ObjectAssert<@Nullable T> is a subtype of AbstractObjectAssert<ObjectAssert<@Nullable T>, @Nullable T>)
		return assertThat((T) bean).as("Bean of name <%s> and type <%s> from <%s>", name, type,
		                              ^
    (see http://t.uber.com/nullaway )

> Task :module:spring-boot-kotlinx-serialization-json:compileJava
3 errors

(from https://github.com/uber/NullAway/actions/runs/27324825986/job/80868514555)

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