JDK-6433082 : Threadsafety no mentioned in API documentation?
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2006-06-01
  • Updated: 2010-04-02
  • Resolved: 2006-06-02
Related Reports
Duplicate :  
Description
A DESCRIPTION OF THE PROBLEM :
Documentation requirement.  Where do you mention the level of threadsafety a class has, built-in?

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It would be nice, in the reference, to link to a page on threading issues containing the appropriate threading the developer must implement himself for that specific class (or not for that class ).  You may have guessed I'm reading  "Java Threads" by Oaks and Wong.  p. 154 and 157 tells me the Vector class is threadsafe. Can "call add(), remove() and toArray() at the same time without corrupting the internat stator of the Vector object".
ACTUAL -
nothing on the subject. I'm glad I have the "Java threads" book

URL OF FAULTY DOCUMENTATION :
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Vector.html

Comments
EVALUATION A general solution to this enhancement (first filed as CR 4078860 in 1999) is being explored. Interested parties are encouraged to take part in the Java concurrency discussions on this list, learn about the subject, and look for opportunities to help characterize the thread safety and mutual exclusion (locking/"protection") details of existing code. http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest The best, and highly affordable resource for serious study of Java concurrency is the text "Java Concurrency in Practice". There may eventually be more information at http://jcip.net
02-06-2006