Query engine cannot handle enums with constants that have overridden methods #21800
Labels
Module: Serialization
Source: Community
PR or issue was opened by a community user
Team: Core
Type: Defect
Milestone
If I have an enum class such as the following:
Hazelcast will fail if I query against an attribute of this enum on any cache entry that has a value of VAL1 (with the overridden method):
For an enum constant with an overridden method, the compiler creates an anonymous class that extends the enum's class and this anonymous class returns false for Class.isEnum().
com.hazelcast.query.impl.getters.ReflectionHelper.getAttributeType( Class klass ) makes use of isEnum. Maybe it should use Enum.isAssignableFrom( klass ).
The text was updated successfully, but these errors were encountered: