microsoftgraph / microsoftgraph/msgraph-sdk-java
"java.lang.IllegalArgumentException: Collection is empty" when calling `lastEstimateStatisticsOperation`
Chưa có ai nhận issue này.
- 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
I'm fetching Search estimate statistics in Purview using the following call:
EdiscoveryEstimateOperation estimateOperation = client.security()
.cases()
.ediscoveryCases()
.byEdiscoveryCaseId(caseId)
.searches()
.byEdiscoverySearchId(searchId)
.lastEstimateStatisticsOperation()
.get();
This consistently fails with the following error:
java.lang.IllegalArgumentException: Collection is empty
at java.base/java.util.EnumSet.copyOf(EnumSet.java:177)
at com.microsoft.kiota.serialization.JsonParseNode.getEnumSetValue(JsonParseNode.java:257)
at com.microsoft.graph.beta.models.security.EdiscoveryEstimateOperation.lambda$getFieldDeserializers$6(EdiscoveryEstimateOperation.java:41)
at com.microsoft.kiota.serialization.JsonParseNode.assignFieldValues(JsonParseNode.java:280)
at com.microsoft.kiota.serialization.JsonParseNode.getObjectValue(JsonParseNode.java:192)
at com.microsoft.kiota.http.OkHttpRequestAdapter.send(OkHttpRequestAdapter.java:322)
at com.microsoft.graph.beta.security.cases.ediscoverycases.item.searches.item.lastestimatestatisticsoperation.LastEstimateStatisticsOperationRequestBuilder.get(LastEstimateStatisticsOperationRequestBuilder.java:61)
at com.microsoft.graph.beta.security.cases.ediscoverycases.item.searches.item.lastestimatestatisticsoperation.LastEstimateStatisticsOperationRequestBuilder.get(LastEstimateStatisticsOperationRequestBuilder.java:47)
It seems like response deserialization isn't working correctly, probably for the statisticsOptions field? It might be relevant that there doesn't seem to be any way to specify statisticsOptions when triggering statistics generation through the API.
Expected behavior
I expect this SDK call to successfully return an EdiscoveryEstimateOperation for the given search.
How to reproduce
I'm starting statistics generation with the following call:
client.security()
.cases()
.ediscoveryCases()
.byEdiscoveryCaseId(caseId)
.searches()
.byEdiscoverySearchId(searchId)
.microsoftGraphSecurityEstimateStatistics()
.post();
Fetching statistics with the call listed above then triggers the bug.
SDK Version
beta 6.61.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
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 trình giải tuần tự hóa được tạo của EdiscoveryEstimateOperation tại EdiscoveryEstimateOperation.java:41 và theo dõi JsonParseNode.getEnumSetValue, sử dụng reported lastEstimateStatisticsOperation request làm bản tái hiện. So sánh việc xử lý phản hồi cho statisticsOptions với API response và thêm hoặc cập nhật một bài kiểm thử giải tuần tự hóa tập trung nếu repository có cung cấp. Được xem là hoàn tất khi lệnh gọi trả về một EdiscoveryEstimateOperation mà không gặp ngoại lệ collection rỗng.
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
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 55/100