Refactor ThriftTests and Java8Tests to use addSourceLines instead of deprecated addSourceFile#1517
Conversation
…deprecated addSourceFile Replaces all calls to deprecated CompilationTestHelper#addSourceFile with addSourceLines, inlining the source code as text blocks. This follows the same pattern as PR uber#1426 which handled CoreTests and UnannotatedTests. Changes: - ThriftTests: Replace 1 addSourceFile call (Util.java inlined) - Java8Tests: Replace 4 addSourceFile calls (NullAwayJava8PositiveCases, NullAwayJava8NegativeCases, NullAwaySuperFunctionalInterface, NullAwayOverrideFunctionalInterfaces all inlined) - Remove @SuppressWarnings("deprecation") annotations from both classes - Delete 4 now-unused testdata files for Java8Tests Fixes uber#1425 (partial - remaining test files can be addressed in follow-up PRs)
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
💤 Files with no reviewable changes (4)
WalkthroughThis pull request refactors Java 8 and Thrift test cases by replacing deprecated Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1517 +/- ##
=========================================
Coverage 88.48% 88.48%
Complexity 2841 2841
=========================================
Files 103 103
Lines 9488 9488
Branches 1902 1902
=========================================
Hits 8395 8395
Misses 531 531
Partials 562 562 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
|
@nanookclaw we'll need you to sign the CLA to accept this change |
Summary
Follow-up to #1426, continuing the migration from deprecated
CompilationTestHelper#addSourceFiletoaddSourceLinesas described in #1425.Changes
ThriftTests.java:
addSourceFile("testdata/Util.java")call withaddSourceLines, inlining the Util.java source as a text block@SuppressWarnings("deprecation")class annotationJava8Tests.java:
addSourceFilecalls withaddSourceLines:NullAwayJava8PositiveCases.java(inlined)NullAwayJava8NegativeCases.java(inlined)NullAwaySuperFunctionalInterface.java(inlined)NullAwayOverrideFunctionalInterfaces.java(inlined)@SuppressWarnings("deprecation")class and method annotationsNotes
Util.javaresource file is not deleted — it is still referenced by-XepOpt:NullAway:CastToNonNullMethod=com.uber.nullaway.testdata.Util.castToNonNullin other test filesaddSourceFilecalls (InitializationTests, AndroidTest, FrameworkTests, CoreTests) can be addressed in follow-up PRs to keep reviews manageableFixes #1425 (partial)
Summary by CodeRabbit
Release Notes