AbstractManagedObjectFactory doesn't compile and even if it did, it would loop
------------------------------------------------------------------------------
Key: JBMAN-18
URL:
https://jira.jboss.org/jira/browse/JBMAN-18
Project: JBoss Managed
Issue Type: Bug
Components: managedobject
Reporter: Adrian Brock
Assignee: Adrian Brock
Fix For: JBossMan.2.0.0.CR1
AbstractManagedObjectFactory doesn't compile
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
/home/ejort/jboss-man/managed/src/main/java/org/jboss/managed/plugins/factory/AbstractManagedObjectFactory.java:[750,40]
incomparable types: java.lang.Class<T> and java.lang.Class<java.lang.Object>
Even if it did, it would loop forever if it doesn't find the InstanceClassFactory
@SuppressWarnings("unchecked")
public <T extends Serializable> InstanceClassFactory<T>
getInstanceClassFactory(Class<T> clazz)
{
synchronized (instanceFactories)
{
Class<?> c = clazz;
InstanceClassFactory factory = instanceFactories.get(c);
- while(factory == null && clazz != Object.class)
+ while(factory == null && c != Object.class)
{
c = c.getSuperclass();
factory = instanceFactories.get(c);
}
if (factory != null)
return factory;
}
InstanceClassFactory<T> factory = (InstanceClassFactory<T>)
defaultInstanceFactory;
return factory;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira