microsoftgraph / microsoftgraph/msgraph-sdk-java
Unable to message: createForward Returning Null Pointer Exception
還沒有人認領這個 Issue。
- 主要語言
- Java
- 星號
- 444
- 分支
- 154
- 平均合併
- 18 小時 28 分鐘
- 30 天內合併 PR
- 4
描述
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
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 stack trace 所在位置的 CreateForwardRequestBuilder.java 開始,並將其與 issue 中的 createForward 重現進行比較。使用 SDK 版本 6.16.0,執行 Main.java 第 97 行的 users/messages/byMessageId/createForward 呼叫。呼叫能建立草稿訊息且不拋出 NullPointerException 即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java
- 領域
- api
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100