JSONTokener should implement java.io.Closeable

Đang mở
#718 9 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
backend-api-design

Hướng nghiên cứu

Start by locating JSONTokener and its Reader and InputStream constructors, then review how those inputs are retained. Done means JSONTokener implements java.io.Closeable and closing it closes the supplied reader or stream while preserving Java 6 compatibility.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

No changes at this time

While JSONTokener(java.io.Reader) and JSONTokener(java.io.InputStream) constructors have explicit notes about JSONTokener not closing the reader/stream, I’d like to have it close the reader/stream. Implementing java.io.Closeable isn’t backward-incompatible (if the library user doesn’t explicitly close it, nothing happens), and for those who use try-with-resources construct, having to keep a separate reference for the reader/stream is a pain. Although try-with-resources itself is Java 7+, the java.io.Closeable interface is @since 1.5, so implementing the interface can be done without losing Java 6 compatibility.

Ngôn ngữ chính
Java
Star
4.7k
Fork
2.6k
Merge trung bình
11 ngày 18 phút
Pull request đã merge (30 ngày)
1

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của stleary/JSON-java

Tất cả issue của stleary/JSON-java

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.