JDK-4717216 : java.sql.Timestamp documentation is misleading
  • Type: Bug
  • Component: docs
  • Sub-Component: guides
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-07-19
  • Updated: 2003-01-22
  • Resolved: 2003-01-22
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
1.4.2 b14Fixed
Description

Name: jk109818			Date: 07/18/2002


FULL PRODUCT VERSION :
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b14)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b14, mixed mode)

FULL OPERATING SYSTEM VERSION :Microsoft Windows 2000
[Version 5.00.2195]




A DESCRIPTION OF THE PROBLEM :
The overview documentation for java.sql.Timestamp says: "If
a time value that includes the fractional seconds is
desired, you must convert nanos to milliseconds
(nanos/1000000) and add this to the <code>getTime</code>
value."

This was true in JDK 1.3 and prior, but it is no longer
true in 1.4. The definition of the getTime() method has
changed: it used to return integral seconds; it now returns
the integral seconds plus fractional seconds. Therefore,
the advice in the overview section is obsolete and will
lead to incorrect programs.


REPRODUCIBILITY :
This bug can be reproduced always.
(Review ID: 159384) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis mantis-beta FIXED IN: mantis mantis-beta INTEGRATED IN: mantis-b14 mantis-beta
14-06-2004

EVALUATION Documentation should be updated to reflect the change in behavior of the method java.sql.Timestamp.getTime. This method now returns fractional seconds, so the sentence in the method comment explaining how to compute the nanoseconds should be deleted.
11-06-2004

SUGGESTED FIX Documentation should be updated to reflect the change in behavior of the method java.sql.Timestamp.getTime. This method now returns fractional seconds, so the sentence in the method comment explaining to to compute the nanoseconds should be deleted.
11-06-2004

PUBLIC COMMENTS Documentation should be updated to reflect the change in behavior of the method java.sql.Timestamp.getTime. This method now returns fractional seconds, so the sentence in the method comment explaining how to compute the nanoseconds should be deleted.
10-06-2004