"java.lang.IllegalArgumentException: Collection is empty" when calling `lastEstimateStatisticsOperation`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start with the generated EdiscoveryEstimateOperation deserializer at EdiscoveryEstimateOperation.java:41 and trace JsonParseNode.getEnumSetValue, using the reported lastEstimateStatisticsOperation request as the reproduction. Compare the response handling for statisticsOptions with the API response and add or update a focused deserialization test if the repository provides one. Done means the call returns an EdiscoveryEstimateOperation without the empty-collection exception.
Written by the indexing model from the issue text.
Description
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_
- Dominant language
- Java
- Stars
- 444
- Forks
- 154
- Avg merge
- 18h 28m
- Merged PRs (30d)
- 4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoftgraph/msgraph-sdk-java
-
status:waiting-for-triage type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoftgraph/msgraph-sdk-java#2610 ·
-
status:waiting-for-triage type:bug
Difficulty 4/5 3-5 days Newbie friendliness 38/100
microsoftgraph/msgraph-sdk-java#2654 ·
-
status:waiting-for-triage
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoftgraph/msgraph-sdk-java#2639 ·
-
status:waiting-for-triage type:bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
microsoftgraph/msgraph-sdk-java#2589 · 1 comment ·
-
status:waiting-for-triage type:bug
Difficulty 3/5 1-2 days Newbie friendliness 68/100
microsoftgraph/msgraph-sdk-java#2587 ·
All issues in microsoftgraph/msgraph-sdk-java
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Openbug frontend maui-pilot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/eo-graphs#74 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100