CachingStateRepository not working with JSF integration. #56
Comments
#56 - hashCode and equals for NamedFeature
Although this issue should be fixed with the commit referenced above, I'll keep this issue open. I'll have a deeper look at the problem and perhaps add some tests covering the fix. |
The same issue exists for the JSP integration as well. I haven't checked if the above commit fixes the issue for JSP - just giving a heads up. |
Hey all, I just had a deeper look at this issue. I refactored the repository to use the unique name of a feature instead of the feature itself as the cache key. I think this is the only way to work around this issue because the repository may be called with either the feature enum value itself or with a I think it should work fine now. Thank you both for bringing this up and for helping to fix this issue. :) |
Makes perfect sense! Thanks for looking into this. |
When implementing a CachingStateRepository I noticed the JSF integration didn't seem to be caching properly. When using the "features" managed bean, a Feature is represented by a NamedFeature. Since NamedFeature doesn't override hashcode() or equals(), it isn't suitable for a key in the cache map.
The text was updated successfully, but these errors were encountered: