cel-java
cel-java copied to clipboard
[BUG] CelDescriptorsUtil throwing duplicate key exception
Describe the bug CelDescriptorUtil method descriptorCollectionToMap throws duplicate key exception .
As method getFileDescriptorsForDescriptors collect unique Messagetypes for individual filedescriptors but collects all message types for multiple filedescriptors again duplicating message types in the aggregated collection . And when it tries to convert this collection to a map in descriptorCollectionToMap throws duplicate key exception .
To Reproduce I have a dynamic message with nested message types . As a fix we have collected unique filedescriptor Check which components this affects:
- [✅ ] parser
- [ ] checker
- [ ] runtime
Sample expression and input that reproduces the issue:
// sample expression string
Test setup:
// test case in java
Expected behavior When multiple filedecrptors are provided CelDescriptor should not throw duplicate key exception Additional context Add any other context about the problem here.