Index: src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyDescriptorTest.java =================================================================== --- src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyDescriptorTest.java (revision 453254) +++ src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyDescriptorTest.java (working copy) @@ -53,6 +53,19 @@ assertFalse(pd.equals(null)); } + // Regression test for H-1763 + public void testEqualsRegression1763() throws IntrospectionException { + String propertyName = "PropertyOne"; + Class beanClass = MockJavaBean.class; + PropertyDescriptor pd = new PropertyDescriptor(propertyName, beanClass); + + try { + pd.equals(propertyName); + } catch (ClassCastException e) { + fail("Equals throws ClassCastException"); + } + } + public void testEquals_ReadMethod() throws IntrospectionException, SecurityException, NoSuchMethodException { String propertyName = "PropertyOne";