Skip to content

Refine JSpecify annotations #46926

@mhalbritter

Description

@mhalbritter

Continuation of #46587.

  • Review 27c96d9
  • Run IntelliJ IDEA null checks and fix issues
  • Remove varargs checkstyle suppressions (needs release of https://github.com/spring-io/spring-javaformat)
  • Add nullability to org.springframework.boot.json.JsonWriter (it's currently @NullUnmarked)
  • Check public API of modules if @Nullable is missing (especially if generics are involved)
  • Remove suppression in graphql module once Missing @Nullable annotation on GraphiQlHandler spring-graphql#1276 is fixed
  • Review @SuppressWarnings("NullAway") suppressions
  • Review org.springframework.boot.hibernate.SpringJtaPlatform#locateTransactionManager and org.springframework.boot.hibernate.SpringJtaPlatform#locateUserTransaction
  • Review if org.springframework.boot.metrics.autoconfigure.export.properties.PropertiesConfigAdapter.Getter is fine for us.
  • Take another look at org.springframework.boot.context.properties.PropertyMapper, especially alwaysApplyingWhenNonNull and whenNonNull.
  • Review Mono.from(null) in org.springframework.boot.webflux.actuate.endpoint.web.AbstractWebFluxEndpointHandlerMapping.ReactiveWebOperationAdapter#handleResult
  • Review Mono.error(getError(request))) in org.springframework.boot.webflux.autoconfigure.error.DefaultErrorWebExceptionHandler#renderErrorView
  • Review org.springframework.boot.ResourceBanner#createNullDefaultSources. Eventually a MapPropertySource from a map containing null values is created, which shouldn't be possible according to the annotations on MapPropertySource.
  • Review org.springframework.boot.context.properties.source.MapConfigurationPropertySource#put. It puts a null key in this.source, which is then used with MapPropertySource, which doesn't accept null keys (at least according to the annotations).
  • Depending on SingletonSupplier is not singleton if null is returned on first supplier call spring-framework#35369: Refactor SingletonSupplier usages to only use them with non-nullable suppliers
  • Review org.springframework.boot.test.json.JsonContentAssert#compare(java.lang.CharSequence, org.skyscreamer.jsonassert.JSONCompareMode) when passing null as first parameter

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions