microsoftgraph / microsoftgraph/msgraph-sdk-java

Unable to message: createForward Returning Null Pointer Exception

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

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

area:documentation type:bug
Ngôn ngữ chính
Java
Star
444
Fork
154
Merge trung bình
18 giờ 28 phút
Pull request đã merge (30 ngày)
4

Mô tả

Describe the bug

As described in documentation createForward. The code functionality is broken

It throws a Null Pointer exception

Expected behavior

the below code is expected to create a Draft message
var result = graphClient.me().messages().byMessageId("{message-id}").createForward().post(null);

How to reproduce
graphServiceClient
        .users()
        .byUserId("replace@userid.com")
        .messages()
        .byMessageId("{replace-message-id}")
        .createForward().post(null);
SDK Version

6.16.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output
Click to expand log

Exception in thread "main" java.lang.NullPointerException at java.util.Objects.requireNonNull(Objects.java:203) at com.microsoft.graph.users.item.messages.item.createforward.CreateForwardRequestBuilder.post(CreateForwardRequestBuilder.java:59) at com.microsoft.graph.users.item.messages.item.createforward.CreateForwardRequestBuilder.post(CreateForwardRequestBuilder.java:47) at org.example.Main.main(Main.java:97)

Configuration

No response

Other information

No response

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.

Hướng nghiên cứu

Bắt đầu với CreateForwardRequestBuilder.java tại vị trí trong stack trace và so sánh nó với phần tái hiện createForward trong issue. Chạy lời gọi users/messages/byMessageId/createForward từ dòng 97 của Main.java bằng SDK phiên bản 6.16.0. Được coi là hoàn tất khi lời gọi tạo một thư nháp mà không ném ra NullPointerException.

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
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

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.