microsoftgraph / microsoftgraph/msgraph-sdk-java
"java.lang.IllegalArgumentException: Collection is empty" when calling `lastEstimateStatisticsOperation`
Personne n'a encore pris cette issue.
- Langage dominant
- Java
- Étoiles
- 444
- Forks
- 154
- Merge moyen
- 18 h 28 min
- PR mergées (30 j)
- 4
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_
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par le désérialiseur généré de EdiscoveryEstimateOperation dans EdiscoveryEstimateOperation.java:41 et suivez JsonParseNode.getEnumSetValue, en utilisant la reported lastEstimateStatisticsOperation request comme reproduction. Comparez le traitement de la réponse pour statisticsOptions avec la API response et ajoutez ou mettez à jour un test de désérialisation ciblé si le dépôt en fournit un. C’est terminé lorsque l’appel renvoie un EdiscoveryEstimateOperation sans l’exception de collection vide.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- api
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 55/100