JDK-5014003 : SA-JDI: VirtualMachine.version() returns null
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-03-16
  • Updated: 2004-04-12
  • Resolved: 2004-04-03
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 b46Fixed
Related Reports
Relates :  
Relates :  
Description
With b42 of tiger-beta2, VirtualMachine.version() (and other String reading methods such as name(), class path methods) return null.


###@###.### 2004-03-16

Name: ipR10196			Date: 03/16/2004


This bug affects the following SA-JDI tests:

  nsk/sajdi/SAPIDAttachingConnector/attach/attach002
  nsk/sajdi/SACoreAttachingConnector/attach/attach002
  nsk/sajdi/SADebugServerAttachingConnector/attach/attach002
  nsk/sajdi/SADebugServerAttachingConnector/attach/attach012


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

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

EVALUATION String class fields are made final as part of JSR-133 changes [bugid 4998264]. sun.jvm.hotspot.utilities.ObjectReader uses reflection to set fields of debugger mirror. Because we can't set final fields by reflection, whenever we read String from debuggee, we get only an empty String. VirtualMachine.name() etc. use VM.getSystemProperty method. VM.readSystemProperties returns a properties object with empty-empty key-value pairs and hence any lookup will fail. Refer to "Suggested Fix" as well. ###@###.### 2004-03-16
16-03-2004

SUGGESTED FIX As part of JSR-133, fields of immutable classes have been made final (4998264). ObjectReader failes to read Strings because of this. Because final fields can't be set using reflection API. In sun.jvm.hotspot.utilities.ObjectReader, java.lang.String objects have to be treated specially. ###@###.### 2004-03-16 Webrev: http://bongo.india/debugging/sa/jdi_sa/5014003/webrev/ see also the attachment "webrev.tar.Z". ###@###.### 2004-03-16
16-03-2004