JDK-4910242 : REGRESSION: 5 JCK1.5-runtime api/java_beans/PropertyDescriptor/... tests fail
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.beans
  • Affected Version: 5.0
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,linux,windows_2003
  • CPU: generic,x86
  • Submitted: 2003-08-21
  • Updated: 2003-09-18
  • Resolved: 2003-09-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 tigerFixed
Related Reports
Duplicate :  
Relates :  
Description

Name: mmR10223			Date: 08/21/2003


Filed By       : J2SE-SQA [###@###.###
JDK            : JDK1.5.0-b15 (pass using JDK1.5.0-b14, JDK1.4.2-b28 )
JCK            : JCK1.5-runtime (b02)
Platform[s]    : all
switch/Mode    : default
JCK test owner : http://javaweb.eng/jck/usr/owners.jto
Falling test[s]: 
        api/java_beans/PropertyDescriptor/descriptions.html#Ctor2 [PropertyDescriptor0004, PropertyDescriptor0005, PropertyDescriptor2036, PropertyDescriptor2037, PropertyDescriptor2038, PropertyDescriptor2039, PropertyDescriptor2040, PropertyDescriptor2041, PropertyDescriptor2042, PropertyDescriptor2043, PropertyDescriptor2044, PropertyDescriptor2045, PropertyDescriptor2046, PropertyDescriptor2047, PropertyDescriptor2048, PropertyDescriptor2049, PropertyDescriptor2050, PropertyDescriptor2051, PropertyDescriptor2052, PropertyDescriptor2053, PropertyDescriptor2054, PropertyDescriptor2055, PropertyDescriptor2056, PropertyDescriptor2057, PropertyDescriptor2058, PropertyDescriptor2059, PropertyDescriptor2060, PropertyDescriptor2061, PropertyDescriptor2062, PropertyDescriptor2063, PropertyDescriptor1004, PropertyDescriptor1005]
        api/java_beans/PropertyDescriptor/descriptions.html#Ctor3 [PropertyDescriptor2066, PropertyDescriptor2067, PropertyDescriptor2068, PropertyDescriptor2069, PropertyDescriptor2070]
        api/java_beans/PropertyDescriptor/descriptions.html#getXXX [PropertyDescriptor2075, PropertyDescriptor2076, PropertyDescriptor2077, PropertyDescriptor2079, PropertyDescriptor2080, PropertyDescriptor2081]
	api/java_beans/PropertyDescriptor/descriptions.html#Equals [PropertyDescriptor2087]
	api/java_beans/IndexedPropertyDescriptor/descriptions.html#Ctor1 [IndexedPropertyDescriptor0002, IndexedPropertyDescriptor2002, IndexedPropertyDescriptor2003, IndexedPropertyDescriptor2004, IndexedPropertyDescriptor2005, IndexedPropertyDescriptor2006, IndexedPropertyDescriptor2007, IndexedPropertyDescriptor2008, IndexedPropertyDescriptor2009, IndexedPropertyDescriptor2010, IndexedPropertyDescriptor2011, IndexedPropertyDescriptor2012, IndexedPropertyDescriptor2013]

Test source location:
=====================
/java/re/jck/1.5/promoted/latest/binaries/JCK-runtime-5/tests/api/java_beans/PropertyDescriptor/Ctor2Tests.java
/java/re/jck/1.5/promoted/latest/binaries/JCK-runtime-5/tests/api/java_beans/PropertyDescriptor/Ctor3Tests.java
/java/re/jck/1.5/promoted/latest/binaries/JCK-runtime-5/tests/api/java_beans/PropertyDescriptor/getXXXTests.java
/java/re/jck/1.5/promoted/latest/binaries/JCK-runtime-5/tests/api/java_beans/PropertyDescriptor/EqualsTests.java
/java/re/jck/1.5/promoted/latest/binaries/JCK-runtime-5/tests/api/java_beans/IndexedPropertyDescriptor/Ctor1Tests.java


jtr file location:
==================
/net/jtgb4u4c.sfbay/export/sail15/results.2/tiger/b15/jck15/sparc/sol10_sparc_gnome_client_d64_enablesystemassertions_linux-8/workDir/api/java_beans/PropertyDescriptor/descriptions_getXXX.jtr
/net/jtgb4u4c.sfbay/export/sail15/results.2/tiger/b15/jck15/sparc/sol10_sparc_gnome_client_d64_enablesystemassertions_linux-8/workDir/api/java_beans/PropertyDescriptor/descriptions_Ctor3.jtr
/net/jtgb4u4c.sfbay/export/sail15/results.2/tiger/b15/jck15/sparc/sol10_sparc_gnome_client_d64_enablesystemassertions_linux-8/workDir/api/java_beans/PropertyDescriptor/descriptions_Ctor2.jtr
/net/jtgb4u4c.sfbay/export/sail15/results.2/tiger/b15/jck15/sparc/sol10_sparc_gnome_client_d64_enablesystemassertions_linux-8/workDir/api/java_beans/PropertyDescriptor/descriptions_Equals.jtr
/net/jtgb4u4c.sfbay/export/sail15/results.2/tiger/b15/jck15/sparc/sol10_sparc_gnome_client_d64_enablesystemassertions_linux-8/workDir/api/java_beans/IndexedPropertyDescriptor/descriptions_Ctor1.jtr

How to reproduce:
=================
Run the following script (you may need to change its variables)
 
--- script start ---
#!/bin/bash

JCK="/java/re/jck/1.5/promoted/latest/binaries/JCK-runtime-15"
JDK="/java/re/jdk/1.5.0/promoted/latest/binaries/solaris-sparc"
CLASSPATH="$JCK/classes:$JCK/lib/javatest.jar"
 
$JDK/bin/java $switches -cp $CLASSPATH javasoft.sqe.tests.api.java.beans.PropertyDescriptor.Ctor2Tests -TestCaseID PropertyDescriptor0004 PropertyDescriptor0005 PropertyDescriptor1004 PropertyDescriptor1005 PropertyDescriptor2036 PropertyDescriptor2037 PropertyDescriptor2038 PropertyDescriptor2039 PropertyDescriptor2040 PropertyDescriptor2041 PropertyDescriptor2042 PropertyDescriptor2043 PropertyDescriptor2044 PropertyDescriptor2045 PropertyDescriptor2046 PropertyDescriptor2047 PropertyDescriptor2048 PropertyDescriptor2049 PropertyDescriptor2050 PropertyDescriptor2051 PropertyDescriptor2052 PropertyDescriptor2053 PropertyDescriptor2054 PropertyDescriptor2055 PropertyDescriptor2056 PropertyDescriptor2057 PropertyDescriptor2058 PropertyDescriptor2059 PropertyDescriptor2060 PropertyDescriptor2061 PropertyDescriptor2062 PropertyDescriptor2063
--- script end ---

Test output:
============
PropertyDescriptor0004: Failed. PropertyDescriptor0004failed
javasoft.sqe.tests.api.java.beans.util.BadStatus: Equality test failed on "propertyType is Color"
	at javasoft.sqe.tests.api.java.beans.PropertyDescriptor.Ctor2Tests.assertEqual(Ctor2Tests.java:93)
	at javasoft.sqe.tests.api.java.beans.PropertyDescriptor.Ctor2Tests.PropertyDescriptor0005(Ctor2Tests.java:225)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:399)
	at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
	at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:127)
	at javasoft.sqe.tests.api.java.beans.PropertyDescriptor.Ctor2Tests.main(Ctor2Tests.java:126)
