Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 28, 2026

Completes JSpecify nullness annotation coverage across the library. Previously ~21 files were annotated; this adds annotations to the remaining ~32 files.

Changes

  • Core (Try, DataLoaderOptions, BatchLoaderContextProvider): Mark nullable throwable field, optional builder fields, nullable context return
  • Impl: nonNull() accepts @Nullable input; cause() returns @Nullable
  • Stats: Context parameters nullable for deprecated method compatibility
  • Instrumentation: beginXXX() methods return @Nullable; onCompleted params nullable
  • Scheduler: environment param marked @Nullable (null for simple loaders)
  • Reactive: callContexts list elements nullable

Type bound fix

// NoOpValueCache now matches ValueCache's type bound
public class NoOpValueCache<K, V extends @Nullable Object> implements ValueCache<K, V>

NullAway suppressions

Two suppressions for known generic type inference limitations:

  • AbstractBatchSubscriber.onError()List<@Nullable Object> constructor
  • DataLoaderInstrumentationHelper.whenCompleted()BiConsumer nullability

Other

  • Fixed KotlinExamples.kt explicit type params for stricter nullability
  • Updated JSPECIFY_MIGRATION_PLAN.md with completion status

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: andimarek <1706744+andimarek@users.noreply.github.com>
Copilot AI changed the title [WIP] Add comprehensive Jspecify annotations to java-dataloader Add JSpecify migration plan document Jan 28, 2026
Copilot AI requested a review from andimarek January 28, 2026 23:46
Co-authored-by: andimarek <1706744+andimarek@users.noreply.github.com>
Copilot AI changed the title Add JSpecify migration plan document Add JSpecify migration plan with detailed effort estimates Jan 28, 2026
Copilot AI and others added 2 commits January 29, 2026 00:14
Co-authored-by: andimarek <1706744+andimarek@users.noreply.github.com>
…ble to environment params

Co-authored-by: andimarek <1706744+andimarek@users.noreply.github.com>
Copilot AI changed the title Add JSpecify migration plan with detailed effort estimates Add comprehensive JSpecify nullness annotations to all remaining classes Jan 29, 2026
Copilot AI changed the title Add comprehensive JSpecify nullness annotations to all remaining classes Add comprehensive JSpecify @NullMarked annotations to remaining classes Jan 29, 2026
@andimarek andimarek marked this pull request as ready for review January 29, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants