jdk/src/share/classes/java/lang/Thread.java
changeset 6316 6d91c1ceac26
parent 5506 202f599c92aa
child 6879 13924eecc282
equal deleted inserted replaced
6315:a02eddc607b7 6316:6d91c1ceac26
   412         /* Set thread ID */
   412         /* Set thread ID */
   413         tid = nextThreadID();
   413         tid = nextThreadID();
   414     }
   414     }
   415 
   415 
   416     /**
   416     /**
       
   417      * Throws CloneNotSupportedException as a Thread can not be meaningfully
       
   418      * cloned. Construct a new Thread instead.
       
   419      *
       
   420      * @throws  CloneNotSupportedException
       
   421      *          always
       
   422      */
       
   423     @Override
       
   424     protected Object clone() throws CloneNotSupportedException {
       
   425         throw new CloneNotSupportedException();
       
   426     }
       
   427 
       
   428     /**
   417      * Allocates a new {@code Thread} object. This constructor has the same
   429      * Allocates a new {@code Thread} object. This constructor has the same
   418      * effect as {@linkplain #Thread(ThreadGroup,Runnable,String) Thread}
   430      * effect as {@linkplain #Thread(ThreadGroup,Runnable,String) Thread}
   419      * {@code (null, null, gname)}, where {@code gname} is a newly generated
   431      * {@code (null, null, gname)}, where {@code gname} is a newly generated
   420      * name. Automatically generated names are of the form
   432      * name. Automatically generated names are of the form
   421      * {@code "Thread-"+}<i>n</i>, where <i>n</i> is an integer.
   433      * {@code "Thread-"+}<i>n</i>, where <i>n</i> is an integer.