fix: add JSpecify @Nullable annotations for accurate null contracts#115
fix: add JSpecify @Nullable annotations for accurate null contracts#115adityamparikh wants to merge 7 commits into
Conversation
Add @nullable annotations from org.jspecify.annotations to all locations where null is a legitimate value, fixing the mismatch between the @NullMarked package declaration and actual null usage. This enables NullAway to accurately detect null-safety violations. Annotated locations: - Dtos.java: SolrMetrics (cacheStats, handlerStats), IndexStats (segmentCount), QueryStats (maxScore), CacheStats (all caches), HandlerStats (both handlers), HandlerInfo (errors, timeouts, totalTime, avgTimePerRequest, avgRequestsPerSecond), SolrHealthStatus (errorMessage, responseTime, totalDocuments, solrVersion, status) - CollectionService.java: getCacheMetrics(), getHandlerMetrics(), fetchCacheMetrics(), fetchHandlerMetrics(), fetchMetrics(), fetchFlatHandlerInfo(), extractFlatHandlerInfo(), extractSingleCacheInfo(), extractCollectionName(), createCollection() optional parameters - CollectionUtils.java: getLong(), getFloat(), getInteger() return types - SearchResponse.java: maxScore - SearchService.java: search() optional parameters Closes #6 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: adityamparikh <[email protected]>
|
@adityamparikh I updated this PR for the new |
The JDK 25 HttpClient's HTTP/2 transport intermittently closes reused connections with java.io.EOFException against Solr/Jetty, causing test flakiness (observed in SearchServiceIntegrationTest.testSpecialCharactersInQuery on CI). HTTP/2 multiplexing is not needed for our usage; force HTTP/1.1 on HttpJdkSolrClient via useHttp1_1(true) for deterministic behavior. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> Signed-off-by: adityamparikh <[email protected]>
|
Closing as superseded by #133, which is a strict superset for the JSpecify rollout: all Note: the |
Summary
@Nullableannotations from JSpecify to all locations where null is a legitimate value@NullMarkedpackage declaration and actual null usageTest plan
./gradlew buildpasses (including NullAway checks)./gradlew nativeTest -Pnativepasses (119/119 tests)🤖 Generated with Claude Code