United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4717216 : java.sql.Timestamp documentation is misleading

Details
Type:
Bug
Submit Date:
2002-07-19
Status:
Resolved
Updated Date:
2003-01-22
Project Name:
JDK
Resolved Date:
2003-01-22
Component:
docs
OS:
windows_2000
Sub-Component:
guides
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.1
Fixed Versions:
1.4.2 (b14)

Related Reports

Sub Tasks

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
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.
                                     
2004-06-10
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.
                                     
2004-06-11
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.
                                     
2004-06-11
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mantis
mantis-beta

FIXED IN:
mantis
mantis-beta

INTEGRATED IN:
mantis-b14
mantis-beta


                                     
2004-06-14



Hardware and Software, Engineered to Work Together