-
Notifications
You must be signed in to change notification settings - Fork 483
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid class cast exceptions in array and enum converters
If a ParameterizedType was passed to ArrayTypeConverterFactory or EnumTypeConverterFactory, a ClassCastException would be thrown when it attempted to unconditionally cast it to Class; update the factories to handle this more gracefully by just returning Optional.empty(). Additionally, update ArrayTypeConverterFactory to handle arrays of primitives, and add unit tests for Enums, arrays, and collections.
- Loading branch information
Showing
4 changed files
with
126 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters