@@ -46,86 +46,89 @@ The following files already have `@NullMarked` annotations:
4646
4747## Files Requiring Annotations
4848
49+ > ** ✅ COMPLETED** : All phases have been implemented. See status below.
50+
4951### Phase 1: Core Package (` org.dataloader ` ) - High Priority
5052
5153| File | Status | Notes |
5254| ------| --------| -------|
53- | ` Try.java ` | ❌ Needs annotation | Generic type ` V ` may be nullable; internal throwable field is nullable |
54- | ` DataLoaderOptions.java ` | ❌ Needs annotation | Many nullable fields (cacheKeyFunction, cacheMap, valueCache, batchLoaderScheduler) |
55+ | ` Try.java ` | ✅ Done | Added ` @NullMarked ` , marked throwable field as nullable, used ` nonNull() ` assertions |
56+ | ` DataLoaderOptions.java ` | ✅ Done | Added ` @NullMarked ` , marked nullable fields and builder setters |
57+ | ` BatchLoaderContextProvider.java ` | ✅ Done | Marked ` getContext() ` return as ` @Nullable ` |
5558
5659### Phase 2: Implementation Package (` org.dataloader.impl ` )
5760
5861| File | Status | Notes |
5962| ------| --------| -------|
60- | ` Assertions.java ` | ❌ Needs annotation | ` nonNull() ` method accepts nullable input, returns non-null |
61- | ` CompletableFutureKit.java ` | ❌ Needs annotation | Review for nullable handling |
62- | ` PromisedValues.java ` | ❌ Needs annotation | Interface with nullable considerations |
63- | ` PromisedValuesImpl.java ` | ❌ Needs annotation | Implementation class |
64- | ` NoOpValueCache.java ` | ❌ Needs annotation | Implements ` ValueCache ` |
65- | ` DataLoaderAssertionException.java ` | ❌ Needs annotation | Exception class |
63+ | ` Assertions.java ` | ✅ Done | Added ` @NullMarked ` , marked ` nonNull() ` input parameter as nullable |
64+ | ` CompletableFutureKit.java ` | ✅ Done | Added ` @NullMarked ` , marked ` cause() ` return as nullable |
65+ | ` PromisedValues.java ` | ✅ Done | Added ` @NullMarked ` , marked nullable returns ( ` cause() ` , ` get() ` ) |
66+ | ` PromisedValuesImpl.java ` | ✅ Done | Added ` @NullMarked ` , marked nullable returns |
67+ | ` NoOpValueCache.java ` | ✅ Done | Added ` @NullMarked ` , added nullable type bound ` V extends @Nullable Object ` |
68+ | ` DataLoaderAssertionException.java ` | ✅ Done | Added ` @NullMarked ` |
6669
6770### Phase 3: Statistics Package (` org.dataloader.stats ` )
6871
6972| File | Status | Notes |
7073| ------| --------| -------|
71- | ` Statistics.java ` | ❌ Needs annotation | Simple data class, likely all non-null |
72- | ` StatisticsCollector.java ` | ❌ Needs annotation | Interface |
73- | ` SimpleStatisticsCollector.java ` | ❌ Needs annotation | Implements ` StatisticsCollector ` |
74- | ` ThreadLocalStatisticsCollector.java ` | ❌ Needs annotation | Implements ` StatisticsCollector ` |
75- | ` NoOpStatisticsCollector.java ` | ❌ Needs annotation | Implements ` StatisticsCollector ` |
76- | ` DelegatingStatisticsCollector.java ` | ❌ Needs annotation | Implements ` StatisticsCollector ` |
74+ | ` Statistics.java ` | ✅ Done | Added ` @NullMarked ` |
75+ | ` StatisticsCollector.java ` | ✅ Done | Added ` @NullMarked ` , marked context parameters as nullable |
76+ | ` SimpleStatisticsCollector.java ` | ✅ Done | Added ` @NullMarked ` |
77+ | ` ThreadLocalStatisticsCollector.java ` | ✅ Done | Added ` @NullMarked ` |
78+ | ` NoOpStatisticsCollector.java ` | ✅ Done | Added ` @NullMarked ` |
79+ | ` DelegatingStatisticsCollector.java ` | ✅ Done | Added ` @NullMarked ` |
7780
7881#### Statistics Context Subpackage (` org.dataloader.stats.context ` )
7982
8083| File | Status | Notes |
8184| ------| --------| -------|
82- | ` IncrementBatchLoadCountByStatisticsContext.java ` | ❌ Needs annotation | Context class |
83- | ` IncrementBatchLoadExceptionCountStatisticsContext.java ` | ❌ Needs annotation | Context class |
84- | ` IncrementCacheHitCountStatisticsContext.java ` | ❌ Needs annotation | Context class |
85- | ` IncrementLoadCountStatisticsContext.java ` | ❌ Needs annotation | Context class |
86- | ` IncrementLoadErrorCountStatisticsContext.java ` | ❌ Needs annotation | Context class |
85+ | ` IncrementBatchLoadCountByStatisticsContext.java ` | ✅ Done | Added ` @NullMarked ` , nullable callContext |
86+ | ` IncrementBatchLoadExceptionCountStatisticsContext.java ` | ✅ Done | Added ` @NullMarked ` , nullable callContexts |
87+ | ` IncrementCacheHitCountStatisticsContext.java ` | ✅ Done | Added ` @NullMarked ` , nullable callContext |
88+ | ` IncrementLoadCountStatisticsContext.java ` | ✅ Done | Added ` @NullMarked ` , nullable callContext |
89+ | ` IncrementLoadErrorCountStatisticsContext.java ` | ✅ Done | Added ` @NullMarked ` , nullable callContext |
8790
8891### Phase 4: Instrumentation Package (` org.dataloader.instrumentation ` )
8992
9093| File | Status | Notes |
9194| ------| --------| -------|
92- | ` DataLoaderInstrumentation.java ` | ❌ Needs annotation | Methods return ` @Nullable DataLoaderInstrumentationContext ` |
93- | ` DataLoaderInstrumentationContext.java ` | ❌ Needs annotation | Interface with nullable generics |
94- | ` DataLoaderInstrumentationHelper.java ` | ❌ Needs annotation | Helper with NOOP implementations |
95- | ` SimpleDataLoaderInstrumentationContext.java ` | ❌ Needs annotation | Simple implementation |
96- | ` ChainedDataLoaderInstrumentation.java ` | ❌ Needs annotation | Chains multiple instrumentations |
95+ | ` DataLoaderInstrumentation.java ` | ✅ Done | Added ` @NullMarked ` , nullable returns and loadContext param |
96+ | ` DataLoaderInstrumentationContext.java ` | ✅ Done | Added ` @NullMarked ` , nullable ` onCompleted ` parameters |
97+ | ` DataLoaderInstrumentationHelper.java ` | ✅ Done | Added ` @NullMarked ` , nullable parameters |
98+ | ` SimpleDataLoaderInstrumentationContext.java ` | ✅ Done | Added ` @NullMarked ` , nullable fields and callbacks |
99+ | ` ChainedDataLoaderInstrumentation.java ` | ✅ Done | Added ` @NullMarked ` , handle nullable contexts |
97100
98101### Phase 5: Scheduler Package (` org.dataloader.scheduler ` )
99102
100103| File | Status | Notes |
101104| ------| --------| -------|
102- | ` BatchLoaderScheduler.java ` | ❌ Needs annotation | Interface; ` environment ` parameter documented as possibly null |
105+ | ` BatchLoaderScheduler.java ` | ✅ Done | Added ` @NullMarked ` |
103106
104107### Phase 6: Registries Package (` org.dataloader.registries ` )
105108
106109| File | Status | Notes |
107110| ------| --------| -------|
108- | ` DispatchPredicate.java ` | ❌ Needs annotation | Functional interface |
111+ | ` DispatchPredicate.java ` | ✅ Done | Added ` @NullMarked ` |
109112
110113### Phase 7: Reactive Package (` org.dataloader.reactive ` )
111114
112115| File | Status | Notes |
113116| ------| --------| -------|
114- | ` ReactiveSupport.java ` | ❌ Needs annotation | Factory methods for subscribers |
115- | ` AbstractBatchSubscriber.java ` | ❌ Needs annotation | Base subscriber implementation |
116- | ` BatchSubscriberImpl.java ` | ❌ Needs annotation | Subscriber implementation |
117- | ` MappedBatchSubscriberImpl.java ` | ❌ Needs annotation | Subscriber implementation |
117+ | ` ReactiveSupport.java ` | ✅ Done | Added ` @NullMarked ` , nullable callContexts |
118+ | ` AbstractBatchSubscriber.java ` | ✅ Done | Added ` @NullMarked ` , nullable callContexts |
119+ | ` BatchSubscriberImpl.java ` | ✅ Done | Added ` @NullMarked ` |
120+ | ` MappedBatchSubscriberImpl.java ` | ✅ Done | Added ` @NullMarked ` , handle nullable futures |
118121
119122### Phase 8: Annotations Package (` org.dataloader.annotations ` )
120123
121124| File | Status | Notes |
122125| ------| --------| -------|
123- | ` ExperimentalApi.java ` | ❌ Consider | Annotation definition |
124- | ` GuardedBy.java ` | ❌ Consider | Annotation definition |
125- | ` Internal.java ` | ❌ Consider | Annotation definition |
126- | ` PublicApi.java ` | ❌ Consider | Annotation definition |
127- | ` PublicSpi.java ` | ❌ Consider | Annotation definition |
128- | ` VisibleForTesting.java ` | ❌ Consider | Annotation definition |
126+ | ` ExperimentalApi.java ` | ⏭️ Skipped | Annotation definition doesn't need null annotations |
127+ | ` GuardedBy.java ` | ⏭️ Skipped | Annotation definition doesn't need null annotations |
128+ | ` Internal.java ` | ⏭️ Skipped | Annotation definition doesn't need null annotations |
129+ | ` PublicApi.java ` | ⏭️ Skipped | Annotation definition doesn't need null annotations |
130+ | ` PublicSpi.java ` | ⏭️ Skipped | Annotation definition doesn't need null annotations |
131+ | ` VisibleForTesting.java ` | ⏭️ Skipped | Annotation definition doesn't need null annotations |
129132
130133> ** Note** : Annotation definitions typically don't need ` @NullMarked ` unless they have methods that return potentially null values.
131134
0 commit comments