adityamparikh opened a new pull request, #179: URL: https://github.com/apache/solr-mcp/pull/179
> **Stacked on #133** — please merge that first. Until it lands, the diff below > also shows #133's commits. Once #133 is in, this PR reduces to the six > `src/test/.../package-info.java` files. ## Why `@NullMarked` on a `package-info.java` applies to **that package only** — Java packages are not hierarchical for annotation purposes. Combined with `NullAway:OnlyNullMarked=true`, an unmarked package is exempt from nullness checking even though NullAway is configured at `error` level. #133 marks every main package plus two test packages (`containerization`, `observability`). This adds the **six that are still unmarked**, so the opt-in is uniform across main and test: - `org.apache.solr.mcp.server` (test root) - `org.apache.solr.mcp.server.collection` - `org.apache.solr.mcp.server.config` - `org.apache.solr.mcp.server.indexing` - `org.apache.solr.mcp.server.schema` - `org.apache.solr.mcp.server.search` That takes the test tree from 2/8 packages marked to 8/8. ## Scope Purely declarative. NullAway remains disabled on `compileTestJava` (see the comment #133 adds to `build.gradle.kts`), so these files change no compilation outcome today — they make the opt-in complete and consistent, so that enabling test-side enforcement later is a one-line change rather than a rediscovery of which packages were missed. For sizing the follow-up: flipping that one line on this branch surfaces **48 NullAway errors across 14 test files**, measured by temporarily replacing the `compileTestJava` disable and running `./gradlew compileTestJava --rerun-tasks`. The `~30` in #133's new `build.gradle.kts` comment is an under-estimate — worth correcting there, but left alone here so this PR stays additive-only. Each site is a test unboxing or dereferencing a value that production code declares `@Nullable` (metrics fields that are null when a Solr endpoint is unavailable). They're mechanical to fix — extract a local, `assertNotNull` — but 48 of them is its own PR, not a rider on this one. ## Testing `./gradlew build` passes on this branch (JDK 25, Testcontainers) — full suite green, `spotlessApply` reports no reformatting. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
