Add nullability annotations for better Kotlin support

オープン
#140 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java, kotlin
領域
api

調査の方向性

まず、issue に記載されているとおり、パラメーターと戻り値の型を含む Delivery Client と model の public メソッドを調べます。Kotlin compiler がサポートしている nullability アノテーションを特定し、そのうえで Kotlin が nullable 型と non-null 型を推論できること、また Java の呼び出し元が適切な警告を受け取ることを確認します。

索引モデルが issue の本文から書いたものです。

説明

hacktoberfest
Motivation

The Kentico Delivery Client and its model are treated as platform types in Kotlin, which makes them harder to use and increases the possibility of accidental NullPointerExceptions.

Proposed solution

All public methods have annotations on parameters and return types so that the Kotlin compiler can correctly infer their nullability and prevent unchecked use of nullable types.
This is also an improvement for Java callers, usually tools emit a warning when nullability is handled the wrong way.

Additional context

Nullability Annotations supported by the Kotlin compiler and more info how calling Java from Kotlin works: https://kotlinlang.org/docs/java-interop.html#nullability-annotations

主要言語
Java
スター
17
フォーク
27
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

kontent-ai/java-packages のほかの issue

kontent-ai/java-packages の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。