PropertyDescriptor0005: Failed. Test case throws exception: javasoft.sqe.tests.api.java.beans.util.BadStatus: Equality test failed on "propertyType is Color"
PropertyDescriptor2036: Failed. PropertyDescriptor2036 failed
PropertyDescriptor2037: Failed. PropertyDescriptor2037 failed
PropertyDescriptor2038: Failed. PropertyDescriptor2038 failed
PropertyDescriptor2039: Failed. PropertyDescriptor2039 failed
PropertyDescriptor2040: Failed. PropertyDescriptor2040 failed
PropertyDescriptor2041: Failed. PropertyDescriptor2041 failed
PropertyDescriptor2042: Failed. PropertyDescriptor2042 failed
PropertyDescriptor2043: Failed. PropertyDescriptor2043 failed
PropertyDescriptor2044: Failed. PropertyDescriptor2044 failed
PropertyDescriptor2045: Failed. PropertyDescriptor2045 failed(2)
PropertyDescriptor2046: Failed. PropertyDescriptor2046 failed(2)
PropertyDescriptor2047: Failed. PropertyDescriptor2047 failed(2)
PropertyDescriptor2048: Failed. PropertyDescriptor2048 failed(2)
PropertyDescriptor2049: Failed. PropertyDescriptor2049 failed(2)
PropertyDescriptor2050: Failed. PropertyDescriptor2050 failed(2)
PropertyDescriptor2051: Failed. PropertyDescriptor2051 failed(2)
PropertyDescriptor2052: Failed. PropertyDescriptor2052 failed(2)
PropertyDescriptor2053: Failed. PropertyDescriptor2053 failed
PropertyDescriptor2054: Failed. PropertyDescriptor2054 failed
PropertyDescriptor2055: Failed. PropertyDescriptor2055 failed
PropertyDescriptor2056: Failed. PropertyDescriptor2056 failed
PropertyDescriptor2057: Failed. PropertyDescriptor2057 failed
PropertyDescriptor2058: Failed. PropertyDescriptor2058 failed
PropertyDescriptor2059: Failed. PropertyDescriptor2059 failed(2)
PropertyDescriptor2060: Failed. PropertyDescriptor2060 failed(2)
PropertyDescriptor2061: Failed. PropertyDescriptor2061 failed(2)
PropertyDescriptor2062: Failed. PropertyDescriptor2062 failed(2)
PropertyDescriptor2063: Failed. PropertyDescriptor2063 failed(2)
PropertyDescriptor1004: Failed. PropertyDescriptor1004 failed
PropertyDescriptor1005: Failed. PropertyDescriptor1005 failed

