I have an issue with proxied Maps that I'm not quite sure how to work around without changing to another type (such as Set).
I have a JSP Tag that iterates through a Map/Collection of beans and renders a customized display. The logic in the tag expects the entries in the Map to be instances of a certain class and as such tests via
Code:
// ...
Object bean = iterator.next();
if (bean instanceof MyExpectedClass) {
// ...
The problem is that this fails because
net.sf.hibernate.collection.Map$MapEntryProxy is not an instance of
MyExpectedClass. Can anyone offer some direction on this?
I can switch to using a Set instead of a Map but I would like to know how to solve the problem (or if I can) rather than just working around it without knowing what exactly is going on.
Thank-you,
David