JDK-6784496 : SA-JDI: ReferenceType.allFields doesn't return fields from all superclasses
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2008-12-12
  • Updated: 2023-12-14
  • Resolved: 2016-08-08
Related Reports
Relates :  
Description
The spec for com.sun.jdi.ReferenceType.allFields: "Returns a list containing each Field declared in this type, and its superclasses". In case if SA connector is used ReferenceType.allFields returns only fields in the type and in the its first superclass (fields from others superclasses aren't returned).

To reproduce run script from attached archive:
>> run_sajdi.sh <path to the tested JDK> test01.Debuggee test01.Debugger

If run the same test using for example socket attaching connector it works as expected.

Example of test run:
>> run_sajdi.sh /set/vmsqe/jdk/7/build/latest/linux-i586/ test01.Debuggee test01.Debugger
Running debuggee: /set/vmsqe/jdk/7/build/latest/linux-i586//bin/java test01.Debuggee
Waiting debuggee
test01: READY!
Running debugger: /set/vmsqe/jdk/7/build/latest/linux-i586//bin/java test01.Debugger sapid 11410
test01: start
classesByName.size=1
allFields.size=6
 - field[1]=public_int_super3 I
 - field[2]=protected_int_super3 I
 - field[3]=private_int_super3 I
 - field[4]=public_int_super2 I
 - field[5]=protected_int_super2 I
 - field[6]=private_int_super2 I
ERROR: allFields() returned wrong number of fields (12 is expected)
Test FAILED
Killing debuggee

Comments
Closing as WNF. Removing sajdi tests.
08-08-2016