Index: modules/beans/src/main/java/java/beans/PropertyDescriptor.java =================================================================== --- modules/beans/src/main/java/java/beans/PropertyDescriptor.java.orig 2006-03-22 20:11:58.000000000 +0000 +++ modules/beans/src/main/java/java/beans/PropertyDescriptor.java 2006-03-24 13:09:28.000000000 +0000 @@ -71,7 +71,7 @@ public PropertyDescriptor(String propertyName, Method getter, Method setter) throws IntrospectionException { super(); - if (propertyName == null) + if (propertyName == null || propertyName.length() == 0) throw new IntrospectionException("bad property name"); this.propertyName = propertyName; Index: modules/beans/src/test/java/org/apache/harmony/tests/beans/PropertyDescriptorTest.java =================================================================== --- modules/beans/src/test/java/org/apache/harmony/tests/beans/PropertyDescriptorTest.java.orig 2006-03-22 20:11:58.000000000 +0000 +++ modules/beans/src/test/java/org/apache/harmony/tests/beans/PropertyDescriptorTest.java 2006-03-24 13:06:49.000000000 +0000 @@ -60,6 +60,13 @@ } catch (IntrospectionException e) { assertEquals("bad property name", e.getMessage()); } + try { + PropertyDescriptor pd = new PropertyDescriptor("",null,null); + fail("Constructor PropertyDescriptor(\"\",null,null) should "+ + "throw IntrospectionException"); + } catch (IntrospectionException e) { + assertEquals("bad property name", e.getMessage()); + } } }