[jboss-user] [JBossCache] - Error using objects as Fqn's in PojoCache
rogue_one
do-not-reply at jboss.com
Wed Nov 15 12:07:31 EST 2006
I have a possible bug in JBoss Cache, but I'm not sure...
I'm using Objects (not Strings) as Fqn's, in a PojoCache, and later, calling the PojoCache.findObjects() method, I obtain a ClassCastException. Diving into code, I watch this (in TreeCacheAopDelegate.java):
| protected void findChildObjects(Fqn fqn, Map map) throws CacheException
| {
| // We need to traverse then
| Set set = cache_.getChildrenNames(fqn);
| if(set == null) return; // We stop here.
| Iterator it = set.iterator();
| while(it.hasNext())
| {
| String obj = (String)it.next();
| Fqn newFqn = new Fqn(fqn, obj);
|
| Object pojo = _getObject(newFqn);
| if(pojo != null)
| {
| map.put(newFqn, pojo);
| } else
| {
| findChildObjects(newFqn, map);
| }
| }
| }
|
The objects contained in the set (which is the result of getChildrenNames() function) aren't Strings, so the cast to String fails.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986221#3986221
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986221
More information about the jboss-user
mailing list