Skip to content

Commit bafc499

Browse files
committed
Update converting-to-kotlin.md
A recommendation for addressing "Missing null annotation" warnings before initiating automatic conversion has been included in the "Converting to Kotlin" documentation.
1 parent f66f762 commit bafc499

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

docs/converting-to-kotlin.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ When converting a file from Java to Kotlin, ensure you enable this option in And
1616

1717
**Reason**: Enabling this option helps the reviewer perform a diff on the second commit, showing precisely what changes occurred between the Java and Kotlin files. Otherwise, the PR will display a file deletion (`.java` file) and a file addition (`.kt` file), making it challenging for the reviewer to diff effectively.
1818

19+
### Consider adding nullability annotations before initiating automatic conversion:
20+
21+
Address the warnings of "Missing null annotation" before starting automatic conversion.
22+
23+
**Reason:** This makes automatic conversion to handle nullability instead of setting everything to nullable.
24+
1925
### Depend on automatic conversion and commit immediately:
2026

2127
When performing the conversion, rely on the automatic conversion tools and commit the changes promptly, even if the resulting Kotlin code doesn't compile. Subsequently, on another commit, you can refine the Kotlin code, making it more idiomatic or addressing any compilation issues, such as adding nullable checks (`!!` or `let`).

0 commit comments

Comments
 (0)