modelcontextprotocol / modelcontextprotocol/java-sdk
Migrate null annotations to jspecify
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 3.7k
- Fork
- 1.1k
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 9
Mô tả
Currently, the sdk uses Reactor's reactor.util.annotation.Nullable annotations, such as here
This is causing warnings in my downstream build since that type refers to javax classes I don't have on the classpath.
This is Reactor Nullable, along with its imports:
import javax.annotation.Nonnull;
import javax.annotation.meta.TypeQualifierNickname;
import javax.annotation.meta.When;
@Nonnull(when = When.MAYBE)
@TypeQualifierNickname
@Deprecated
public @interface Nullable {
}
The Reactor type is now deprecated, and they recommend you using JSpecify which is fast becoming the standard, if it is not already.
I can possibly submit a PR for this, but I notice a lot of PRs opened recently have limited activity, so will wait for the go-ahead first.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với mcp-core/src/main/java/io/modelcontextprotocol/util/Assert.java và tìm kiếm trong repository reactor.util.annotation.Nullable cùng các annotation null liên quan của Reactor. Kiểm tra cấu hình build để tìm dependency JSpecify, sau đó xác minh rằng tất cả các annotation liên quan đều sử dụng JSpecify và SDK có thể được build mà không yêu cầu các lớp annotation javax.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- api, backend
- Loại issue
- Tái cấu trúc
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 68/100