United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6857802 GSS getRemainingInitLifetime method returns milliseconds not seconds
JDK-6857802 : GSS getRemainingInitLifetime method returns milliseconds not seconds

Details
Type:
Bug
Submit Date:
2009-07-07
Status:
Resolved
Updated Date:
2010-11-04
Project Name:
JDK
Resolved Date:
2009-07-17
Component:
security-libs
OS:
linux
Sub-Component:
org.ietf.jgss:krb5
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Backport:
Backport:

Sub Tasks

Description
FULL PRODUCT VERSION :
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)


ADDITIONAL OS VERSION INFORMATION :
Linux  2.6.26.8-57.fc8 #1 SMP Thu Dec 18 19:19:45 EST 2008 i686 i686 i386 GNU/Linux

A DESCRIPTION OF THE PROBLEM :
The method getRemainingInitLifetime returnd milliseconds not seconds.

The specificaton states that the return values are seconds.

In sun.security.jgss.krb5.Krb5InitCredential

    /**
     * Returns the init lifetime remaining.
     *
     * @return the init lifetime remaining in seconds
     * @exception GSSException may be thrown
     */
    public int getInitLifetime() throws GSSException {
	int retVal = 0;
	retVal = (int)(getEndTime().getTime()
		       - (new Date().getTime()));
	
	return retVal;
    }

java.util.Date.getTime() returns milliseconds.



STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a GSS initiate credential and display the results of getRemainingInitLifetime

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Values in seconds
ACTUAL -
Values in milliseconds

REPRODUCIBILITY :
This bug can be reproduced always.

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/jdk7/tl/jdk/rev/1175f872a968
                                     
2009-07-08



Hardware and Software, Engineered to Work Together