Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6443670
Votes 0
Synopsis Javadoc for AtomicInteger (et.al.) missing information - get() v.s. intValue()
Category java:classes_util_concurrent
Reported Against
Release Fixed
State 5-Cause Known, bug
Priority: 4-Low
Related Bugs
Submit Date 27-JUN-2006
Description
FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
The javadoc for AtomicInteger and the other atomic number classes should state if get() and intValue() are equivalent, or if they are not it should document any differences.

The other xxxValue() methods inherited from Number should also clarified.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
read the documentation

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
the reader should understand if the the xxxValue() methods are equivalent
ACTUAL -
the reader is left to assume that this is true

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
read the source
Posted Date : 2006-06-27 00:06:22.0
Work Around
N/A
Evaluation
It's hard to imagine another implementation for intValue() than to call get().
There's a tradeoff here between extra precision and excessive pedantry.
Adding an explicit spec that intValue() is precisely equivalent to
get() seems reasonable.
Posted Date : 2006-06-27 03:31:45.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang