Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Feat]: Clarify nullability and optionality of the spec API

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

メンテナーはふだん 1 日以内に返信

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

評価

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

調査の方向性

spec モジュールの Task クラスと TaskStatus クラスを調査し、現在の nullability パターンを理解します。spec API の設計原則と一貫性ルールを確認します。どのフィールドを Optional にすべきか、どのコレクションをデフォルトで空にすべきかを判断します。クラスを更新し、後方互換性を確保して、Javadoc を適宜修正します。

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

説明

Is your feature request related to a problem? Please describe.

The spec API is not consistent with this expectation for the nullability and optionality of objects.

For example, the Task class
will always instantiate its history and artifact with (potentially empty) collections while its metatada can be null.
The API should be consistent unless there is a good reason not to.
In that case, the metadata should also be an empty Map if the parameter is null.

For case where we want to record that a field can have a value or be null, we could also leverage Optional.
For example, in TaskStatus, the message is optional. We could make its type Optional<String> to constrain its contract.

Describe the solution you'd like

Update the spec API to:

  • be consistent with the nullabitity of fields (especially collections)
  • use the Optional type for optional fields
  • update the javadoc when there is exception to this general rule
Describe alternatives you've considered

No response

Additional context

No response

Code of Conduct
  • I agree to follow this project's Code of Conduct
主要言語
Java
スター
505
フォーク
185
平均マージ
1日 9時間
マージ済み PR(30日)
25

環境構築

はじめの一歩

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

a2aproject/a2a-java のほかの issue

a2aproject/a2a-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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