Skip to content

Commit 56bd5ad

Browse files
authored
Migrate InitializationTests to addSourceLines (#1694)
## Summary - replace the deprecated `addSourceFile` calls in `InitializationTests` with inline `addSourceLines` text blocks - factor the shared `Util.java` source into a helper, as requested in the issue discussion - remove the four testdata files that are no longer referenced and the obsolete class-level deprecation suppression Part of #1425. ## Testing - `./gradlew :nullaway:spotlessJavaApply -Pspotless.ratchet.from=HEAD` - `./gradlew :nullaway:test --tests "com.uber.nullaway.InitializationTests"` ## AI usage disclosure > I used OpenAI Codex to help identify the affected calls, migrate the existing test sources into text blocks, factor the shared source in response to maintainer feedback, run formatting and targeted tests, and draft this PR description. I personally reviewed the full diff and attest that I have read and understood all changes in this PR. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Consolidated initialization and read-before-initialization scenarios directly into the test suite. * Expanded coverage for field and static initialization, initializer methods, framework annotations, suppression, nested classes, casts, assertions, and early field reads. * Removed redundant external test fixtures while preserving and broadening diagnostic coverage. * Improved consistency and maintainability of initialization-related validation. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent f3f7c9b commit 56bd5ad

5 files changed

Lines changed: 1020 additions & 1049 deletions

File tree

0 commit comments

Comments
 (0)