Open Source
microsoft/kiota-java
Microsoft Kiota Java
Deserializing a Microsoft Graph enum set threw an exception when every value was unknown to the SDK.
PR #2246Root Cause
The JSON parser filtered unknown values out and passed the resulting empty list to EnumSet.copyOf, which cannot infer an enum type from an empty list.
Fix
Returned null for unknown-only sets to preserve the parser's empty-input behavior. Mixed sets still retain all recognized values.
Regression Tests
Added regression tests for unknown-only and mixed sets. The JSON module passed 40 tests, Spotless, and SpotBugs.