Index: tests/functional/src/test/functional/org/apache/harmony/test/func/api/java/beans/introspector/location/LocationTest.java
===================================================================
--- tests/functional/src/test/functional/org/apache/harmony/test/func/api/java/beans/introspector/location/LocationTest.java (revision 552461)
+++ tests/functional/src/test/functional/org/apache/harmony/test/func/api/java/beans/introspector/location/LocationTest.java (working copy)
@@ -131,7 +131,6 @@
*
Get beanInfo using method Introspector.getBeanInfo(bean#2).
* Verify that getPropertyDescriptors() of returned beanInfo and
* getPropertyDescriptors() of beanInfo#2 return the same.
- * Verify that getPropertyDescriptors() of beanInfo#1 wasn't invoke.
*/
public Result testUseOnlyImmediateBeanInfo() {
try {
@@ -140,7 +139,7 @@
org.apache.harmony.test.func.api.java.beans.introspector.location.beans.subclasses.Bean2.class)
.getPropertyDescriptors();
verifyProperties(new String[] { "property2" });
- verifyThatOnlyThisBeanInvoked(org.apache.harmony.test.func.api.java.beans.introspector.location.beans.subclasses.Bean2BeanInfo.class);
+ verifyThatBeanInfoInvoked(org.apache.harmony.test.func.api.java.beans.introspector.location.beans.subclasses.Bean2BeanInfo.class);
return passed();
} catch (Exception e) {
e.printStackTrace();
@@ -382,32 +381,20 @@
/**
* Verify that getBeanInfo(Class beanClass, Class stopClass) method
- * introspects a bean, as if getBeanInfo(Class beanClass) method introspects
- * the bean, if stopClass isn't parent, child and the same bean.
- *
- * Step-by-step decoding:
- *
- * - Create a bean#1.
- *
- Create another bean#2, which isn't parent, child of bean.
- *
- Create beanInfo in package of the bean#1 and redefine
- * getPropertyDescriptors() method.
- *
- Get beanInfo using method Introspector.getBeanInfo(bean#1,bean#2).
- *
- Verify that getPropertyDescriptors() of returned beanInfo and
- * getPropertyDescriptors() of beanInfo created in item#3 return the same.
+ * thtows java.beans.IntrospectionException
+ * if stopClass is not parent of beanClass.
*/
public Result testStopClassIsNotParentBean() {
try {
- propertyDescriptors = Introspector
+ BeanInfo bi = Introspector
.getBeanInfo(
org.apache.harmony.test.func.api.java.beans.introspector.location.beans.thesamepackage.Bean1.class,
- org.apache.harmony.test.func.api.java.beans.introspector.location.beans.differentlocation.p1.Bean1.class)
- .getPropertyDescriptors();
- verifyProperties(new String[] { "property1" });
- verifyThatOnlyThisBeanInvoked(org.apache.harmony.test.func.api.java.beans.introspector.location.beans.thesamepackage.Bean1BeanInfo.class);
+ org.apache.harmony.test.func.api.java.beans.introspector.location.beans.differentlocation.p1.Bean1.class);
+ return failed("no expected IntrospectionException");
+ } catch (java.beans.IntrospectionException e) {
return passed();
- } catch (Exception e) {
- e.printStackTrace();
- return failed(e.toString());
+ } catch (Throwable t) {
+ return failed(t.toString());
} finally {
clean();
}