Specific machine info:
======================
Hostname: linux-19
OS: Windows 2003
Hostname: linux-2
OS: Suse Linux 8.2 (GNOME2)
Hostname: linux-8
OS: Solaris 10 (sparc) (GNOME)


======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b19 VERIFIED IN: tiger
14-06-2004

SUGGESTED FIX The method names PropertyDescriptor constructor shold fetch the methods.
11-06-2004

EVALUATION This is related to the massive changes that took place as part of 4809008. All of these test will throw a null value or empty string is passed into the constructor. Unfortunately, the API is vague about the conditions in which an IntrospectionException will be thrown but the JCK tests tests specifically for values and basis the correctness of the API on these tests. Previously, the Introspector.findMethod would be the root cause of all these IntrospectionExceptions but now that the method is fetched lazily, it will not longer throw the exception when it has been constructed. PropertyDescriptor0004: The PropertyDescriptor ctor no longer throws an IntrospectionException if beanClass is null. This was a side effect of the Introspector.findMethod. The solution for this is to explicity check for the null beanClass and throw the IntrospectionException. PropertyDescriptor0005: PropertyDescriptor is constructed with: PropertyDesciptor("color", Wombat.class, null, "changeColor"); The property type cannot be found with the writer method alone. I made a comment about this in the evaluation of 4867168. This is tricky since overloaded write methods may yeild the incorrect type. There is no precedence rules so that the type will be the first method it encounters will set the type. For example, what is the desired type of the mnemonic property from the methods setMnemonic(int), setMnemonic(char). A constructor with a null read method leaves this ambiguous. The solution is to set the type to the first arg of the firs method that matches the writeMethodName. PropertyDescriptor1004: Getter name is empty - "" - string. Expects an IntrospectionException. PropertyDescriptor1005: Setter name is empty - "" - string. Expects an IntrospectionException. PropertyDescriptor2036 - 2063: Checking for invalid methods. doesn't exist, private. This is forcing the implementation to check the validity of the method names. This is fine for the constructor that takes method names since this will most likely be invoked by the user. There will be a performance penalty as the methods will no longer be fetched lazily. The Introspector uses the constructor that takes the actual methods so introspector performance should not be affected. ###@###.### 2003-08-21
21-08-2003