Description
After set more than one path in Introspector.setBeanInfoSearchPath(String[]),
if there are some classes with the same class name but in different package,
Introspector.getBeanInfo(Class) will get wrong BeanInfo.
The getBeanInfo will return the BeanInfo of the first found class regardless with its package.
===== Test ======
public class IntrospectorTest extends TestCase {
public void testsetBeanInfoSearchPath() throws IntrospectionException {
Introspector.setBeanInfoSearchPath(new String[]
);
BeanInfo beanInfo = Introspector.getBeanInfo(MockSubject.class);
BeanDescriptor beanDesc = beanInfo.getBeanDescriptor();
assertEquals(beanDesc.getName(), "mockbeans1");
assertEquals(beanDesc.getBeanClass(), MockSubject.class);
}
}